OpenTelemetry is an observability framework for cloud-native software, providing a comprehensive toolkit for collecting, processing, and exporting telemetry data like metrics, traces, and logs. It aims to simplify the gathering and use of application performance and behavior data across various platforms and environments. OpenTelemetry supports seamless integration with multiple observability tools, making it a versatile choice for developers looking to enhance application insights.
To integrate OpenTelemetry with Razorsharp, start with our Quick Start guide. Then, create a `apm.profiler.json` configuration file in your application's root directory with the following content:
{
"LogProviders": [
{
"Name": "OpenTelemetry",
"Enabled": true,
"Configuration": {
"Endpoint": "http://localhost:4317",
"ServiceName": "my-app"
}
}
],
"excludeLogStart": true
}
For visualization, we'll set up the Jaeger dashboard using Docker. Jaeger is an open-source tool for tracing transactions between distributed services and is compatible with OpenTelemetry data. Run the following command to start Jaeger:
docker run -d --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4317:4317 jaegertracing/all-in-one:latest
By integrating Razorsharp APM CLI with OpenTelemetry, developers gain a powerful suite for in-depth .NET application monitoring, capturing vital performance metrics such as method calls, their dependencies, execution times, along with rich metadata like SQL queries, method parameters, and return values, all in real-time.
Visiting the Jaeger dashboard at http://localhost:16686/ opens up a comprehensive interface for exploring application performance metrics. This visualization tool highlights the synergy between Razorsharp and OpenTelemetry, offering insights into the complex behaviors of applications, identifying performance bottlenecks, and revealing error sources.
The images below from the Jaeger dashboard demonstrate the analytical depth provided, showing clear insights into application operations:
This level of detailed analysis provides a clearer understanding of your application's internal operations, improving the process of optimizing performance and streamlining troubleshooting. Leveraging Razorsharp alongside OpenTelemetry equips developers with a robust toolkit for advanced application performance monitoring and diagnostics.