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

is @opentelemetry/instrumentation-pino not compatible with 'nestjs-pino' ? only works with 'pino'? #2591

Open
ShehanChamudith opened this issue Dec 6, 2024 · 1 comment

Comments

@ShehanChamudith
Copy link

in my nest js app i am using nestjs-pino for logging and i think it is not instrumented by @opentelemetry/instrumentation-pino. it works when using just 'pino' for logging

@pichlermarc
Copy link
Member

I'm not too familiar with nest js - is nestjs-pino required/imported before @opentelemetry/instrumentation-pino is registered? AFAIK decorators always run first and using nestjs-pino seems to require decorators from what I've seen in the docs.

If it is required/imported before OTel is setup, then that may be the problem. OpenTelemetry instrumentations hook on require/import - if instrumentation is not the very first thing that's loaded, then we can't instrument it and nothing will ever get to the OTel API.

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

No branches or pull requests

2 participants