This repository contains example producers and consumers using the AWS sdk in additon to KPL/KCL. It leaves out the details of setting up the specific clients
The SomeMessage
class implements TextMap
which is the holder for propagation headers and values. An alternative approach to using a Map
inside the message would be to specify fields for all of the propagation headers separately inside the class and implementing iterator on those
The headers for Datadog propagation are:
TRACE_ID_KEY = "x-datadog-trace-id";
SPAN_ID_KEY = "x-datadog-parent-id";
SAMPLING_PRIORITY_KEY = "x-datadog-sampling-priority";
ORIGIN_KEY = "x-datadog-origin";
from DatadogHttpCodec
with "ot-baggage-{name}"
used for baggage
The headers for B3 propagation are:
TRACE_ID_KEY = "X-B3-TraceId";
SPAN_ID_KEY = "X-B3-SpanId";
SAMPLING_PRIORITY_KEY = "X-B3-Sampled";
from B3HttpCodec
A third approach would be using a separate bridge class that implements TextMap
and in turn set/gets items from message
With the java agent installed with the application, there is no setup required. If the java agent is not installed, NoAgentMain
shows an example of setting up the tracer manually.