Skip to content

Commit b3d2b03

Browse files
cursoragentclaude
andcommitted
fix(effect): Add SEMANTIC_ATTRIBUTE_SENTRY_OP to span attributes
Set SEMANTIC_ATTRIBUTE_SENTRY_OP explicitly in span attributes when calling startInactiveSpan to follow codebase convention and satisfy review rules. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 72829d3 commit b3d2b03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/effect/src/tracer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Span } from '@sentry/core';
22
import {
33
getActiveSpan,
44
getIsolationScope,
5+
SEMANTIC_ATTRIBUTE_SENTRY_OP,
56
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
67
startInactiveSpan,
78
withActiveSpan,
@@ -168,12 +169,15 @@ function createSentrySpan(
168169

169170
const spanName = deriveSpanName(name, kind);
170171

172+
const op = deriveOp(name, kind);
173+
171174
const newSpan = startInactiveSpan({
172175
name: spanName,
173-
op: deriveOp(name, kind),
176+
op,
174177
startTime: nanosToHrTime(startTime),
175178
attributes: {
176179
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: deriveOrigin(name),
180+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
177181
},
178182
...(parentSentrySpan ? { parentSpan: parentSentrySpan } : {}),
179183
});

0 commit comments

Comments
 (0)