aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.
Apache License 2.0
273 stars 156 forks source link

Is it possible to instrument http/https/fetch captures from a ReactJS client? #691

Open shaundclements opened 1 month ago

shaundclements commented 1 month ago

Seems a gap in that XRay offers a great trace service but is limited to lambda invocation tracing only. Unless I am missing some guidance. I read about http/https/fetch tracing but there does not appear to be support for capturing these requests from a ReactJs client (outside of a lambda). I am trying to correlate potentially multiple lambda or AWS sdk client calls made from a react client

Thanks for answering community

mxiamxia commented 1 month ago

React web client is supported by OpenTelemetry SDK and X-Ray encourage their customers movin to OTel SDK as well. For lambda support with X-Ray & OTel.

https://opentelemetry.io/docs/demo/services/frontend/

shaundclements commented 1 month ago

@mxiamxia any reason you didn't recommend https://github.com/aws-observability/aws-rum-web which has support for XRay tracing? Seems alot less effort to rollout in a react client than opentelemetry