Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 2.2 KB

File metadata and controls

52 lines (37 loc) · 2.2 KB

Console Exporter for OpenTelemetry .NET

NuGet NuGet

The console exporter prints data to the Console window. ConsoleExporter supports exporting logs, metrics and traces.

Warning

This exporter is intended to be used during learning how telemetry data are created and exported. It is not recommended for any production environment.

Installation

dotnet add package OpenTelemetry.Exporter.Console

See the individual "getting started" examples depending on the signal being used:

Configuration

See the TestConsoleExporter.cs for an example of how to use the exporter for exporting traces to a collection.

You can configure the ConsoleExporter through Options types properties and environment variables. The Options type setters take precedence over the environment variables.

Environment Variables

The following environment variables can be used to override the default values of the PeriodicExportingMetricReaderOptions (following the OpenTelemetry specification.

Environment variable PeriodicExportingMetricReaderOptions property
OTEL_METRIC_EXPORT_INTERVAL ExportIntervalMilliseconds
OTEL_METRIC_EXPORT_TIMEOUT ExportTimeoutMilliseconds

References