prometheus-net
Serilog
Our great sponsors
prometheus-net | Serilog | |
---|---|---|
11 | 55 | |
1,839 | 6,938 | |
2.4% | 1.4% | |
9.0 | 7.0 | |
18 days ago | 6 days ago | |
C# | C# | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prometheus-net
-
Is there a way to get performance statistics from my applications running on a k8s cluster?
You might want to look into prometheus https://github.com/prometheus-net/prometheus-net, https://prometheus.io/.
-
Trying to Monitor and Alert on Process Downtime for Azure Linux VMs
You would need to build a custom endpoint if it's a custom application that Prometheus can scrape but there are many libraries for that like prom-client for NodeJS or prometheus-net for C#. The list of client libraries can be found here.
- Analytics for aspnet core apis?
-
Hangfire Metrics
You could probably combine a HangFire Job Filter with the Prometheus C# library and log the things you want. Looks pretty extensible.
-
Observability with Grafana Cloud and OpenTelemetry in .net microservices
prometheus-net
-
DotNet Core 2.1 hoarding memory in Linux
I have a websocket server that hoards memory during days, till the point that Kubernetes eventually kills it. We monitor it using prometheous-net.
-
net6 API Prometheus Metrics
A library that makes this really easy for us is prometheus-net - we can create a minimal API that exposes metrics quickly and demonstrate a few different ways of creating metric data
- How to test the efficiency/speed of application
- How do you monitor your .NET web apps?
-
Writing Prometheus exporters - the Lazy Dev way
// example taken from https://github.com/prometheus-net/prometheus-net#quick-start private static readonly Counter ProcessedJobCount = Metrics .CreateCounter("myapp_jobs_processed_total", "Number of processed jobs."); ... ProcessJob(); ProcessedJobCount.Inc();
Serilog
-
Logging in .NET 8 with Serilog and Seq
To learn more about Serilog, you can visit the documentation on their GitHub project. To learn more about Seq, you can visit the documentation on their website.
-
Microsoft Entity Framework Core 8 samples
These projects use dependency injection for connections and have no logging although they are ready to log to the console via SeriLog setup in Program.cs.
-
Logging - How to configure Log Content?
See here: https://github.com/serilog/serilog/wiki/Configuration-Basics e.g.
-
Using toast notifications in Windows Forms
Captured in public static void OnActivated() and note Log is SeriLog.
-
How to set up Serilog "Enrichers"?
"Serilog": { "Using": [ "Serilog.Sinks.File" ], "Enrich": [ "WithHttpRequestId", "WithExceptionDetails", "WithClientIp" ], "MinimumLevel": { "Default": "Information" }, "WriteTo": [ { "Name": "File", "Args": { "path": "../../../../../Logs/MyApp/MyApp-.log", "rollingInterval": "Day", "retainedFileCountLimit": "7", "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {CorrelationId} {Level:u3}] {Username} {Message:lj}{NewLine}{Exception} {Properties:lj}{NewLine}" } } ] } 👆 I got the enricher names from serilog's wiki. The idea was to log the HTTPRequestId, ClientIp, and automagically log the details of every exception thrown (without having to do _logger.LogError(...)). However I don't see those details in the logs. In Program.cs: ``` var logger = new LoggerConfiguration() .ReadFrom.Configuration(builder.Configuration) .Enrich.FromLogContext() .CreateLogger();
- How to log to an Excel file?
-
How can I fix logger maximum destructuring reached error when using Serilog C#?
You could also write a custom destructuring policy, assuming it's a flurl-specific public exception type and you only need certain properties of it. You'd implement IDestructuringPolicy and then add it to the configuration:
- getting started with loggin
-
A command line tool that converts GraphQL schemas to Karate API tests
Serilog for logging
-
question about TargetFrameworks/multitargetting (new style SDK) csprojs... via serilog example
I've cloned https://github.com/serilog/serilog and I'm not sure what's going on with the multitargetting in the tests? Does this (below) mean, if the dev's OS is windows, then target framework 462 or 471? What should I do on my laptop, which only has the net6 and fw48 sdk installed?
What are some alternatives?
App.Metrics - App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
NLog - NLog - Advanced and Structured Logging for Various .NET Platforms
snap7-to-prometheus - Getting data out of Siemens PLCs using the Snap7 library and presenting them as metrics that can be read by Prometheus
Log4Net - Apache Log4net is a versatile, feature-rich, efficient logging API and backend for .NET
sample-httpclientfactory-polly - Example of using HttpClientFactory in .NET Core 3.1 with Swagger, MediatR and Serilog
ELMAH - Error Logging Modules & Handlers for ASP.NET
trex-exporter - Prometheus exporter for T-Rex miner with dual stats support
Sentry - Sentry SDK for .NET
EthMonitoring - Miner monitoring software with different notifications support
opentelemetry-specification - Specifications for OpenTelemetry
Prometheus.Client - .NET client for Prometheus
Semantic Logging Application Block (SLAB) - Supporting semantic/structured logging for .NET