-
Notifications
You must be signed in to change notification settings - Fork 810
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
Confusing documentation mixes different packages and entrypoints #3230
Comments
Actually there is no single right way. It's up to the user to decide which variant to use. Some points one has to think about (there are likely more points):
If one don't want to invest the time to get familiar with OTel to decide this I recommend to use an OTel variant packaged by some company. That said I agree that doc could be improved. But as usual the experts knowing all the fine grained details how to use miss the newbie view. I add the "help wanted" and "up-for-grabs" labels to indicate this.
In short instrumenting ESM modules is not yet supported. Better stick of CJS if you want working autoinstrumentation. Work is ongoing to improve this but as long as the looder hooks on node side are experimental and have breaking changes every now and than it's not the likely that this should be considered as production ready. |
Some guidance in the docs on how to select appropriate packages and entrypoint APIs would definitely be helpful. Right now it's exceedingly confusing, unclear which packages are current vs obsolete, etc. I am investing the time to become familiar with opentelemetry, and I use OpenTelemetry in other languages with far fewer issues. My node experience is definitely weak, but even it has been a lot harder to get anything up and running on node than on any of the other stacks I've instrumented. Some clarity in the package docs on what is deprecated vs not, and how the various packages inter-related would be most welcome. Another example of confusion between the APIs: It looks a bit like So from a usability perspective, I'm trying to share new user experiences of how confusing this is to encounter, and some things that might help. I know that I find it immensely valuable to have people who're working with my own code and documentation give me their first impressions, before they've figured it all out and understood it, as it helps me smooth the UX and fix pitfalls I don't see anymore because I already know it all. |
@ringerc I think your issues may be best sorted out in the OTel docs, where there is a lot of what you mention here: https://opentelemetry.io/docs/instrumentation/js/instrumentation/ Happy to clarify more stuff there as well |
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 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. |
The opentelemetry docs here could really use a bit of a prune to remove references to obsolete packages, and to clarify the correct way to set up autoinstrumention.
There are multiple overlapping "main" npm packages used:
The docs for
sdk-node
don't mentionsdk-trace-base
orsdk-trace-node
.It's hard to know whether the correct way to init the opentelemetry js provider is with
NodeTracerProvider
:or with
NodeSDK
:Neither package references the other. All have recent releases.
Then there are multiple autoinstrumentation interfaces. Both these provide different autoinstrumentation APIs:
and again, it's far from clear which should be used.
sdk-node
links toauto-instrumentations-node
, but the instructions forauto-instrumentations-node
useNodeTracerProvider
fromsdk-trace-node
notNodeSDK
fromsdk-node
. Is it still correct to usegetNodeAutoInstrumentations()
?Some stale links too. E.g. https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-node links to https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http which is 404.
Another point of new-user bewilderment has been that the otel SDK is documented as requiring that it must be loaded before other components in the app. But
node --require
can only run cjs modules, which don't supportawait
, so it's unclear how it's possible to wait for the otel sdk to be ready before loading other application components.The text was updated successfully, but these errors were encountered: