Table of Contents

Class OpenTelemetryBuilderOtlpExporterExtensions

Namespace
OpenTelemetry
Assembly
OpenTelemetry.Exporter.OpenTelemetryProtocol.dll

Contains extension methods to facilitate registration of the OpenTelemetry Protocol (OTLP) exporter into an OpenTelemetry.IOpenTelemetryBuilder instance.

public static class OpenTelemetryBuilderOtlpExporterExtensions
Inheritance
OpenTelemetryBuilderOtlpExporterExtensions
Inherited Members

Methods

UseOtlpExporter(IOpenTelemetryBuilder)

Uses OpenTelemetry Protocol (OTLP) exporter for all signals.

public static IOpenTelemetryBuilder UseOtlpExporter(this IOpenTelemetryBuilder builder)

Parameters

builder IOpenTelemetryBuilder

OpenTelemetry.IOpenTelemetryBuilder.

Returns

IOpenTelemetryBuilder

Supplied OpenTelemetry.IOpenTelemetryBuilder for chaining calls.

Remarks

Notes:

  • Calling this method automatically enables logging, metrics, and tracing.
  • The exporter registered by this method will be added as the last processor in the pipeline established for logging and tracing.
  • This method can only be called once. Subsequent calls will result in a NotSupportedException being thrown.
  • This method cannot be called in addition to signal-specific AddOtlpExporter methods. If this method is called signal-specific AddOtlpExporter calls will result in a NotSupportedException being thrown.

UseOtlpExporter(IOpenTelemetryBuilder, OtlpExportProtocol, Uri)

public static IOpenTelemetryBuilder UseOtlpExporter(this IOpenTelemetryBuilder builder, OtlpExportProtocol protocol, Uri baseUrl)

Parameters

builder IOpenTelemetryBuilder

OpenTelemetry.IOpenTelemetryBuilder.

protocol OtlpExportProtocol

OtlpExportProtocol.

baseUrl Uri

Base URL to use.

Note: A signal-specific path will be appended to the base URL for each signal automatically if the protocol is set to HttpProtobuf.

Returns

IOpenTelemetryBuilder

Remarks