Monitoring .Net with OpenTelemetry Prometheus and Grafana

  Рет қаралды 2,055

Developing Woot

Developing Woot

4 ай бұрын

This is a brief overview tutorial of how I setup monitoring in .NET applications using the powerful trio of OpenTelemetry, Prometheus, and Grafana. As the demand for robust monitoring solutions continues to grow, understanding how to effectively monitor your .NET applications becomes paramount.
OpenTelemetry offers a standardized approach to collecting telemetry data from your applications, making it easier to observe and understand their behavior. With Prometheus, you gain a scalable and flexible solution for storing time-series data, while Grafana provides the visualization and insights needed to interpret this data effectively.
Throughout this video, we'll explore the step-by-step process of setting up monitoring for your .NET applications using OpenTelemetry, Prometheus, and Grafana. From installation and configuration to creating dashboards that provide actionable insights, you'll learn everything you need to know to monitor your .NET applications like a pro.
Key Topics Covered:
Introduction to OpenTelemetry and its role in monitoring .NET applications.
Setting up Prometheus to store and query telemetry data efficiently.
Integrating Grafana to create visually stunning dashboards for monitoring.
Configuring instrumentation for .NET applications to collect telemetry data.
Exploring best practices for monitoring and troubleshooting .NET applications effectively.
Whether you're a seasoned developer looking to enhance your monitoring skills or a newcomer eager to explore the world of observability, this video provides valuable insights and practical guidance to help you monitor your .NET applications with confidence.
Don't miss out on this opportunity to elevate your monitoring capabilities and ensure the performance and reliability of your .NET applications. Watch now and unlock the full potential of OpenTelemetry, Prometheus, and Grafana for monitoring your .NET ecosystem.
LINKS
GitHub Repo Links
Program.cs github.com/developingwoot/Ope...
docker-compose.yml
github.com/developingwoot/Ope...
otel-collector-config.yml
github.com/developingwoot/Ope...
prometheus.yml
github.com/developingwoot/Ope...
ASP.NET OTEL Metrics | Grafana Labs grafana.com/grafana/dashboard...
.NET team Overview | Grafana Labs
grafana.com/orgs/dotnetteam x
Node Exporter grafana.com/grafana/dashboard...

