#support

Instrumentation Error with NestJS and Opentelemetry Troubleshooting

TLDR Aniket faced an issue with nestjs instrumentation and Opentelemetry. vishal-signoz suggested downgrading @opentelemetry/exporter-trace-otlp-http to 0.43.0, which resolved the issue.

Powered by Struct AI

2

12
1mo
Solved
Join the chat
Oct 26, 2023 (1 month ago)
Aniket
Photo of md5-4231606e81bb707fbe09025a71cf527a
Aniket
09:48 AM
I an facing the following error when trying to setup instrumentation in nestjs (I am following https://signoz.io/docs/instrumentation/nestjs/#validating-instrumentation-by-checking-for-traces for reference):

Instrumentation suppressed, returning Noop Span
@opentelemetry/instrumentation-http http instrumentation outgoingRequest
@opentelemetry/instrumentation-http http.ClientRequest return request
{"stack":"OTLPExporterError: Bad Request\n    at IncomingMessage.<anonymous> (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/otlp-exporter-base/src/platform/node/util.ts:131:27)\n    at /Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:49\n    at AsyncLocalStorage.run (node:async_hooks:335:14)\n    at AsyncLocalStorageContextManager.with (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AsyncLocalStorageContextManager.ts:40:36)\n    at IncomingMessage.contextWrapper (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:26)\n    at IncomingMessage.emit (node:events:526:35)\n    at endReadableNT (node:internal/streams/readable:1376:12)\n    at processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"Bad Request","name":"OTLPExporterError","data":"{\"code\":3,\"message\":\"ReadUint64: unsupported value type, error found in #10 byte of ...|UnixNano\\\":{\\\"low\\\":-14|..., bigger context ...|\\\"name\\\":\\\"tcp.connect\\\",\\\"kind\\\":1,\\\"startTimeUnixNano\\\":{\\\"low\\\":-1400614016,\\\"high\\\":395419195},\\\"endTimeUnixN|...\"}","code":"400"}
@opentelemetry/instrumentation-http outgoingRequest on response()
@opentelemetry/instrumentation-http outgoingRequest on end()
@opentelemetry/instrumentation-http outgoingRequest on request close()
{"stack":"OTLPExporterError: Bad Request\n    at IncomingMessage.<anonymous> (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/otlp-exporter-base/src/platform/node/util.ts:131:27)\n    at /Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:49\n    at AsyncLocalStorage.run (node:async_hooks:335:14)\n    at AsyncLocalStorageContextManager.with (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AsyncLocalStorageContextManager.ts:40:36)\n    at IncomingMessage.contextWrapper (/Users/piyushonkar/Desktop/CodeBase/remittance/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:26)\n    at IncomingMessage.emit (node:events:526:35)\n    at endReadableNT (node:internal/streams/readable:1376:12)\n    at processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"Bad Request","name":"OTLPExporterError","data":"{\"code\":3,\"message\":\"ReadUint64: unsupported value type, error found in #10 byte of ...|UnixNano\\\":{\\\"low\\\":-10|..., bigger context ...|e\\\":\\\"fs realpathSync\\\",\\\"kind\\\":1,\\\"startTimeUnixNano\\\":{\\\"low\\\":-1031614016,\\\"high\\\":395419195},\\\"endTimeUnixN|...\"}","code":"400"}
sudhanshu
Photo of md5-b1281cef69854d39174cd55d7c969e18
sudhanshu
10:30 AM
We are sending the APM on port 4318
12:05
sudhanshu
12:05 PM
Ankit Any idea on it. We are following your doc
12:59
sudhanshu
12:59 PM
Aniket Plz share package.json
12:59
sudhanshu
12:59 PM
vishal-signoz will help us
01:02
sudhanshu
01:02 PM
Piyush Plz share the package.json
Piyush
Photo of md5-faf0fdba0b6739a6706f05c15b6738c6
Piyush
01:13 PM
sudhanshu
Photo of md5-b1281cef69854d39174cd55d7c969e18
sudhanshu
01:14 PM
vishal-signoz plz look
Aniket
Photo of md5-4231606e81bb707fbe09025a71cf527a
Aniket
01:37 PM
    "@opentelemetry/auto-instrumentations-node": "^0.39.4",
    "@opentelemetry/exporter-trace-otlp-http": "^0.44.0",
    "@opentelemetry/sdk-node": "^0.44.0",
    "@opentelemetry/semantic-conventions": "^1.17.1",

We are using the above otel dependencies with respective versions vishal-signoz
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
01:45 PM
Aniket There’s reported issue with v0.44. try downgrading @opentelemetry/exporter-trace-otlp-http to 0.43.0 for now.
https://github.com/open-telemetry/opentelemetry-js/issues/4202
Aniket
Photo of md5-4231606e81bb707fbe09025a71cf527a
Aniket
02:36 PM
Thanks vishal-signoz, this helped. We are able to send traces now

1

sudhanshu
Photo of md5-b1281cef69854d39174cd55d7c969e18
sudhanshu
02:47 PM
Thank you vishal-signoz for quick help

1

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community