Test Script is failing due to trace-collector in Nest JS application #2930
kpreeti2588
started this conversation in
General
Replies: 1 comment
-
Moving to opentelemetry-js. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to collect traces from @opentelemetry/exporter-trace-otlp-grpc package in Nest JS application .
Everything is working fine and I am able to collect/view trace in Grafana Stack. But when I am trying to run npm run test command, module test specification script app.module.spec.ts file is giving error. Here is the error:
C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\build\src\OTLPExporterNodeBase.js:59
onInit(this, config);
^
TypeError: onInit is not a function
at Immediate. (C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\src\OTLPExporterNodeBase.ts:84:7)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)
C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\build\src\OTLPExporterNodeBase.js:59
onInit(this, config);
^
TypeError: onInit is not a function
at Immediate. (C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\src\OTLPExporterNodeBase.ts:84:7)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)
C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\build\src\OTLPExporterNodeBase.js:59
onInit(this, config);
^
TypeError: onInit is not a function
at Immediate. (C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\src\OTLPExporterNodeBase.ts:84:7)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)
C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\build\src\OTLPExporterNodeBase.js:59
onInit(this, config);
^
TypeError: onInit is not a function
at Immediate. (C:\Finastra\preet\transactions-persistence-worker\node_modules@opentelemetry\exporter-trace-otlp-grpc\src\OTLPExporterNodeBase.ts:84:7)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)
FAIL src/app.module.spec.ts
● Test suite failed to run
Call retries were exceeded
at ChildProcessWorker.initialize (node_modules/jest-runner/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
I tried with multiple otel collector available for use to collect trace but every collector is giving the error in onInit function
Can anyone suggest some workaround for the same?
Beta Was this translation helpful? Give feedback.
All reactions