OpenTelemetry.Exporter.Zipkin 1.12.0

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 ZipkinExporter with the AddZipkinExporter() extension method on TracerProviderBuilder.

Configuration

You can configure the ZipkinExporter through ZipkinExporterOptions and environment variables. The ZipkinExporterOptions setters take precedence over the environment variables.

Configuration using Properties

  • BatchExportProcessorOptions: Configuration options for the batch exporter. Only used if ExportProcessorType is set to Batch.

  • Endpoint: URI address to receive telemetry (default http://localhost:9411/api/v2/spans).

  • ExportProcessorType: Whether the exporter should use Batch or Simple exporting processor.

  • HttpClientFactory: A factory function called to create the HttpClient instance that will be used at runtime to transmit spans over HTTP. See Configure HttpClient for more details.

  • MaxPayloadSizeInBytes: Maximum payload size of UTF8 JSON chunks sent to Zipkin (default 4096).

  • 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.

  • UseShortTraceIds: Whether the trace's ID should be shortened before sending to Zipkin (default false).

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.

Configuration using Environment Variables

The following environment variables can be used to override the default values of the ZipkinExporterOptions.

Environment variable ZipkinExporterOptions property
OTEL_EXPORTER_ZIPKIN_ENDPOINT Endpoint

Configure HttpClient

The HttpClientFactory option is provided on ZipkinExporterOptions for users who want to configure the HttpClient used by the ZipkinExporter. Simply replace the function with your own implementation if you want to customize the generated HttpClient:

services.AddOpenTelemetry()
    .WithTracing(builder => builder
        .AddZipkinExporter(o => o.HttpClientFactory = () =>
        {
            HttpClient client = new HttpClient();
            client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value");
            return client;
        }));

For users using IHttpClientFactory you may also customize the named "ZipkinExporter" HttpClient using the built-in AddHttpClient extension:

services.AddHttpClient(
    "ZipkinExporter",
     configureClient: (client) =>
        client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value"));

Note: The single instance returned by HttpClientFactory is reused by all export requests.

Troubleshooting

This component uses an EventSource with the name "OpenTelemetry-Exporter-Zipkin" for its internal logging. Please refer to SDK troubleshooting for instructions on seeing these internal logs.

References

No packages depend on OpenTelemetry.Exporter.Zipkin.

For highlights and announcements see: https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.12.0/RELEASENOTES.md. For detailed changes see: https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.12.0/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md.

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

.NET Standard 2.0

Version Downloads Last updated
1.12.0 4 05/06/2025
1.11.2 5 03/12/2025
1.11.1 7 02/02/2025
1.11.0 8 02/02/2025
1.11.0-rc.1 8 12/25/2024
1.10.0 12 11/14/2024
1.10.0-rc.1 10 12/09/2024
1.10.0-beta.1 12 12/12/2024
1.9.0 10 12/13/2024
1.9.0-rc.1 11 12/16/2024
1.9.0-alpha.1 14 05/25/2024
1.8.1 13 04/24/2024
1.8.0 14 05/25/2024
1.8.0-rc.1 13 05/25/2024
1.8.0-beta.1 14 05/25/2024
1.7.0 17 05/25/2024
1.7.0-rc.1 14 05/25/2024
1.7.0-alpha.1 19 05/25/2024
1.6.0 14 05/25/2024
1.6.0-rc.1 11 05/25/2024
1.6.0-alpha.1 15 05/25/2024
1.5.1 12 05/25/2024
1.5.0 17 05/25/2024
1.5.0-rc.1 16 05/25/2024
1.5.0-alpha.2 10 05/25/2024
1.5.0-alpha.1 13 05/25/2024
1.4.0 13 05/25/2024
1.4.0-rc.4 18 05/25/2024
1.4.0-rc.3 12 05/25/2024
1.4.0-rc.2 14 05/25/2024
1.4.0-rc.1 16 05/25/2024
1.4.0-beta.3 13 05/25/2024
1.4.0-beta.2 14 05/25/2024
1.4.0-beta.1 17 05/25/2024
1.4.0-alpha.2 13 05/25/2024
1.4.0-alpha.1 13 05/25/2024
1.3.2 19 05/25/2024
1.3.1 14 05/25/2024
1.3.0 16 05/25/2024
1.3.0-rc.2 15 05/25/2024
1.3.0-beta.2 12 05/25/2024
1.3.0-beta.1 14 05/25/2024
1.2.0 16 05/25/2024
1.2.0-rc5 11 05/25/2024
1.2.0-rc4 14 05/25/2024
1.2.0-rc3 18 05/25/2024
1.2.0-rc2 11 05/25/2024
1.2.0-rc1 13 05/25/2024
1.2.0-beta2.1 16 05/25/2024
1.2.0-beta1 18 05/25/2024
1.2.0-alpha4 14 05/25/2024
1.2.0-alpha3 14 05/25/2024
1.2.0-alpha2 11 05/25/2024
1.1.0 12 05/25/2024
1.1.0-rc1 11 05/25/2024
1.1.0-beta4 14 05/25/2024
1.1.0-beta3 17 05/25/2024
1.1.0-beta2 14 05/25/2024
1.1.0-beta1 18 05/25/2024
1.0.1 12 05/25/2024
1.0.0-rc4 14 05/25/2024
1.0.0-rc3 15 05/25/2024
1.0.0-rc2 13 05/25/2024
1.0.0-rc1.1 14 05/25/2024
0.8.0-beta.1 10 05/25/2024
0.7.0-beta.1 14 05/25/2024
0.6.0-beta.1 16 05/16/2023
0.5.0-beta.2 14 05/25/2024
0.4.0-beta.2 13 05/25/2024
0.3.0-beta.1 12 05/25/2024
0.2.0-alpha.275 17 05/25/2024
0.2.0-alpha.220 14 05/25/2024
0.2.0-alpha.179 15 05/25/2024
0.2.0-alpha.100 13 05/25/2024
0.2.0-alpha.40 14 05/25/2024
0.2.0-alpha.5 13 05/25/2024