getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.98k stars 1.57k forks source link

Add a Tracing Header for browser auto-instrumented http.client spans #14210

Open sdzhong opened 15 hours ago

sdzhong commented 15 hours ago

Problem Statement

For Sentry users also using Coralogix, it's been observed that some API calls are in the millisecond range, while Sentry is reporting it differently. Since server-timing headers aren't supported https://github.com/getsentry/sentry-javascript/issues/14209 and data is in Coralogix, being able to associate spans in Sentry with Coralogix would provide more complete observability.

Solution Brainstorm

Something like the custom header added as span attributes https://docs.sentry.io/platforms/javascript/guides/react/tracing/instrumentation/custom-instrumentation/#improving-span-data automatically to http.client spans.

andreiborza commented 4 hours ago

@sdzhong thanks for filing this.

How is this different from https://github.com/getsentry/sentry-javascript/issues/14209?

Generally speaking, people can update spans in our beforeSendSpan hook. Would that not cover it?