io.opentelemetry.instrumentation.spring.web.v3_1.HttpRequestSetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-spring-web-3.1 Show documentation
Show all versions of opentelemetry-spring-web-3.1 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.instrumentation.spring.web.v3_1;
import io.opentelemetry.context.propagation.TextMapSetter;
import org.springframework.http.HttpRequest;
enum HttpRequestSetter implements TextMapSetter {
INSTANCE;
@Override
public void set(HttpRequest httpRequest, String key, String value) {
httpRequest.getHeaders().set(key, value);
}
}