io.opentelemetry.instrumentation.spring.webmvc.v5_3.JavaxHttpServletRequestGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-spring-webmvc-5.3 Show documentation
Show all versions of opentelemetry-spring-webmvc-5.3 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.instrumentation.spring.webmvc.v5_3;
import io.opentelemetry.context.propagation.TextMapGetter;
import java.util.Collections;
import javax.servlet.http.HttpServletRequest;
enum JavaxHttpServletRequestGetter implements TextMapGetter {
INSTANCE;
@Override
public Iterable keys(HttpServletRequest carrier) {
return Collections.list(carrier.getHeaderNames());
}
@Override
public String get(HttpServletRequest carrier, String key) {
return carrier.getHeader(key);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy