OpenTelemetry.Exporter.Console 1.21.0

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 for debugging and learning purposes. It is not recommended for production use. The output format is not standardized and can change at any time. If a standardized format for exporting telemetry to stdout is desired, upvote on this feature request.

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.

MetricReaderOptions (metrics)

For metrics, AddConsoleExporter() pairs the exporter with a PeriodicExportingMetricReader. Use MetricReaderOptions to configure temporality, export interval/timeout, and the maximum number of metric points in each exported batch:

var meterProvider = Sdk.CreateMeterProviderBuilder()
    // rest of config not shown here.
    .AddConsoleExporter((_, metricReaderOptions) =>
    {
        metricReaderOptions.TemporalityPreference = MetricReaderTemporalityPreference.Delta;

        metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 10_000;
        metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportTimeoutMilliseconds = 5_000;
        metricReaderOptions.PeriodicExportingMetricReaderOptions.MaxExportBatchSize = 1_000;
    })
    .Build();

See TestMetrics.cs for a runnable example.

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
OTEL_METRIC_EXPORT_MAX_BATCH_SIZE MaxExportBatchSize

References

Showing the top 20 packages that depend on OpenTelemetry.Exporter.Console.

Packages Downloads
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
19
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
15
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
14
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
13
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
10
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
8
Microsoft.ApplicationInsights.Web
Application Insights for .NET web applications. Privacy statement: https://go.microsoft.com/fwlink/?LinkId=512156
3

For highlights and announcements see: https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/RELEASENOTES.md.

    For detailed changes see: https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Exporter.Console/CHANGELOG.md.

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
1.21.0 1 11/16/2026
1.21.0-rc.2 2 11/15/2026
1.21.0-rc.1 2 11/15/2026
1.20.1 6 11/14/2026
1.20.1-rc.1 6 11/07/2026
1.20.0 1 11/16/2026
1.20.0-rc.1 5 11/03/2026
1.19.1 5 09/28/2026
1.19.1-rc.1 6 09/24/2026
1.19.0 5 10/06/2026
1.19.0-rc.1 5 09/22/2026
1.18.0 9 08/22/2026
1.18.0-rc.1 4 08/23/2026
1.17.0 8 07/16/2026
1.17.0-rc.1 6 07/16/2026
1.16.0 10 06/22/2026
1.16.0-rc.1 8 06/20/2026
1.15.3 9 05/24/2026
1.15.2 9 04/18/2026
1.15.1 8 04/18/2026
1.15.0 15 02/03/2026
1.14.0 12 11/21/2025
1.14.0-rc.1 13 10/30/2025
1.13.1 11 10/30/2025
1.13.0 11 10/06/2025
1.12.0 15 05/08/2025
1.11.2 11 03/14/2025
1.11.1 11 02/15/2025
1.11.0 14 02/15/2025
1.11.0-rc.1 12 12/26/2024
1.10.0 15 12/18/2024
1.10.0-rc.1 10 11/09/2024
1.10.0-beta.1 6 06/23/2026
1.9.0 11 06/15/2024
1.9.0-rc.1 10 07/04/2026
1.9.0-alpha.1 7 06/22/2026
1.8.1 14 06/15/2024
1.8.0 16 04/16/2024
1.8.0-rc.1 17 03/30/2024
1.8.0-beta.1 10 03/28/2024
1.7.0 11 01/16/2024
1.7.0-rc.1 12 08/31/2024
1.7.0-alpha.1 7 12/30/2024
1.6.0 11 07/30/2024
1.6.0-rc.1 10 07/01/2026
1.6.0-alpha.1 7 09/18/2024
1.5.1 15 07/13/2024
1.5.0 12 01/16/2024
1.5.0-rc.1 13 06/28/2026
1.5.0-alpha.2 8 09/04/2024
1.5.0-alpha.1 11 01/21/2024
1.4.0 8 03/09/2024
1.4.0-rc.4 12 07/09/2024
1.4.0-rc.3 19 04/10/2024
1.4.0-rc.2 12 10/27/2025
1.4.0-rc.1 15 06/24/2024
1.4.0-beta.3 7 10/10/2024
1.4.0-beta.2 6 06/22/2026
1.4.0-beta.1 13 12/16/2023
1.4.0-alpha.2 12 06/22/2026
1.4.0-alpha.1 10 05/09/2025
1.3.2 10 02/19/2025
1.3.1 9 06/24/2026
1.3.0 12 06/21/2024
1.3.0-rc.2 12 04/08/2024
1.3.0-beta.2 9 12/14/2024
1.3.0-beta.1 8 01/01/2025
1.2.0 7 04/21/2025
1.2.0-rc5 14 05/26/2024
1.2.0-rc4 9 06/24/2026
1.2.0-rc3 10 09/22/2025
1.2.0-rc2 12 02/07/2024
1.2.0-rc1 10 01/01/2024
1.2.0-beta2.1 9 08/30/2025
1.2.0-beta1 18 01/22/2024
1.2.0-alpha4 6 09/17/2024
1.2.0-alpha3 6 07/11/2024
1.2.0-alpha2 7 02/17/2025
1.2.0-alpha1 11 02/04/2024
1.1.0 11 06/24/2026
1.1.0-rc1 10 01/21/2024
1.1.0-beta4 20 02/29/2024
1.1.0-beta3 9 08/30/2024
1.1.0-beta2 9 06/24/2026
1.1.0-beta1 15 06/24/2026
1.0.1 8 12/27/2024
1.0.0-rc4 11 12/03/2024
1.0.0-rc3 9 06/24/2026
1.0.0-rc2 10 06/24/2026
1.0.0-rc1.1 12 06/23/2026
0.8.0-beta.1 11 01/24/2024
0.7.0-beta.1 8 10/21/2024
0.6.0-beta.1 8 06/22/2026
0.5.0-beta.2 15 06/22/2026
0.4.0-beta.2 10 12/22/2023
0.3.0-beta.1 8 06/22/2025
0.2.0-alpha.275 10 06/09/2024
0.2.0-alpha.220 5 06/24/2026