Monitoring .Net with OpenTelemetry Prometheus and Grafana

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

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.
@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)); } } }
@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.
Stackalloc and Spans
30:17
Coding Tutorials
Рет қаралды 9 М.
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 136 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 176 МЛН
You MUST Instrument Your Code With OpenTelemetry (OTEL)!
18:04
DevOps Toolkit
Рет қаралды 38 М.
Server Monitoring OpenTelemetry Prometheus and Grafana on Windows
16:16
Build an SQL Agent with Llama 3 | Langchain | Ollama
20:28
TheAILearner
Рет қаралды 2,2 М.
PromCon 2023 - Towards making Prometheus OpenTelemetry native
29:22
Prometheus Monitoring
Рет қаралды 1,1 М.
Leveraging OpenTelemetry for Your Prometheus Pipeline - Goutham Veeramachaneni, Grafana Labs
24:11
CNCF [Cloud Native Computing Foundation]
Рет қаралды 3 М.
Coding Shorts: .NET Aspire - Using OpenTelemetry
10:52
Shawn Wildermuth
Рет қаралды 1,1 М.
Tracing Your Jenkins Pipelines With OpenTelemetry and Jaeger
12:11
Server Monitoring with Grafana Prometheus and Loki
51:44
Piyush Garg
Рет қаралды 38 М.
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,1 МЛН
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 52 МЛН