Class OtlpExporters

java.lang.Object
codes.grow.packages.tempo.tracing.OtlpExporters

public final class OtlpExporters extends Object
OTLP span exporters (gRPC and HTTP/protobuf) configured from a TracingConfig: endpoint, headers, compression, export timeout and TLS. The native protocol is not handled here; a service package provides its own factory for it.
  • Field Details

    • DEFAULT_GRPC_ENDPOINT

      public static final String DEFAULT_GRPC_ENDPOINT
      Default OTLP/gRPC endpoint.
      See Also:
    • DEFAULT_HTTP_ENDPOINT

      public static final String DEFAULT_HTTP_ENDPOINT
      Default OTLP/HTTP traces endpoint.
      See Also:
  • Method Details

    • factory

      public static SpanExporterFactory factory()
      Returns a factory that creates an OTLP exporter for the config's protocol.
      Returns:
      factory
    • create

      public static io.opentelemetry.sdk.trace.export.SpanExporter create(TracingConfig config)
      Creates an OTLP exporter for the config's protocol.
      Parameters:
      config - tracing config
      Returns:
      exporter
      Throws:
      ConfigException - for the native protocol or unreadable TLS files
    • httpEndpoint

      public static String httpEndpoint(TracingConfig config)
      The HTTP endpoint: the configured URL, with /v1/traces appended when it has no path.
      Parameters:
      config - tracing config
      Returns:
      endpoint URL