Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dose Nestjs support auto instrumentation with Opentelementry #2887

Open
Narasimha0707 opened this issue Apr 23, 2024 · 2 comments
Open

Dose Nestjs support auto instrumentation with Opentelementry #2887

Narasimha0707 opened this issue Apr 23, 2024 · 2 comments
Labels

Comments

@Narasimha0707
Copy link

Component(s)

auto-instrumentation

Describe the issue you're reporting

We are trying the Kubernetes operator for auto instrumentation using opentelemetry.
followed this document https://opentelemetry.io/docs/kubernetes/operator/automatic/

We added the below annotation in our Nestjs application deployment manifest.
instrumentation.opentelemetry.io/inject-nodejs: "true"

The same configurations worked for Nodejs applications and others, but for the NestJs application, it does not generate traces and spans.

I didn't find any documentation for NestJs auto instrumentation

@pavolloffay
Copy link
Member

is the nestjs instrumentation supported by the OTEL JS project?

@sladkoff
Copy link

sladkoff commented May 3, 2024

I'm currently also playing around with opentelemetry instrumentations in combination with NestJS applications in a Kubernetes environment.

Here's what I've learned so far:

  • Yes, there is an @opentelemetry/instrumentation-nestjs-core package. It allows you to instrument your node application manually using the SDK or by using the Node auto-instrumentations.
  • However, I was not able to get the Kubernetes based node auto-instrumentation to work with an existing NestJS docker container. In theory this should use the instrumentation linked above (which works when added to the application/image directly).

I've given up on the opentelemetry-operator instrumenations for now and have decided to "embed" the SDK-based auto-instrumentations in my NestJS application.

PS. This might be related to #2510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants