opentelemetry-angular-interceptor icon indicating copy to clipboard operation
opentelemetry-angular-interceptor copied to clipboard

Link browser tracing auto-instrumentations together

Open Renaud009 opened this issue 3 years ago • 1 comments

Hello, I'm new in otel ecosystem so excuse me if my question is stupid.

I'm working on a poc that sends browser traces from an angular application to tempo/zipkin using mostly opentelemetry-angular-interceptor and otel-collector. I'm using the OtelWebTracerModule just like in the instrumentation-example.

I enabled most auto-instrumentation that I found available in your lib for the browser (xml-http-request, fetch, document-load) and even managed to make user-interactions kinda work.

I'm wondering how to link together all those browser traces together in order to figure out a single user journey in zipkin/tempo in order to debug an error that occured in the web application for this specific user. At the moment, I see nothing useful shared between those traces informations:

  • Shouldn't they all be merged in a single trace (share same parentid) (ex. the meta tag with attribute traceparent in index.html file). Is this even possible to do?
  • I also thought about adding a specific attribute to every generated span (service.instance.id or custom attribute) in order to be able to query such attribute in zipkin query but unfortunately only XMLHttpRequestInstrumentaion and FetchInstrumention support applying a custom attribute on span (applyCustomAttributesOnSpan) in their constructor config

Thanks in advance

Renaud009 avatar Jul 20 '21 19:07 Renaud009

Hi @Renaud009

Maybe there is a solution for that but I'm not sure...

When I examine code source of each plugin, i don't see a possibility (every plugin starts with a 'start span' without context)

Only document-load uses a traceparent in meta

So, for the moment, I don't have solution. but I continue to try to find one.

PS : there is no stupid question  😉

jufab avatar Jul 21 '21 23:07 jufab