-
Notifications
You must be signed in to change notification settings - Fork 1k
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
OTLP Log gRPC ignores OTEL_EXPORTER_OTLP_INSECURE=true #5719
Comments
Hi there!
So when
I want to draw attention to the fact that the value of this environment variable must include a schema (or look like
Additionally, I'm not sure if it is correct behavior that if we create an exporter with these settings: |
|
Yeah, you are right :) |
…URE environments in grpc exporter (#5739) Closes #5719 In this commit I add OTEL_EXPORTER_OTLP_LOGS_INSECURE and OTEL_EXPORTER_OTLP_INSECURE env options to `otlploggrpc.Exporter`. Now insecure option is fetched from env endpoint value (OTEL_EXPORTER_OTLP_LOGS_ENDPOINT/OTEL_EXPORTER_OTLP_ENDPOINT). According to [spec](https://opentelemetry.io/docs/specs/otel/protocol/exporter/): > Insecure: Whether to enable client transport security for the exporter’s gRPC connection. This option only applies to OTLP/gRPC when an endpoint is provided without the http or https scheme - OTLP/HTTP always uses the scheme provided for the endpoint. So with current behavior we have several problems: - If default endpoint is used, we can't use insecure connection (with setting OTEL_EXPORTER_OTLP_INSECURE). - If endpoint provided with option without scheme (e.g. `WithEndpoint`) we can't use insecure connection with env settings. - If endpoint provided with env variable without scheme (e.g. `//env.endpoint:8080/`) we can't use insecure connection. This commit fixes this. The same problem with `otlploghttp.Exporter`, and probably it should be fixed there too. I'm open to suggestions on how to fix the current behavior in a more elegant way. --------- Co-authored-by: Sam Xie <sam@samxie.me> Co-authored-by: Damien Mathieu <42@dmathieu.com>
Context:
opentelemetry-go/exporters/otlp/otlplog/otlploggrpc/config.go
Line 38 in 2db4ef2
When setting OTEL_EXPORTER_OTLP_INSECURE=true, this is ignored, as the
envInsecure
is usingenvEndpoint
, when it should use something like:The text was updated successfully, but these errors were encountered: