Skip to content

fix(vars): remove request_time from default indexed variables #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

gruceo
Copy link
Contributor

@gruceo gruceo commented Apr 25, 2025

The request_time variable was previously indexed by default in the NGINX module. However, this behavior is problematic because request_time is a dynamic value that changes over the request lifecycle. Indexing it causes the first access to cache its value, leading to incorrect results for subsequent accesses.

This issue is particularly impactful in Active Tracing, where request_time is used during the log phase. The cached value can result in inaccurate tracing data. This is because the first access to this variable will cache it and subsequent accesses will use the cached value.

This commit removes request_time from the list of default indexed variables to ensure its value is always retrieved dynamically. Corresponding test cases have been updated to reflect this change.

Fix KAG-6868

@gruceo gruceo force-pushed the fix/request_time_indexing branch from 284c343 to 1f9550b Compare April 25, 2025 17:04
The request_time variable was previously indexed by default in the NGINX module. However, this behavior is problematic because request_time is a dynamic value that changes over the request lifecycle. Indexing it causes the first access to cache its value, leading to incorrect results for subsequent accesses.

This issue is particularly impactful in Active Tracing, where request_time is used during the log phase. The cached value can result in inaccurate tracing data. This is because the first access to this variable will cache it and subsequent accesses will use the cached value.

This commit removes request_time from the list of default indexed variables to ensure its value is always retrieved dynamically. Corresponding test cases have been updated to reflect this change.

Fix KAG-6868
@gruceo gruceo force-pushed the fix/request_time_indexing branch from 1f9550b to ccf33db Compare April 25, 2025 17:07
@gruceo gruceo requested review from fffonion, samugi and chronolaw April 25, 2025 17:32
@gruceo gruceo marked this pull request as ready for review April 25, 2025 17:32
@gruceo gruceo merged commit 019a595 into master Apr 28, 2025
6 checks passed
@gruceo gruceo deleted the fix/request_time_indexing branch April 28, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants