How do you use Sentry?
Sentry Saas (sentry.io)
Version
latest
Steps to Reproduce
- Set the sentry-trace header when already in a transaction to a python server
- The set header will then be read by the server into something like:
Sentry-Trace:efa64e95faf54da59b81cce3fb159825-b8efba9273e7a14f-1,efa64e95faf54da59b81cce3fb159825-b8ffba9273e7a14f-1
- Then when the sdk tries to parse this to get the trace_id it fails
Expected Result
The SDK shouldn't fail to parse the header, and instead should probably(?) just pull the first one or one at random
Actual Result
The regex here
|
SENTRY_TRACE_REGEX = re.compile( |
|
"^[ \t]*" # whitespace |
|
"([0-9a-f]{32})?" # trace_id |
|
"-?([0-9a-f]{16})?" # span_id |
|
"-?([01])?" # sampled |
|
"[ \t]*$" # whitespace |
|
) |
fails to parse since the header value now contains a comma unexpectedly
How do you use Sentry?
Sentry Saas (sentry.io)
Version
latest
Steps to Reproduce
Sentry-Trace:efa64e95faf54da59b81cce3fb159825-b8efba9273e7a14f-1,efa64e95faf54da59b81cce3fb159825-b8ffba9273e7a14f-1Expected Result
The SDK shouldn't fail to parse the header, and instead should probably(?) just pull the first one or one at random
Actual Result
The regex here
sentry-python/sentry_sdk/tracing_utils.py
Lines 47 to 53 in 171aa16