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

Support signal-specific OTEL_EXPORTER_OTLP_LOGS_* and OTEL_EXPORTER_OTLP_TRACES_* variables #165

Open
theperm opened this issue Nov 11, 2024 · 1 comment
Labels
enhancement New feature or request up-for-grabs Ready to go

Comments

@theperm
Copy link

theperm commented Nov 11, 2024

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

When using OTEL env vars implemented in #141 the default env vars are supported, it would be great if also the signal specific LOG env vars are supported and take precedence over the default ones,

Describe the solution you'd like

If I want OTEL logs to be sent to a different sink than metrics or traces i should be able to specify the following env vars defined by OpenTelemetry

OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="http://localhost:5341/ingest/otlp/v1/logs"
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_LOGS_HEADERS="X-seq-APIKey=xxxxxx"

This should enable metrics and traces to use the defaults and enable sending of logs to a different sink like Seq
I will have to override both metrics and traces signal env vars and have lofs use the defaults - this would be undesirable.

Describe alternatives you've considered

I can achieve this today by setting the defaults for the LOG signal and then override both metrics and traces signal env vars to achieve the correct result - but this is counter intuitive and undesirable.

Additional context

For logs the OTEL_EXPORTER_OTLP_LOGS_* signal env vars should take precedence if they exist, falling back to the defaults OTEL_EXPORTER_OTLP_* when they are not. This how the OTEL SDK works when using UseOtelExporter().
Same would apply to Serilog tracing using the OTEL_EXPORTER_OTLP_TRACES_* env vars though i have only recently discovered that exists and not used it yet.

@theperm theperm added the enhancement New feature or request label Nov 11, 2024
@nblumhardt
Copy link
Member

Thanks for the thoughtful write-up. This sounds good, we should have everything in place already on the configuration side to support this. Marking up-for-grabs 👍

@nblumhardt nblumhardt added the up-for-grabs Ready to go label Nov 12, 2024
@nblumhardt nblumhardt changed the title Support OTEL signal specific OTEL_EXPORTER_OTLP_LOGS_* environment vars Support OTEL signal-specific OTEL_EXPORTER_OTLP_LOGS_* and OTEL_EXPORTER_OTLP_TRACES_* variables Nov 12, 2024
@nblumhardt nblumhardt changed the title Support OTEL signal-specific OTEL_EXPORTER_OTLP_LOGS_* and OTEL_EXPORTER_OTLP_TRACES_* variables Support signal-specific OTEL_EXPORTER_OTLP_LOGS_* and OTEL_EXPORTER_OTLP_TRACES_* variables Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up-for-grabs Ready to go
Projects
None yet
Development

No branches or pull requests

2 participants