@@ -386,22 +386,24 @@ def get_trace_state(span):
386
386
options = client .options or {}
387
387
388
388
trace_state = trace_state .update (
389
- Baggage .SENTRY_PREFIX + "trace_id" , format_trace_id (span_context .trace_id )
389
+ Baggage .SENTRY_PREFIX + "trace_id" ,
390
+ quote (format_trace_id (span_context .trace_id )),
390
391
)
391
392
392
393
if options .get ("environment" ):
393
394
trace_state = trace_state .update (
394
- Baggage .SENTRY_PREFIX + "environment" , options ["environment" ]
395
+ Baggage .SENTRY_PREFIX + "environment" , quote ( options ["environment" ])
395
396
)
396
397
397
398
if options .get ("release" ):
398
399
trace_state = trace_state .update (
399
- Baggage .SENTRY_PREFIX + "release" , options ["release" ]
400
+ Baggage .SENTRY_PREFIX + "release" , quote ( options ["release" ])
400
401
)
401
402
402
403
if options .get ("dsn" ):
403
404
trace_state = trace_state .update (
404
- Baggage .SENTRY_PREFIX + "public_key" , Dsn (options ["dsn" ]).public_key
405
+ Baggage .SENTRY_PREFIX + "public_key" ,
406
+ quote (Dsn (options ["dsn" ]).public_key ),
405
407
)
406
408
407
409
root_span = get_sentry_meta (span , "root_span" )
@@ -415,7 +417,7 @@ def get_trace_state(span):
415
417
and transaction_source not in LOW_QUALITY_TRANSACTION_SOURCES
416
418
):
417
419
trace_state = trace_state .update (
418
- Baggage .SENTRY_PREFIX + "transaction" , transaction_name
420
+ Baggage .SENTRY_PREFIX + "transaction" , quote ( transaction_name )
419
421
)
420
422
421
423
return trace_state
0 commit comments