Closed IonitaCatalin closed 1 year ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This issue was closed because it has been stale for 14 days with no activity.
@IonitaCatalin hey.
I got same issue with similar setup.
Spent much time and finally found the reason: in my second service import of otelSDK
(which instance of NodeSDK from tracing.ts
) was be not on the first line.
It's very important to have import of otelSDK/NodeSDK on the first line and otelSDK.start()
on the first line in bootstrap method.
@MaksimKiselev placing "import { otelSDK } from "./tracing";" at the first line of the main.ts file has resolved my problem.
Hello there.
As a bit of context, currently working on adding traces on a NestJS application. The prospect of having the amqplib library auto instrumented through the @opentelemetry/instrumentation-amqplib plugin sounds very appealing.
The application consists mostly of a few API aggregates through a gateway and some daemons that listens to a few queue and execute the specified actions.
My main problem with traces for the moment it is that all the instrumentation libraries that are supposed to work inside a single service do work ( spans about function executions for instance are generated) but spans about the queue and the messages are not generated. The @opentelemetry/instrumentation-amqplib seems to be loaded correctly, the opentelemetry logs are not complaining, everything seems to be loading correctly and in working order., but spans from the amqplib are not generated.
The version that I am currently using for the amqplib is 0.10.3.
This is how I bootstrap one of the APIs and also instantiate the OpenTelemetry SDK.
This is how I bootstrap a Daemon type application, the same principle applies.
They are pretty identical although the daemon uses the @nestjs/microservices and also a custom RabbitMQTransportStrategy
Could it possibly be due to using a Strategy from NestJS that's causing the instrumentation library to malfunction, or probably a version mismatch. I am pretty much at a lost currently.
If anyone had this issue before and it's available to help, I would be very grateful.
I am not confident enough to say this is a general problem with the instrumentation library or just something that I am simply doing wrong.