Top Description Methods
io.opentelemetry.context.propagation

public Interface TextMapSetter<C>

Type Parameters
<C>
carrier of propagation fields, such as an http request
Imports
javax.annotation.Nullable

Class that allows a TextMapPropagator to set propagated fields into a carrier.

Setter is stateless and allows to be saved as a constant to avoid runtime allocations.

Method Summary

Modifier and TypeMethod and Description
public void
set(C
holds propagation fields. For example, an outgoing message or http request. To facilitate implementations as java lambdas, this parameter may be null.
carrier
,
String
the key of the field.
key
,
String
the value of the field.
value
)

Replaces a propagated field with the given value.

Method Detail

setback to summary
public void set(C carrier, String key, String value)

Replaces a propagated field with the given value.

For example, a setter for an java.net.HttpURLConnection would be the method reference java.net.HttpURLConnection#addRequestProperty(String, String)

Parameters
carrier:C

holds propagation fields. For example, an outgoing message or http request. To facilitate implementations as java lambdas, this parameter may be null.

key:String

the key of the field.

value:String

the value of the field.