File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 44 *
55 */
66export const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source' ;
7+ export const SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE = 'sentry.span.source' ;
78
89/**
910 * Attributes that holds the sample rate that was locally applied to a span.
Original file line number Diff line number Diff line change 99 SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION ,
1010 SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID ,
1111 SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME ,
12+ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
13+ SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE ,
1214 SEMANTIC_ATTRIBUTE_USER_EMAIL ,
1315 SEMANTIC_ATTRIBUTE_USER_ID ,
1416 SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS ,
@@ -90,6 +92,10 @@ function applyCommonSpanAttributes(
9092 [ SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID ] : serializedSegmentSpan . span_id ,
9193 [ SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME ] : sdk ?. sdk ?. name ,
9294 [ SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION ] : sdk ?. sdk ?. version ,
95+ // Backfill sentry.span.source from sentry.source for the PoC
96+ // TODO(v11): Stop sending `sentry.source` attribute and only send `sentry.span.source`
97+ // probably easiest done by just renaming SEMANTIC_ATTRIBUTE_SENTRY_SOURCE
98+ [ SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE ] : spanJSON . attributes ?. [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] ,
9399 ...( sendDefaultPii
94100 ? {
95101 [ SEMANTIC_ATTRIBUTE_USER_ID ] : scopeData . user ?. id ,
Original file line number Diff line number Diff line change 55 safeSetSpanJSONAttributes ,
66 SEMANTIC_ATTRIBUTE_SENTRY_OP ,
77 SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
8+ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
89 SpanBuffer ,
910} from '@sentry/core' ;
1011import { getSpanData , type ISentrySpanExporter } from './spanExporter' ;
@@ -39,6 +40,7 @@ export class StreamingSpanExporter implements ISentrySpanExporter {
3940 const allData = {
4041 [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : origin ,
4142 [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : op ,
43+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'custom' ,
4244 ...data ,
4345 } ;
4446 safeSetSpanJSONAttributes ( spanJSON , allData ) ;
You can’t perform that action at this time.
0 commit comments