Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.11 KB

File metadata and controls

56 lines (40 loc) · 2.11 KB

Zipkin Exporter for OpenTelemetry .NET

NuGet NuGet

Prerequisite

Installation

dotnet add package OpenTelemetry.Exporter.Zipkin

Enable/Add Zipkin as a tracing exporter

You can enable the the ZipkinExporter with the AddZipkinExporter() extension method on TracerProviderBuilder.

Configuration

You can configure the ZipkinExporter through ZipkinExporterOptions properties:

  • ServiceName: Name of the service reporting telemetry. If the Resource associated with the telemetry has "service.name" defined, then it'll be preferred over this option.
  • Endpoint: URI address to receive telemetry (default http://localhost:9411/api/v2/spans).
  • UseShortTraceIds: Whether the trace's ID should be shortened before sending to Zipkin (default false).
  • MaxPayloadSizeInBytes: Maximum payload size - for .NET versions other than 4.5.2 (default 4096).
  • ExportProcessorType: Whether the exporter should use Batch or Simple exporting processor .
  • BatchExportProcessorOptions: Configuration options for the batch exporter. Only used if ExportProcessorType is set to Batch.

See TestZipkinExporter.cs for example use.

Configuration using Dependency Injection

This exporter allows easy configuration of ZipkinExporterOptions from dependency injection container, when used in conjunction with OpenTelemetry.Extensions.Hosting.

See the Startup class of the ASP.NET Core application for example use.

References