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

Module @grpc/grpc-js has been loaded before @opentelemetry/instrumentation-grpc #1773

Closed
edosrecki opened this issue Nov 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@edosrecki
Copy link

edosrecki commented Nov 5, 2023

What version of OpenTelemetry are you using?

  • @opentelemetry/api: 1.6.0
  • @opentelemetry/auto-instrumentations-node: 0.39.4

What version of Node are you using?

v20.9.0

What did you do?

npm i @opentelemetry/api @opentelemetry/auto-instrumentations-node

# index.js is empty file
node -r @opentelemetry/auto-instrumentations-node/register index.js

What did you expect to see?

No warnings.

What did you see instead?

Following warning on process startup:

@opentelemetry/instrumentation-grpc Module @grpc/grpc-js has been loaded before @opentelemetry/instrumentation-grpc so it might not work, please initialize it before requiring @grpc/grpc-js

Additional context

I noticed following package chain:

@opentelemetry/auto-instrumentations-node
  -> @opentelemetry/sdk-node
  -> @opentelemetry/exporter-trace-otlp-grpc
  -> @grpc/grpc-js
@edosrecki edosrecki added the bug Something isn't working label Nov 5, 2023
@pichlermarc
Copy link
Member

Thanks for reaching out! There's actually a bug in the exporters that I'm working on fixing that loads grpc too early and causes this error message to be logged. (open-telemetry/opentelemetry-js#4151). It also interferes with the grpc instrumentation and causes telemetry to not be generated. I'll close this as a dupliacte in favor of the issue in the core repo for now.

Please let me know if you think this is a mistake, then I'll re-open this issue. 🙂

@pichlermarc pichlermarc closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants