diff --git a/examples/memcached/package.json b/examples/memcached/package.json index 73170fe28a..858393ab71 100644 --- a/examples/memcached/package.json +++ b/examples/memcached/package.json @@ -31,8 +31,10 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/instrumentation": "^0.25.0", "@opentelemetry/instrumentation-memcached": "^0.23.0", - "@opentelemetry/sdk-trace-node": "^0.25.0", + "@opentelemetry/resources": "^1.23.0", "@opentelemetry/sdk-trace-base": "^0.25.0", + "@opentelemetry/sdk-trace-node": "^0.25.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "memcached": "^2.2.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib#readme" diff --git a/examples/memcached/tracer.js b/examples/memcached/tracer.js index 0dbda86a19..285233199a 100644 --- a/examples/memcached/tracer.js +++ b/examples/memcached/tracer.js @@ -9,14 +9,14 @@ const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { SimpleSpanProcessor, ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base'); const { Resource } = require('@opentelemetry/resources'); -const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const { MemcachedInstrumentation } = require('@opentelemetry/instrumentation-memcached'); module.exports = (serviceName) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), }); registerInstrumentations({