diff --git a/package-lock.json b/package-lock.json index cf9f2be84e..e618cdc01b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37853,7 +37853,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "graphql": "^16.5.0", @@ -46658,7 +46658,7 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "graphql": "^16.5.0", diff --git a/plugins/node/opentelemetry-instrumentation-graphql/README.md b/plugins/node/opentelemetry-instrumentation-graphql/README.md index aa8877be23..9344e8ed19 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/README.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/README.md @@ -116,6 +116,10 @@ Downstream spans in the context of all resolvers will be child of the first span Can be found [here](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/graphql) +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 1ae2a4bdf9..bdcb66cc6e 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "graphql": "^16.5.0", diff --git a/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts b/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts index 3522290110..661304a212 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts @@ -21,7 +21,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; import { Span, SpanStatusCode } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_EXCEPTION_MESSAGE } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import type * as graphqlTypes from 'graphql'; import { GraphQLInstrumentation } from '../src'; @@ -1399,7 +1399,7 @@ describe('graphql', () => { const resolveEvent = resolveSpan.events[0]; assert.deepStrictEqual(resolveEvent.name, 'exception'); assert.deepStrictEqual( - resolveEvent.attributes?.[SemanticAttributes.EXCEPTION_MESSAGE], + resolveEvent.attributes?.[SEMATTRS_EXCEPTION_MESSAGE], 'sync resolver error from tests' );