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

Make sure to noop when there is no DSN #1852

Merged
merged 8 commits into from Jan 20, 2023
8 changes: 8 additions & 0 deletions sentry_sdk/integrations/opentelemetry/span_processor.py
Expand Up @@ -98,6 +98,14 @@ def on_start(self, otel_span, parent_context=None):
if not hub:
return

if not hub.client or (hub.client and not hub.client.dsn):
antonpirker marked this conversation as resolved.
Show resolved Hide resolved
return

try:
_ = Dsn(hub.client.dsn or "")
except Exception:
return

if hub.client and hub.client.options["instrumenter"] != INSTRUMENTER.OTEL:
return

Expand Down