All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.opencensusshim.OpenTelemetryPropagationComponentImpl Maven / Gradle / Ivy

There is a newer version: 1.42.1-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.opencensusshim;

import io.opencensus.implcore.trace.propagation.PropagationComponentImpl;
import io.opencensus.trace.propagation.TextFormat;
import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
import io.opentelemetry.extension.trace.propagation.B3Propagator;

final class OpenTelemetryPropagationComponentImpl extends PropagationComponentImpl {

  private final TextFormat b3Format =
      new OpenTelemetryTextFormatImpl(B3Propagator.injectingMultiHeaders());
  private final TextFormat traceContextFormat =
      new OpenTelemetryTextFormatImpl(W3CTraceContextPropagator.getInstance());

  @Override
  public TextFormat getB3Format() {
    return b3Format;
  }

  @Override
  public TextFormat getTraceContextFormat() {
    return traceContextFormat;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy