aws-observability / aws-otel-js

AWS Distro for OpenTelemetry JavaScript SDK
https://aws-otel.github.io/
Apache License 2.0
36 stars 22 forks source link

Supply auto-configured base X-Ray tracer #3

Closed awssandra closed 1 year ago

awssandra commented 4 years ago

Currently, customer have to manually create a wire up an X-Ray tracer for use with OpenTelemetry. https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer

Unfortunately, with X-Ray's config options, this turns out to be much more in depth (yes this whole thing): https://github.com/open-o11y/aws-opentelemetry-js/blob/master/examples/basic-xray/tracer.js

We should consider vending a ready-to-go tracer.js file for customers to use.

alolita commented 4 years ago

Agree @awssandra Can you provide top common use cases where we could provide a better user experience.

@anuraaga do you have the use cases you addressed in Java w auto-instrumentation?

awssandra commented 4 years ago

Can you provide top common use cases where we could provide a better user experience.

Absolutely. So, the top common use case here is someone entirely unfamiliar with OTel and just wants enable it in the easiest way possible. The thing is, having to copy and paste to setup their application is unfriendly, plus they still have to require all the right packages as well. For a user who just wants to have a one-line onboarding story, the existing solution is not a great one.

Here's the getting started doc today: https://aws-otel.github.io/docs/getting-started/js-sdk/trace-manual-instr#getting-the-sdk-and-dependencies

We can be opinionated about our configuations, there's no need for customers to be required to do all this for a basic setup, having to do all the individual imports, the tracer config for X-Ray, the span processor etc etc. I think this can be simplified for most users just so they can try it out.

Of course, we can still provide the documentation on making a custom tracer.js, but just have one top-level available that's barebones with the otlpExporter, detectors enabled, X-Ray tracer set up, would be a huge win and cut down on the reading a customer has to do.

That'd also require us to vend a package with a package.json with a dependency on all the necessary OTel packages as well as both X-Ray packages, that way everything is in the same place.

Ideally we could potentially reduce these steps to: npm install @aws/otel-aws-xray npm install @opentelemetry/plugin-express node -r ./tracer-express.js app

Seems like we can vend several tracer files to be available out of box. They're relatively thin.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

github-actions[bot] commented 1 year ago

This issue was closed because it has been marked as stale for 30 days with no activity.