Open txigreman opened 6 months ago
If this is implemented can it also support the use case to not overwrite an existing header? The use case is for a correlation id which if provided should be overwritten by the current request id.
Thanks @txigreman for creating this issue. I followed the discussions and the issue that we are currently don't support dynamic values or values created by JavaScript functions in our environment
configuration section.
The feature is a little bit more complicated than just adding headers to the application context as described in the discussion. But having this available including dynamic values is indeed a great add-on to Units capabilities. We are currently spending some time defining a scope for OpenTelemetry Support for Unit and a header with a trace or span ID will be one part of the solution to inform the application about the necessary data.
Thanks @txigreman for reporting / suggesting this and @tippexs for picking it up.
Stumbled upon the same problem, creating an app with Go Fiber and rewriting URL's in Unit. Ideally can have Unit pass in X-Forwarded-[X]
headers, working around the problem using an ENV to simulate this atm. Less clean as I like it to be :)
Description
In the
routes
configuration section we have the possibility to add/set/remove response headers. I think we need a similar feature to handle request headers.Use cases
Pass
$request_id
to the application so it can be attached to the logs to improve traceability:Handle
X-Forwarded-Prefix
:Related issues and discussions
This topic was discussed in #1183 There is a similar request in #1021