Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('should create AI pipeline spans with Vercel AI SDK', async ({ baseURL }) =
(span: any) =>
span.op === 'gen_ai.invoke_agent' ||
span.op === 'gen_ai.generate_content' ||
span.op === 'otel.span' ||
!span.op ||
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
span.description?.includes('ai.generateText'),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ test('Sends transaction with OTel tracer.startSpan despite pre-existing provider
expect.arrayContaining([
expect.objectContaining({
description: 'test-otel-span',
op: 'otel.span',
Comment thread
cursor[bot] marked this conversation as resolved.
origin: 'manual',
}),
]),
Expand All @@ -53,7 +52,6 @@ test('Sends transaction with OTel tracer.startActiveSpan', async ({ baseURL }) =
expect.arrayContaining([
expect.objectContaining({
description: 'test-otel-active-span',
op: 'otel.span',
origin: 'manual',
}),
]),
Expand All @@ -77,7 +75,6 @@ test('OTel span appears as child of Sentry span (interop)', async ({ baseURL })
}),
expect.objectContaining({
description: 'otel-child',
op: 'otel.span',
origin: 'manual',
}),
]),
Expand Down
8 changes: 4 additions & 4 deletions packages/deno/src/opentelemetry/tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SentryDenoTracer implements Tracer {
attributes: {
...options?.attributes,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
...(op ? { [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op } : {}),
Comment thread
Lms24 marked this conversation as resolved.
'sentry.deno_tracer': true,
},
});
Expand Down Expand Up @@ -77,7 +77,7 @@ class SentryDenoTracer implements Tracer {
attributes: {
...opts.attributes,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
...(op ? { [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op } : {}),
'sentry.deno_tracer': true,
},
};
Expand All @@ -96,7 +96,7 @@ class SentryDenoTracer implements Tracer {
return startSpanManual(spanOpts, callback) as ReturnType<F>;
}

private _mapSpanKindToOp(kind?: SpanKind): string {
private _mapSpanKindToOp(kind?: SpanKind): string | undefined {
switch (kind) {
case SpanKind.CLIENT:
return 'http.client';
Expand All @@ -107,7 +107,7 @@ class SentryDenoTracer implements Tracer {
case SpanKind.CONSUMER:
return 'message.consume';
default:
return 'otel.span';
return undefined;
}
}
}
Loading