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

Log a warning message when scope is not available #30

Closed
gaelreyrol opened this issue Jan 11, 2024 · 2 comments
Closed

Log a warning message when scope is not available #30

gaelreyrol opened this issue Jan 11, 2024 · 2 comments

Comments

@gaelreyrol
Copy link
Contributor

Some components can only be traced in specific condition where a scope has already been activated, such as the mailer or the messenger components which can only be used from specific entry points like a request, a command or a worker.

We warn the user if there is no scope to rely on which would cause spans to look for a root span which would not exits.

@gaelreyrol
Copy link
Contributor Author

This warning should be configurable with the option open_telemetry.instrumentation.no_root_span_warning for example.

@gaelreyrol
Copy link
Contributor Author

Currently a debug message is logged when no active scope/root span is available. I think this is enough to investigate if spans are being created without root spans. I might reconsider this issue later when I will have enough feedback to implement it.

@gaelreyrol gaelreyrol closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant