Skip to content

Commit cfd32d9

Browse files
committed
update
1 parent c5d5c2f commit cfd32d9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_posts/2024-12-27-trace-baggage-context-propagation-open-telementry.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(
7272
```
7373

7474

75-
## HTTP Propagation
75+
## HTTP Propagation
7676

7777
By adding the following instrumentation, OpenTelemetry will automatically handle context propagation for incoming and outgoing HTTP requests.
7878

@@ -108,7 +108,6 @@ public void SendMessage(IMessage message)
108108
{
109109
var propagationContext = new PropagationContext(Activity.Current?.Context ?? default, Baggage.Current);
110110

111-
112111
Propagators.DefaultTextMapPropagator.Inject(
113112
propagationContext,
114113
message.Headers,
@@ -118,11 +117,11 @@ public void SendMessage(IMessage message)
118117
// Publishing ...
119118
}
120119

121-
public void ProcessMessage(IDictionary<string, string> messageHeaders)
120+
public void ProcessMessage(IMessage message)
122121
{
123122
var propagationContext = Propagators.DefaultTextMapPropagator.Extract(
124123
default,
125-
messageHeaders,
124+
message.Headers,
126125
(headers, key) => headers.TryGetValue(key, out var value) ? new[] { value } : Array.Empty<string>()
127126
);
128127

0 commit comments

Comments
 (0)