Skip to content

Commit bbdc8f0

Browse files
pull profile id from attributes into top level because relay expects this
1 parent 0559eab commit bbdc8f0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/core/src/semanticAttributes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ export const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';
2424
* Use this attribute to represent measurements of a span.
2525
*/
2626
export const SEMANTIC_ATTRIBUTE_MEASUREMENTS = 'measurements';
27+
28+
/**
29+
* The id of the profile that this span occured in.
30+
*/
31+
export const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'profile_id';

packages/core/src/tracing/span.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { DEBUG_BUILD } from '../debug-build';
2020
import { getMetricSummaryJsonForSpan } from '../metrics/metric-summary';
2121
import {
2222
SEMANTIC_ATTRIBUTE_MEASUREMENTS,
23+
SEMANTIC_ATTRIBUTE_PROFILE_ID,
2324
SEMANTIC_ATTRIBUTE_SENTRY_OP,
2425
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
2526
} from '../semanticAttributes';
@@ -632,6 +633,7 @@ export class Span implements SpanInterface {
632633
origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,
633634
_metrics_summary: getMetricSummaryJsonForSpan(this),
634635
measurements: this._attributes[SEMANTIC_ATTRIBUTE_MEASUREMENTS] as Measurements | undefined,
636+
profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined,
635637
});
636638
}
637639

0 commit comments

Comments
 (0)