lightstep-tracer-javascript icon indicating copy to clipboard operation
lightstep-tracer-javascript copied to clipboard

Context propagation in XHR requests with auto Instrumentation

Open elauria opened this issue 7 years ago • 1 comments

We would like to be able to add http context headers to the XHR requests when xhr_instrumentation is enabled.

Either doing it automatically or by accepting a callback which would make the span instance and the request available.

Having access to the span instance would also be useful to set more meaningful names (e.g. url pathnames), mangle url parameters (e.g. user information) or maybe remove sensitive headers from the spans, for example.

elauria avatar Feb 21 '18 16:02 elauria

I would really like this, too. The out of the box xhr_instrumentation isn't very useful without the ability to rename the span and add tags. I'm also unclear about how I can the XHR spans be a childOf a larger span using the out of the box instrumentation.

tedpennings avatar Jun 14 '18 18:06 tedpennings