Skip to content

Commit

Permalink
Make it more obvious how to do propagation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilhuhn committed Aug 18, 2022
1 parent 9381f2e commit eb14ee5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/main/asciidoc/opentelemetry.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,11 @@ we are able to propagate the span into the Kafka Record with:

[source,java]
----
Metadata.of(TracingMetadata.withPrevious(Context.current()));
TracingMetadata tm = TracingMetadata.withPrevious(Context.current();
Message out = Message.of(...).withMetadata(tm);
----

The above creates a `Metadata` object we can add to the `Message` being produced,
The above creates a `TracingMetadata` object we can add to the `Message` being produced,
which retrieves the OpenTelemetry `Context` to extract the current span for propagation.

[[configuration-reference]]
Expand Down

0 comments on commit eb14ee5

Please sign in to comment.