Open tadkarshirish opened 5 days ago
Hi there, maybe it helps; for me the problem was my Backend did not attach the "server-timing" header back to the response:
I solved this via the recommended approach of integrating the middleware in my backend: https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/apm-integration/#nodejs-example
Statement from the docs:
After the server sends a server-timing header, the RUM instrumentation automatically picks it up. From the user session view, you can navigate directly to the trace that generated the response. In this example, the initial navigation links to the request loading the page. Click the Services action to the right of the row to continue the investigation in the Application Observability space.
## Description
We have enabled frontend observability for our Angular application using the Grafana Faro Web SDK and Faro Web Tracing CDN. The frontend traces are being sent to Grafana Tempo via Grafana Alloy, and they are visible in Tempo.
For our Java backend services, we are using the OpenTelemetry Operator with auto-instrumentation. Both the frontend and backend traces are being generated successfully but are appearing separately in Grafana Tempo.
According to the documentation, trace propagation should automatically link the frontend and backend traces, but this linkage is not happening in Grafana Tempo. We have confirmed that the traceparent header is present in the backend API request and matches the frontend trace. Despite this, no trace linkage is observed between the frontend and backend traces.
## Steps to reproduce
Versions:
Grafana Faro Web SDK : 1.10.2 Faro Web Tracing CDN : 1.10.2 OpenTelemetry Operator Helm Chart : v0.94.0 Java Auto-instrumentation Agent : 1.32.1
Frontend Setup: We integrated the Grafana Faro Web SDK and Faro Web Tracing CDN into the index.html of our Angular application. The app initiates a GET API call to a backend service for data.
The Angular app sends traces correctly, and they are visible in Grafana Tempo. Below is the index.html setup used to initialize Faro:
Observations: When a frontend API call is made, we can see the traceparent header in the request headers sent to the backend service, and it matches the frontend trace:
traceparent: 00-74jfk49nslkc0485b0859djsc5-3ldskskxcc-01 this trace id send request headers to backend is same as frontend generate trace. but backend service generating new traceid for this request. the traces do not link in Grafana Tempo.
Backend Setup: We are using OpenTelemetry Operator with the following configuration for auto-instrumenting our Java backend services:
yaml
## Expected behavior We expect Grafana Tempo to show the complete trace flow, from the frontend request in the Angular application to the backend response in the Java service. The traces from the frontend and backend should be automatically linked using trace propagation.