io.opentelemetry.instrumentation.apachehttpclient.v4_3.HttpHeaderSetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-apache-httpclient-4.3 Show documentation
Show all versions of opentelemetry-apache-httpclient-4.3 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
The newest version!
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.instrumentation.apachehttpclient.v4_3;
import io.opentelemetry.context.propagation.TextMapSetter;
import javax.annotation.Nullable;
import org.apache.http.client.methods.HttpRequestWrapper;
enum HttpHeaderSetter implements TextMapSetter {
INSTANCE;
@Override
public void set(@Nullable HttpRequestWrapper carrier, String key, String value) {
if (carrier != null) {
carrier.setHeader(key, value);
}
}
}