Skip to content

Commit

Permalink
Identify span metrics from OpenTelemetry libraries with 'otel.library…
Browse files Browse the repository at this point in the history
…' tag.

Use existing 'otel' tag for other sources of spans, such as manual tracing.
  • Loading branch information
mcculls committed Sep 25, 2024
1 parent c03632f commit 2143f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dd-trace/src/opentelemetry/span.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Span {
context: spanContext._ddContext,
startTime,
hostname: _tracer._hostname,
integrationName: 'otel',
integrationName: parentTracer?._isOtelLibrary ? 'otel.library' : 'otel',
tags: {
[SERVICE_NAME]: _tracer._service,
[RESOURCE_NAME]: spanName
Expand Down
1 change: 1 addition & 0 deletions packages/dd-trace/src/opentelemetry/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Tracer {
this._tracerProvider = tracerProvider
// Is there a reason this is public?
this.instrumentationLibrary = library
this._isOtelLibrary = library?.name?.startsWith('@opentelemetry/')
this._spanLimits = {}
}

Expand Down

0 comments on commit 2143f16

Please sign in to comment.