Contributing to OpenTelemetry.NET project
The OpenTelemetry.NET project is a language-specific implementation of OpenTelemetry in .NET. It is an observability framework that generates and collects application telemetry data such as metrics, logs, and traces. This guide will help you understand how to contribute to the OpenTelemetry.NET project.
Getting Started
To get started, you can fork the OpenTelemetry.NET repository from GitHub. The repository consists of the following components:
- OpenTelemetry.NET
- OpenTelemetry.NET Contrib
- OpenTelemetry.NET Automatic Instrumentation
You can get telemetry for your app in less than 5 minutes using automatic instrumentation. Alternatively, you can use manual instrumentation for OpenTelemetry.NET using instrumentation libraries.
Version Support
OpenTelemetry.NET supports all officially supported versions of .NET and .NET Framework except for .NET Framework 3.5 SP1.
Exporters
To visualize and analyze your telemetry, you will need to export your data to an OpenTelemetry Collector or a backend such as Jaeger, Zipkin, Prometheus, or a vendor-specific one. OpenTelemetry.NET provides many exporters, including OTLP Exporter, Prometheus Exporter, Stackdriver Exporter, and Zipkin Exporter.
OTLP Exporter
The OTLP Exporter allows exporting telemetry data in the OpenTelemetry Protocol (OTLP) format to the OpenTelemetry Collector and OTLP-compliant backends/receivers.
Prometheus Exporter
The Prometheus Exporter provides an OpenTelemetry Prometheus exporter for configuring an ASP.NET Core application with an endpoint for Prometheus to scrape.
Stackdriver Exporter
The Stackdriver Exporter provides a Stackdriver Exporter for OpenTelemetry.NET.
Zipkin Exporter
The Zipkin Exporter provides a Zipkin Exporter for OpenTelemetry.NET.
Manual Instrumentation
For manual instrumentation, you can use the Instrumentation packages for OpenTelemetry.NET. For example, to instrument inbound and outbound requests from an ASP.NET Core app, you can use the following packages:
- OpenTelemetry
- OpenTelemetry.Extensions.Hosting
- OpenTelemetry.Exporter.Console
- OpenTelemetry.Instrumentation.AspNetCore
- OpenTelemetry.Instrumentation.Http
Troubleshooting
To see the telemetry from your application directly on the standard output, set the following environment variables to true before launching your application:
- OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED
- OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED
- OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED
Community
OpenTelemetry is an open-source project that anyone in the community can use, improve, and enjoy. You can learn and connect with the community using the following resources:
- Mailing Lists
- Mastodon
- Stack Overflow
- Meeting Recordings
If you want to get more involved by contributing to OpenTelemetry, join us on GitHub or Slack.
Resources
For more information, see:
- OpenTelemetry .NET SDK
- OpenTelemetry Specification
- Instrumentations
- OpenTelemetry .NET Automatic Instrumentation
- OpenTelemetry .NET Manual Instrumentation
- OpenTelemetry .NET Repositories
- OpenTelemetry .NET Design Philosophy
- OpenTelemetry .NET Getting Started
- OpenTelemetry .NET Version Support
- OpenTelemetry Protocol
- Prometheus
- Zipkin
- gRPC
- System.Net.Http.HttpClient and System.Net.HttpWebRequest
- Microsoft.Data.SqlClient and System.Data.SqlClient
- OpenTelemetry Collector
- OpenTelemetry Ecosystem Registry
- OpenTelemetry Instrumentation Libraries
- OpenTelemetry Tracing Shim
- OpenTelemetry Tracing API reference
- OpenTelemetry Metrics API reference
- OpenTelemetry Examples
- OpenTelemetry .NET CI/CD Pipeline
- OpenTelemetry .NET Samples
- OpenTelemetry .NET Collector Builder Sample
- OpenTelemetry .NET Installation Scripts
- OpenTelemetry .NET NetFramework Instrumentation Configuration
- OpenTelemetry .NET Logs
- OpenTelemetry .NET Resources
- OpenTelemetry .NET Status and Releases
- OpenTelemetry .NET Forking Demo Repository
- OpenTelemetry .NET Suggestions for Fork Maintainers
- OpenTelemetry Instrumenting a .NET Web API using OpenTelemetry, Tempo, and Grafana Cloud
Sources:
- https://opentelemetry.io/docs/instrumentation/net/
- https://opentelemetry.io/docs/instrumentation/net/
- https://opentelemetry.io/docs/demo/forking/
- https://grafana.com/docs/opentelemetry/collector/
- https://opentelemetry.io/ecosystem/registry/
- https://grafana.com/docs/opentelemetry/instrumentation/dotnet/manual-instrumentation/
- https://opentelemetry.io/docs/instrumentation/net/automatic/