open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.68k stars 772 forks source link

Link spans trees between microservices #3495

Closed andreluizsgf closed 1 year ago

andreluizsgf commented 1 year ago

Hey guys, i have two microsservices, lets say A and B, being traced by opentelemetry. Service A makes HTTP requests to service B and both creates spans but on different trace ids. On the trace from A i can see all http requests made to B but cant see the operations made by B (database operations, another HTTP calls or functions) on the same tree. To achive that i need to access the trace created by B directly. Is there a way to link both of them to the same traceId, since they are the same are born from the same span?

image

Here is an example of what i want to achieve:

image
legendecas commented 1 year ago

Would you mind sharing your setup codes or a minium reproduction of the problem? From my first impression, the problem may related to missing propagators to inject necessary trace contexts into the request sent.

syedirfan7 commented 1 year ago

hi @legendecas i am also trying the same and stuck at same place here is my code snippet with propogation but it still doesnt work. any inputs ? https://github.com/open-telemetry/opentelemetry-js/issues/3529#issuecomment-1385492652

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stale for 14 days with no activity.