Commit c9a9656
feat: use specific W3CTraceContextPropagator for OTel (#2036)
* feat: Use specific W3CTraceContextPropagator for OTel
Replaces the use of the global OpenTelemetry propagator (propagation) with a specific instance of W3CTraceContextPropagator within the telemetry-tracing.ts module.
This ensures that trace context propagation for Pub/Sub messages always uses the W3C format via the googclient_traceparent attribute, regardless of the global propagator configured by user code. This maintains consistent tracing behaviour as it moves between library instances as a Pub/Sub attribute.
* chore: linting fixes
* build: move @opentelemetry/core to deps to get the trace propagator
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 4108a69 commit c9a9656
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| |||
749 | 757 | | |
750 | 758 | | |
751 | 759 | | |
752 | | - | |
| 760 | + | |
753 | 761 | | |
754 | 762 | | |
755 | 763 | | |
| |||
802 | 810 | | |
803 | 811 | | |
804 | 812 | | |
805 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
806 | 818 | | |
807 | 819 | | |
808 | 820 | | |
| |||
0 commit comments