-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support of Host
header in otlphttpexporter
#9395
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
We try to use opentlelemetry collector gateway behind envoy as a gateway and send data there from collector layer in lambda function.
lambda function otel collector layer => Servicemesh gateway => otel collector gateway
Typically envoy uses authority/host headers for HTTP2/HTTP1 for request when routing
so for demonstrating the request should look like
curl https://evnoy-service -H 'host: otel-collector-host'
Describe the solution you'd like
I plan to add a config for host header into otlphttp exporter
https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/config.go
and set Request.header in the moment of request
https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/otlp.go#L124
Similar PR for grpc exporter:
#8228
I have a similar pull request ongoing in golang client
open-telemetry/opentelemetry-go#4780
Additional context
There is a tricky part in implementation of net.http.Request library. This library doesn't override Host header when it is passed as Request.Headers field . They have a special field Request.Host if Host header has to be overrided so configuration option for Host should be different than for generic
Headers
The text was updated successfully, but these errors were encountered: