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

Tweak OpenTelemetry config to rely on default OTel SDK env vars #108

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

kylewlacy
Copy link
Member

This PR builds on #92 by tweaking how OpenTelemtry is configured. This removes $BRIOCHE_JAEGER_ENDPOINT completely, and instead adds a new $BRIOCHE_ENABLE_OTEL env var. When $BRIOCHE_ENABLE_OTEL=1, then it will use the default OpenTelemtry SDK config to pick the endpoint and URL, see https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_protocol

Previously, this command from #92 (comment):

BRIOCHE_JAEGER_ENDPOINT=http://jaeger:4318/v1/traces cargo run -- fmt -p /tmp/brioche-packages/packages/bat

...would now become this:

BRIOCHE_ENABLE_OTEL=1 OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318 cargo run -- fmt -p /tmp/brioche-packages/packages/bat

@kylewlacy kylewlacy merged commit 2312e57 into main Jul 30, 2024
5 checks passed
@kylewlacy kylewlacy deleted the tweak-otel-config branch July 30, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant