You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
We're getting the following error after configuring opentelemetry support in dd-trace-js.
"TypeError: Cannot read properties of undefined (reading 'sample')",
" at DatadogSpan._addTags (/usr/src/app/node_modules/dd-trace/packages/dd-trace/src/opentracing/span.js:238:27)",
" at DatadogSpan.addTags (/usr/src/app/node_modules/dd-trace/packages/dd-trace/src/opentracing/span.js:138:10)",
" at Span.setAttributes (/usr/src/app/node_modules/dd-trace/packages/dd-trace/src/opentelemetry/span.js:92:18)",
" at Tracer.startSpan (/usr/src/app/node_modules/dd-trace/packages/dd-trace/src/opentelemetry/tracer.js:96:10)",
" at Tracer.startActiveSpan (/usr/src/app/node_modules/dd-trace/packages/dd-trace/src/opentelemetry/tracer.js:113:23)",
" at ApolloGateway.executor [as gatewayExecutor] (/usr/src/app/node_modules/@apollo/gateway/dist/index.js:53:43)",
" at execute (/usr/src/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:225:44)",
" at processGraphQLRequest (/usr/src/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:158:38)",
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at async internalExecuteOperation (/usr/src/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:634:16)"
The project is basically a apollo server / gateway.
Any clue where to look on how to resolve this in case that's not a bug?
Expected behaviour
Shouldn't crash I guess.
Actual behaviour
Is crashing
Steps to reproduce
That's our tracer initialization code:
FYI, at my company we are using 4.17.0 on Node 18, gateway 2.6.1 and server@4.4.0 without issue
the biggest difference I can see between our setup is we use koa and not express, and we disable the ddtrace graphql plugin altogether.
I have a very similar issue but with Prisma and some manual span creation instead of Apollo. For me the issue only occurs when i develop locally so I think that it may be related to the DD_TRACE_ENABLED environment variable: DD_TRACE_ENABLED=false node index.js - fails DD_TRACE_ENABLED=true node index.js - no issue
Hi!
We're getting the following error after configuring opentelemetry support in
dd-trace-js
.The project is basically a apollo server / gateway.
Any clue where to look on how to resolve this in case that's not a bug?
Expected behaviour
Shouldn't crash I guess.
Actual behaviour
Is crashing
Steps to reproduce
That's our tracer initialization code:
When removing the
it works just fine - but then we don't get the opentelemetry spans emitted by the apollo gateway.
Environment
The text was updated successfully, but these errors were encountered: