-
Notifications
You must be signed in to change notification settings - Fork 821
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
Should examples be updated to use NodeSDK instead of NodeTracerProvider? #4644
Comments
Not sure if recommending NodeSDK is a good thing as of now. A similar topic is the As a result I think the NodeSDK should be improved in that regard to offer full power without the need to depend on all of it. I think documentation should be more clear about the pro/conts of the two variants and when to use what. |
I'm all for listing tradeoffs, but I believe that all documentation should default to the |
Generally I think it's preferable for the examples and the website docs to be consistent. If we're using |
For "Usage" docs in instrumentation package READMEs and for examples, I think using My impression is that the Using the primitives -- configuring {Tracer,Metrics,Logger}Provider instances, registering them, registerInstrumentations, learning which of the fairly large number of
With all the instrumentations and OTLP exporters being experimental as well, I don't feel it is too out of line to be recommending the experimental NodeSDK as the entry-point for users. The number of 'sdk-node's deps aren't too much more than what a user effectively needs to trace and export via OTLP. I agree that it would be nice to (a) add at least one metrics and logs OTLP exporter and (b) perhaps discuss limiting the number of included trace exporters by default.
I feel the current state of having documented user entry points in both |
I support imporvments to the Most of OTEL end users who are reading the READMEs will most likely not need to use |
I happen to have a lot of opinions about the
Concerning examples: I think there should be a few examples that use I also think we should clearly list what tradeoffs users make by using Since the opentelemetry.io docs are now Concerning @opentelemetry/sdk-node features/quality: IMO changing the examples provides some value short-term, but long-term value is delivered by improving I think it's easy to agree that Another crucial point is that, there's no way for people to add extensions to it, like there is for other language implementations of auto-configure packages (Java comes to mind). This causes this weird split where we actually need The same is true for To summarize, we always have to add extensions as a dependency to My vision for This would deliver value to users, contributors and third-parties (vendors, possibly other open-source project looking to leverage OTel autoconfiguration) by helping:
What this topic needs, though is someone to drive it (starting out with prototyping, planning, creating issues, plus someone to implement and someone dedicated to review the changes). (I myself am currently focusing on #4585, and once completed, will move my focus on delivering a stable logs sdk/api, then focus on delivering a stable instrumentation base. IMO it only becomes then viable to implement these changes in NodeSDK otherwise we'd be building a lot logic on top of unstable interfaces, that does not mean that we cannot plan and prototype while these things are being done, we just need someone who's willing to do it and also has the bandwidth to do so. 🙂 ) |
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. |
I'm setting this to "never-stale" right now because the details here are valuable for next steps, and leaving in the backlog. |
In public docs as well as the opentelemetry-js README, we show how to setup the
NodeSDK
. In other docs, including the auto-instrumentations-node README and various examples, we show how to setup aNodeTracerProvider
.This inconsistency can be confusing to newcomers who aren't clear on whether they should use
NodeSDK
or theNodeTracerProvider
directly. For most, I believe theNodeSDK
is the better option, and that's generally what's been recommended as of late.We should review our various examples and convert most to use the
NodeSDK
, but before splitting that up into a checklist of places to update, I wanted to check if there is an objection to this. I understand theNodeSDK
is experimental whereasNodeTracerProvider
is stable, so that is probably the main reason it hasn't been updated everywhere. But with over a million weekly downloads on npm, it seems widespread enough in usage that the documentation change is warranted, at least in the contrib repo.The text was updated successfully, but these errors were encountered: