Used prometheus and grafana for the first time today with your help, useful video, thanks!
@developingwoot7 ай бұрын
Awesome! I'm so glad to hear that. It's a super cool platform.
@dhiva0513 күн бұрын
Great video! How can OpenTelemetry be integrated with OpenSearch? I would also like to view the data on the OpenSearch dashboard.
@developingwoot12 күн бұрын
Good question. It shouldn't be too hard to do. I'll have to look into it
@dhiva0512 күн бұрын
@@developingwoot Thanks for the response! Looking forward to your insights.
@dhiva0512 күн бұрын
@@developingwoot Any update ???
@developingwoot12 күн бұрын
@@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
@developingwoot6 күн бұрын
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
@oladejiakomolafe55914 ай бұрын
Good. Clear and succinct explanation. Thank you
@developingwoot4 ай бұрын
I appreciate it, thanks so much!
@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Ай бұрын
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Ай бұрын
@@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.
@nadimkhoury80104 ай бұрын
nice, is there a way to then store the data in a postgreSQL data base
@developingwoot4 ай бұрын
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
@papciuszkin6 ай бұрын
Great video! Really clear and to the point
@developingwoot6 ай бұрын
Thanks so much 🙏
@catex54527 ай бұрын
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?
@developingwoot7 ай бұрын
What specifically are you trying to track? For example are you trying to track the length of time it takes a request to complete?
@catex54527 ай бұрын
@@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.
@catex54527 ай бұрын
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.
@developingwoot7 ай бұрын
@@catex5452 are you just wanting logs or are you charting this?
@catex54527 ай бұрын
@@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)); } } }
@rajeshk52118 ай бұрын
Can you please extend the video including loki for logging
@developingwoot8 ай бұрын
Oh that's a good idea. I'll see what I can do. I hope you found what's there helpful.
@rajeshk52118 ай бұрын
@developingwoot The video is simple and straightforward, and it is indeed very useful. Thanks for your effort.
@devanton-ioАй бұрын
Good, thank you.
@developingwootАй бұрын
You're welcome! I appreciate the comments. Was there anything that I didn't include that you wish was included?
@KnowledgePlayTV9 ай бұрын
can you please make a video on opentelemetry + .net core without docker? btw nice lecture and useful content.
@developingwoot9 ай бұрын
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.
@KnowledgePlayTV9 ай бұрын
@@developingwoot thank you for your reply.
@developingwoot8 ай бұрын
I've posted that video for you 👍
@KnowledgePlayTV8 ай бұрын
@@developingwoot thank you so much for your effort.