io.opentelemetry.extension.trace.propagation.OtTraceConfigurablePropagator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-extension-trace-propagators Show documentation
Show all versions of opentelemetry-extension-trace-propagators Show documentation
OpenTelemetry Extension : Trace Propagators
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.extension.trace.propagation;
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigurablePropagatorProvider;
/**
* A {@link ConfigurablePropagatorProvider} which allows enabling the {@link OtTracePropagator} with
* the propagator name {@code ottrace}.
*/
public final class OtTraceConfigurablePropagator implements ConfigurablePropagatorProvider {
@Override
public TextMapPropagator getPropagator(ConfigProperties config) {
return OtTracePropagator.getInstance();
}
@Override
public String getName() {
return "ottrace";
}
}