inject

fun inject(properties: Properties, context: Context = Context.current()): Properties

Injects trace context into message properties headers. Creates or updates the headers map with traceparent and tracestate.

Return

Updated properties with trace context in headers.

Parameters

properties

The message properties to inject into.

context

The OpenTelemetry context containing the span to propagate.