File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ if Sentry.OpenTelemetry.VersionChecker.tracing_compatible?() do
1010 import Bitwise
1111
1212 require Record
13+ require Logger
1314 require OpenTelemetry.Tracer , as: Tracer
1415
1516 @ behaviour :otel_propagator_text_map
@@ -74,8 +75,9 @@ if Sentry.OpenTelemetry.VersionChecker.tracing_compatible?() do
7475
7576 Tracer . set_current_span ( ctx , remote_span_ctx )
7677 else
77- require Logger
78- Logger . debug ( "[Sentry] Not continuing trace due to org ID mismatch" )
78+ sdk_org_id = Sentry.Config . effective_org_id ( )
79+ baggage_org_id = extract_baggage_org_id ( raw_baggage )
80+ Logger . warning ( "[Sentry] Not continuing trace due to org ID mismatch (sdk: #{ sdk_org_id } , incoming: #{ baggage_org_id } )" )
7981 ctx
8082 end
8183
@@ -145,7 +147,7 @@ if Sentry.OpenTelemetry.VersionChecker.tracing_compatible?() do
145147 defp ensure_org_id_in_baggage ( baggage ) when is_binary ( baggage ) do
146148 org_id = Sentry.Config . effective_org_id ( )
147149
148- if org_id != nil and not String . contains? ( baggage , "sentry-org_id=" ) do
150+ if org_id != nil and extract_baggage_org_id ( baggage ) == nil do
149151 baggage <> ",sentry-org_id=" <> org_id
150152 else
151153 baggage
You can’t perform that action at this time.
0 commit comments