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

Test the setup_default_tracing() #718

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Test the setup_default_tracing() #718

merged 1 commit into from
Mar 20, 2024

Conversation

bloodearnest
Copy link
Member

This resulted in some fix to the configuration too,
as consuming OTEL_SERVICE_NAME was not being done correctly

It does involve some messy reaching into otel internals though

This resulted in some fix to the configuration too,
as consuming OTEL_SERVICE_NAME was not being done correctly

It does involve some messy reaching into otel internals though
monkeypatch.setattr(os, "environ", env)
monkeypatch.setattr(
opentelemetry.exporter.otlp.proto.http.trace_exporter, "environ", env
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious - why doesn't monkeypatching os also change it here? Is it just because opentelemetry.exporter.otlp.proto.http.trace_exporter does from os import environ rather than just import os, or is there something else going on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is exactly what is going on, sadly.

@bloodearnest bloodearnest merged commit 6a89c9e into main Mar 20, 2024
14 checks passed
@bloodearnest bloodearnest deleted the test-tracing-config branch March 20, 2024 12:27
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.

2 participants