Skip to content
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

Allow request id to be populated from specified HTTP request header #50290

Open
pboguslawski opened this issue Jan 21, 2025 · 0 comments
Open
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: logging

Comments

@pboguslawski
Copy link
Contributor

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

According to

and
$_SERVER['UNIQUE_ID'] ?? '',
NC server use mod_uniq_id or random value to identify HTTP request. One cannot specify name of HTTP request header to get this ID from (i.e. to use ID generated by reverse proxy for log correlation).

Describe the solution you'd like
Introduce config parameter (i.e. request_id_header); when defined and not empty, check if request contains such header with non-empty value and use it as request id in NC server; otherwise use UNIQUE_ID if defined, otherwise generate random id.

Describe alternatives you've considered

Dirty workaround for Apache to use request IDs from X-Request-ID header set by reverse proxy:

# Set UNIQUE_ID from X-Request-ID header to simulate mod_unique_id behavior.
SetEnvIfNoCase ^X-Request-ID$ "(.+)" UNIQUE_ID=$1
@pboguslawski pboguslawski added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: logging
Projects
None yet
Development

No branches or pull requests

2 participants