You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python and Java auto instrumentation each support an environment variable OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST which allows for specified HTTP Headers to be automatically included in spans as attributes. The PHP auto instrumentation implementation doesn't have such a mechanism, AFAIK.
Describe the solution you'd like
I would like to define a list of HTTP request headers to be included into the span attributes
Additional context
We were looking at our spans generated by the php otel auto-instrumentation, and noticed that several of the headers we were looking for are not included. This eventually let us to conclude that these spans don't include the request headers, which is not ideal.
The text was updated successfully, but these errors were encountered:
I haven't personally tested using otel.instrumentation.http.request_headers, and it looks like it needs to be configured in php.ini or .htaccess, but it should do what you want.
Is your feature request related to a problem?
Python and Java auto instrumentation each support an environment variable OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST which allows for specified HTTP Headers to be automatically included in spans as attributes. The PHP auto instrumentation implementation doesn't have such a mechanism, AFAIK.
Describe the solution you'd like
I would like to define a list of HTTP request headers to be included into the span attributes
Describe alternatives you've considered
I've looked into https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_headers but this seems to add headers, which isn't what I want. I want to include the already existing headers as span attributes.
Additional context
We were looking at our spans generated by the php otel auto-instrumentation, and noticed that several of the headers we were looking for are not included. This eventually let us to conclude that these spans don't include the request headers, which is not ideal.
The text was updated successfully, but these errors were encountered: