diff --git a/packages/opentelemetry-shim-opentracing/src/shim.ts b/packages/opentelemetry-shim-opentracing/src/shim.ts index 8b4ecd1bf68..8c4b209c121 100644 --- a/packages/opentelemetry-shim-opentracing/src/shim.ts +++ b/packages/opentelemetry-shim-opentracing/src/shim.ts @@ -22,7 +22,11 @@ import { TextMapPropagator, } from '@opentelemetry/api'; import * as opentracing from 'opentracing'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_EXCEPTION_STACKTRACE, + SEMATTRS_EXCEPTION_TYPE, +} from '@opentelemetry/semantic-conventions'; function translateReferences(references: opentracing.Reference[]): api.Link[] { const links: api.Link[] = []; @@ -325,15 +329,15 @@ export class SpanShim extends opentracing.Span { for (const [k, v] of entries) { switch (k) { case 'error.kind': { - mappedAttributes[SemanticAttributes.EXCEPTION_TYPE] = v; + mappedAttributes[SEMATTRS_EXCEPTION_TYPE] = v; break; } case 'message': { - mappedAttributes[SemanticAttributes.EXCEPTION_MESSAGE] = v; + mappedAttributes[SEMATTRS_EXCEPTION_MESSAGE] = v; break; } case 'stack': { - mappedAttributes[SemanticAttributes.EXCEPTION_STACKTRACE] = v; + mappedAttributes[SEMATTRS_EXCEPTION_STACKTRACE] = v; break; } default: {