Monitoring .Net with OpenTelemetry Prometheus and Grafana

  Рет қаралды 6,273

Developing Woot

Developing Woot

Күн бұрын

Пікірлер: 38
@Pierre.69
@Pierre.69 7 ай бұрын
Used prometheus and grafana for the first time today with your help, useful video, thanks!
@developingwoot
@developingwoot 7 ай бұрын
Awesome! I'm so glad to hear that. It's a super cool platform.
@dhiva05
@dhiva05 13 күн бұрын
Great video! How can OpenTelemetry be integrated with OpenSearch? I would also like to view the data on the OpenSearch dashboard.
@developingwoot
@developingwoot 12 күн бұрын
Good question. It shouldn't be too hard to do. I'll have to look into it
@dhiva05
@dhiva05 12 күн бұрын
@@developingwoot Thanks for the response! Looking forward to your insights.
@dhiva05
@dhiva05 12 күн бұрын
@@developingwoot Any update ???
@developingwoot
@developingwoot 12 күн бұрын
@@dhiva05 it looks like it's possible and it doesn't appear to be to difficult but I won't have a chance to try it until this weekend
@developingwoot
@developingwoot 6 күн бұрын
So I worked on it this weekend and got everything running except I wasn't able to get the otel collector to successfully send to the data prepper. The prepper refused the connection. I want to try it in Kubernetes to see if it's something specific to docker compose or specifically my docker compose
@oladejiakomolafe5591
@oladejiakomolafe5591 4 ай бұрын
Good. Clear and succinct explanation. Thank you
@developingwoot
@developingwoot 4 ай бұрын
I appreciate it, thanks so much!
@rupenanjaria
@rupenanjaria Ай бұрын
Nice vide0, however, I am getting "System.NotSupportedException: 'Endpoint URI scheme (otel-collector) is not supported. Currently only "http" and "https" are supported.'" when trying to run. The error seems from program.cs builder configuration line. Any idea?
@developingwoot
@developingwoot Ай бұрын
I did get that error too at one point. It's been a minute and I can't remember what my solution was.. I think it had to do with something misconfigured in my appsettings but I'm not totally sure. If your code is in a public repo I'd be happy to dig through it and see if I can figure it out.
@rupenanjaria
@rupenanjaria Ай бұрын
@@developingwoot nm, I was able to run it. I was trying to run using visual studio command, instead I should use docker command, that was the issue. Thank you.
@nadimkhoury8010
@nadimkhoury8010 4 ай бұрын
nice, is there a way to then store the data in a postgreSQL data base
@developingwoot
@developingwoot 4 ай бұрын
Prometheus uses time series data and PostgreSQL isn't to my knowledge optimized for that type of data. There are other databases that are like influxdb and it supports remote read and write. I've never used it myself because we just haven't needed any additional storage solution up to this point
@papciuszkin
@papciuszkin 6 ай бұрын
Great video! Really clear and to the point
@developingwoot
@developingwoot 6 ай бұрын
Thanks so much 🙏
@catex5452
@catex5452 7 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
@@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 7 ай бұрын
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 7 ай бұрын
@@catex5452 are you just wanting logs or are you charting this?
@catex5452
@catex5452 7 ай бұрын
@@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)); } } }
@rajeshk5211
@rajeshk5211 8 ай бұрын
Can you please extend the video including loki for logging
@developingwoot
@developingwoot 8 ай бұрын
Oh that's a good idea. I'll see what I can do. I hope you found what's there helpful.
@rajeshk5211
@rajeshk5211 8 ай бұрын
​@developingwoot The video is simple and straightforward, and it is indeed very useful. Thanks for your effort.
@devanton-io
@devanton-io Ай бұрын
Good, thank you.
@developingwoot
@developingwoot Ай бұрын
You're welcome! I appreciate the comments. Was there anything that I didn't include that you wish was included?
@KnowledgePlayTV
@KnowledgePlayTV 9 ай бұрын
can you please make a video on opentelemetry + .net core without docker? btw nice lecture and useful content.
@developingwoot
@developingwoot 9 ай бұрын
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 9 ай бұрын
@@developingwoot thank you for your reply.
@developingwoot
@developingwoot 8 ай бұрын
I've posted that video for you 👍
@KnowledgePlayTV
@KnowledgePlayTV 8 ай бұрын
@@developingwoot thank you so much for your effort.
Implementing the Result Pattern In ASP.NET API
16:50
Codewrinkles
Рет қаралды 5 М.
Forget Grafana And Prometheus! Start With This.
10:51
Nick Chapsas
Рет қаралды 50 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 64 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 37 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 28 МЛН
Server Monitoring // Prometheus and Grafana Tutorial
24:36
Christian Lempa
Рет қаралды 685 М.
Александр Пугач - Метрики в .NET на примере OpenTelemetry и Prometheus
59:57
DotNext — конференция для .NET‑разработчиков
Рет қаралды 3,1 М.
Getting Started with OpenTelemetry in .NET
23:38
dotnet
Рет қаралды 1,3 М.
The Great Debate: OpenTelemetry or Prometheus?
5:29
Software With Shawn
Рет қаралды 1 М.
Server Monitoring OpenTelemetry Prometheus and Grafana on Windows
16:16
Install Prometheus & Grafana on Kubernetes (kube-prometheus-stack)
24:24
What's New for ASP.NET Core & Blazor in .NET 9
40:26
dotnet
Рет қаралды 27 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19