io.opentelemetry.javaagent.instrumentation.undertow.UndertowHttpResponseMutator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-javaagent-undertow-1.4 Show documentation
Show all versions of opentelemetry-javaagent-undertow-1.4 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.undertow;
import io.opentelemetry.javaagent.bootstrap.http.HttpServerResponseMutator;
import io.undertow.server.HttpServerExchange;
import io.undertow.util.HttpString;
public enum UndertowHttpResponseMutator implements HttpServerResponseMutator {
INSTANCE;
UndertowHttpResponseMutator() {}
@Override
public void appendHeader(HttpServerExchange exchange, String name, String value) {
exchange.getResponseHeaders().add(HttpString.tryFromString(name), value);
}
}