Пікірлер: 18
@papciuszkin
@papciuszkin 16 күн бұрын
Great video! Really clear and to the point
@developingwoot
@developingwoot 16 күн бұрын
Thanks so much 🙏
@Pierre.69
@Pierre.69 Ай бұрын
Used prometheus and grafana for the first time today with your help, useful video, thanks!
@developingwoot
@developingwoot Ай бұрын
Awesome! I'm so glad to hear that. It's a super cool platform.
@rajeshk5211
@rajeshk5211 2 ай бұрын
Can you please extend the video including loki for logging
@developingwoot
@developingwoot 2 ай бұрын
Oh that's a good idea. I'll see what I can do. I hope you found what's there helpful.
@rajeshk5211
@rajeshk5211 2 ай бұрын
​@developingwoot The video is simple and straightforward, and it is indeed very useful. Thanks for your effort.
@KnowledgePlayTV
@KnowledgePlayTV 3 ай бұрын
can you please make a video on opentelemetry + .net core without docker? btw nice lecture and useful content.
@developingwoot
@developingwoot 3 ай бұрын
Yeah I could probably do something like that are you still thinking Prometheus and Grafana? I used Docker because it is really nice in that it just starts those services for you. But I'll see what I can do.
@KnowledgePlayTV
@KnowledgePlayTV 3 ай бұрын
@@developingwoot thank you for your reply.
@developingwoot
@developingwoot 3 ай бұрын
I've posted that video for you 👍
@KnowledgePlayTV
@KnowledgePlayTV 3 ай бұрын
@@developingwoot thank you so much for your effort.
@catex5452
@catex5452 2 ай бұрын
I want to track a dateTime value with System.Diagnostics.Metrics, OpenTelemetry, Prometheus and Grafana. Is that possible? Right now I did it with a counter where I add unix seconds but that's probably not optimal... If I could display the unix seconds as a date in grafana that would technically be enough though. Can you help?
@developingwoot
@developingwoot 2 ай бұрын
What specifically are you trying to track? For example are you trying to track the length of time it takes a request to complete?
@catex5452
@catex5452 2 ай бұрын
@@developingwoot I want to track the date + time when something got imported and the date + time of the next import. I just changed my logic to using two ObervableGauge's for it (lastImportTime, nextImportTime). Each returns a list of measurments containing a long value(unix timestamp) + tag. I basically just want to show two dates in my grafana dashboard. Last Import and next import.
@catex5452
@catex5452 2 ай бұрын
The tags consist of a key "environment" and a string which represent the type of document that got imported. I'd like to create dashboards for the different tags. for example lastImportedXmlDate, lastImportedJsonDate etc. So I want more than just two dates, sorry for the wrong information. Two dates per environment.
@developingwoot
@developingwoot 2 ай бұрын
@@catex5452 are you just wanting logs or are you charting this?
@catex5452
@catex5452 2 ай бұрын
@@developingwoot I'm not sure if I know what you mean. I think I just want to display stats. (I never worked with Grafana before) Here you can see my code: using System; using System.Diagnostics.Metrics; namespace Import.FileListener { public class MetricsManager { private Meter meter; private Counter importedCounter; private ObservableGauge lastImportTimeGauge { get; set; } private ObservableGauge nextImportTimeGauge { get; set; } private List lastImportTimes = new List(); private List nextImportTimes = new List(); // Singleton instance of MetricsManager private static readonly MetricsManager _instance = new MetricsManager("MetricsManager", "1.0.0"); public static MetricsManager Instance => _instance; private MetricsManager(string meterName, string meterVersion) { meter = new Meter(meterName, meterVersion); importedCounter = meter.CreateCounter("imported-files"); lastImportTimeGauge = meter.CreateObservableGauge("last-import-time", () => { return lastImportTimes; }); nextImportTimeGauge = meter.CreateObservableGauge("next-import-time", () => { return nextImportTimes; }); } public void SetImportTimes(string fileName, DateTime lastImport, int intervalSeconds) { long lastTime = new DateTimeOffset(lastImport).ToUnixTimeSeconds(); long nextTime = new DateTimeOffset(lastImport.AddSeconds(intervalSeconds)).ToUnixTimeSeconds(); lastImportTimes.Add(new Measurement(lastTime, new KeyValuePair("environment", fileName))); nextImportTimes.Add(new Measurement(nextTime, new KeyValuePair("environment", fileName))); } public void Increment(string fileName) { importedCounter.Add(1, new KeyValuePair("environment", fileName)); } } }
Forget Grafana And Prometheus! Start With This.
10:51
Nick Chapsas
Рет қаралды 44 М.
PromCon 2023 - Towards making Prometheus OpenTelemetry native
29:22
Prometheus Monitoring
Рет қаралды 1,1 М.
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 58 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 5 МЛН
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 8 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Server Monitoring OpenTelemetry Prometheus and Grafana on Windows
16:16
Getting Started with Event Sourcing in .NET
37:07
Nick Chapsas
Рет қаралды 48 М.
Leveraging OpenTelemetry for Your Prometheus Pipeline - Goutham Veeramachaneni, Grafana Labs
24:11
CNCF [Cloud Native Computing Foundation]
Рет қаралды 3 М.
You MUST Instrument Your Code With OpenTelemetry (OTEL)!
18:04
DevOps Toolkit
Рет қаралды 38 М.
Stackalloc and Spans
30:17
Coding Tutorials
Рет қаралды 9 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 52 М.
Log aggregation in Dotnet with Grafana and loki
13:51
Developing Woot
Рет қаралды 344
Practical OpenTelemetry in .NET 8 - Martin Thwaites - NDC London 2024
1:00:41
OpenTelemetry in  .NET Explained
32:54
Petabridge
Рет қаралды 15 М.
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 4 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 32 МЛН
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,1 МЛН
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН