A .NET library for instrumenting applications with Prometheus metrics, including built-in integrations for ASP.NET Core.
prometheus-net is a .NET library designed to instrument applications with Prometheus metrics, enabling developers to collect and export custom performance and operational data. It solves the problem of monitoring .NET applications by providing a native, high-performance way to expose metrics that can be scraped by Prometheus for real-time insights and alerting.
.NET developers and DevOps engineers building observable applications, particularly those using ASP.NET Core, who need to integrate with Prometheus for monitoring and alerting.
Developers choose prometheus-net for its comprehensive feature set, seamless ASP.NET Core integrations, high performance, and strong adherence to Prometheus conventions, making it the de facto standard for Prometheus instrumentation in the .NET ecosystem.
.NET library to instrument your code with Prometheus metrics
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built-in middleware for HTTP, gRPC, and HttpClient metrics reduces boilerplate code, with sample projects like Sample.Web demonstrating quick setup.
Benchmarks show millions of measurements per second with minimal overhead, making it suitable for high-throughput applications.
Enables attaching trace IDs to metrics for correlation with OpenTelemetry traces, enhancing distributed debugging capabilities.
Features like automatic expiration via WithManagedLifetime() help manage high-cardinality issues without manual intervention.
Requires installing separate packages for ASP.NET Core, gRPC, health checks, etc., complicating dependency management and setup.
Assumes familiarity with Prometheus concepts and best practices, as emphasized in the documentation, which can be daunting for newcomers.
Primarily designed for Prometheus export; integrating with other monitoring systems like Datadog requires additional work or custom solutions.