Creating Dashboards with .NET 8’s New Metrics!

  Рет қаралды 71,071

Nick Chapsas

Nick Chapsas

10 ай бұрын

Check out my courses: dometrain.com
Become a Patreon and get source code access: / nickchapsas
Hello everybody, I'm Nick, and in this video, I will show you how you can use the new built-in metrics of .NET 8, expose them and scrape them using Prometheus as well as build dashboards with them using Grafana.
Workshops: bit.ly/nickworkshops
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: bit.ly/ChapsasGitHub
Follow me on Twitter: bit.ly/ChapsasTwitter
Connect on LinkedIn: bit.ly/ChapsasLinkedIn
Keep coding merch: keepcoding.shop
#csharp #dotnet

Пікірлер: 113
@julienraillard3567
@julienraillard3567 10 ай бұрын
Sounds really interesting, would really love to have a video from you explaining how to setup a prometheus and grafana instances in a real-world use case :)
@JasonTira
@JasonTira 10 ай бұрын
I second this
@modernkennnern
@modernkennnern 10 ай бұрын
I third this!
@youssefwael8
@youssefwael8 10 ай бұрын
I fourth this
@kristofturanszki4201
@kristofturanszki4201 10 ай бұрын
+1
@balagurunathanmarimuthu2807
@balagurunathanmarimuthu2807 10 ай бұрын
+1
@thabisom
@thabisom 10 ай бұрын
Hi @Nick. Yes, please do a separate video for configuring Grafana from scratch. Thank you for all your hard work.
@Dominik-K
@Dominik-K 10 ай бұрын
I would love to see more about Grafana and Prometheus too
@PanMaciek
@PanMaciek 10 ай бұрын
Dashboards are tricky, having concise and readable dashboards is what I want in my life, that video would be super useful to get inspired 😄Who does not want to see numbers going up/down 😄
@MrVarsium
@MrVarsium 10 ай бұрын
yes please, another nice video! and i'm glad that metrics are getting a boost, i would love to see a prometheus/grafana video next! ^^
@IgorStojkovic
@IgorStojkovic 10 ай бұрын
The key thing missing in all these "add metrics" tutorials is how to secure the /metrics endpoint so it is not available to users of your API. There are no good defaults or explanations on that and it can lead to security leaks.
@ahmedabd-a6
@ahmedabd-a6 9 ай бұрын
I was able to use basic auth to secure the /metrics endpoint
@Daniel15au
@Daniel15au 8 ай бұрын
It's a regular HTTP endpoint so any middleware for protection of endpoints could be used.
@dauchande
@dauchande 9 ай бұрын
Nice to see Grafana and Prometheus get the love they so richly deserve. Developers need to instrument their code more so they actually know what it's doing in Production.
@poteb
@poteb 10 ай бұрын
You can get full stats on all your endpoints without adding anything to each method. This way you won't forget to add them manually. Adding a few extra nugets and you can do this: services.AddOpenTelemetry().WithMetrics(m => m.AddAspNetCoreInstrumentation().AddHttpClientInstrumentation().AddRuntimeInstrumentation().AddProcessInstrumentation().AddPrometheusExporter() This will also give you metrics on the hosting environment. Brilliant stuff. We use Grafana a lot at work, but please do make a video about it, I might learn something new :)
@SupBoiii
@SupBoiii 10 ай бұрын
More Prometheus and Grafana video please, this is a great one!
@xDan2710
@xDan2710 10 ай бұрын
This came right at the right time. I am in the process of building some Grafana dashboards with custom metrics for some of my applications, so this definitely will come in handy! I would definitely be interested in a more in-depth video.
@danielgil3825
@danielgil3825 10 ай бұрын
Would be great to have more grafana videos 😍
@mrtac_
@mrtac_ 10 ай бұрын
This .NET 8 built-in feature in combination with Prometheus & Grafana is incredible helpful for systems operation & observability. Thank you Nick for sharing this and also providing the Grafana dashboards!
@benlewies8828
@benlewies8828 10 ай бұрын
This is an excellent development. Great video! Yes, definitely do an in-depth video!
@systemslave510
@systemslave510 10 ай бұрын
I want a *deep* dive into this. Been tring to figure out how to do it for a while. Thank you Nick
@michaelweaver4439
@michaelweaver4439 10 ай бұрын
This looks amazing!! - more please!
@danclarkeuk
@danclarkeuk 10 ай бұрын
Very nice. I'm already using Grafana and Prometheus, so will be super-easy to take advantage of these new metrics! The IMeterFactory is a really nice addition too! 🙂
@milans0713
@milans0713 10 ай бұрын
This is a superb stuff. Would love to have more content on Prometheus and Grafana with .NET Apps.
@ikenwakochukwudi9395
@ikenwakochukwudi9395 10 ай бұрын
Good content Nick. I would love to see the detailed video on Grafana.
@StephenYeadon
@StephenYeadon 10 ай бұрын
Great content as always. A video on Graphana and Prometheus would be amazing. Possibly a video on something like Dapr would be good too and how you might incorporate the metrics with the sidecar metrics generated by dapr.
@GiovanniOrlandoi7
@GiovanniOrlandoi7 10 ай бұрын
Great video! Would love more Prometheus and Grafana content.
@xavier.xiques
@xavier.xiques 10 ай бұрын
Really interesting. Thanks Nick!
@fifty-plus
@fifty-plus 10 ай бұрын
Prometheus and Grafana are very useful tools, Loki too. Good content as always Nick.
@EzequielRegaldo
@EzequielRegaldo 10 ай бұрын
Oh my godness ! We need it ! Please ! Thank you so much for this content Nick !
@gholdridge
@gholdridge 10 ай бұрын
Looks great Nick - Love to see Grafana video too!
@AndyMehalick
@AndyMehalick 9 ай бұрын
Whenever you ask: "would you like to see a separate video on X?" the answer is always YES! Anything related to OpenTelemetry would be awesome, Prometheus and Grafana included
@yoanashih761
@yoanashih761 10 ай бұрын
Hi, Nick great content as always! Could you please do more video about telemetry and other devops-related topic? Thanks.
@hernanar3647
@hernanar3647 10 ай бұрын
This is a interesting topic, I might create whole a pipeline behavior to my framework from this. Thanks Nick!
@tanglesites
@tanglesites 10 ай бұрын
That looks interesting. Now I want to build my own dashboards. You could put that into its own microservice on an api and use event sourcing to not only record but have the visual to aid your system as well. Then you can record how your system is communicating with eachother. I might incroporate this into my Capstone. Great video Nick, as usual.
@acmesoft
@acmesoft 10 ай бұрын
I want a grafana video!. Good content as always!!!
@Subjective0
@Subjective0 10 ай бұрын
I had a super hard time trying to set it up for a school project. I would really love to learn how I actually should have done it!
@sanampakuwal
@sanampakuwal 10 ай бұрын
yes want grafana videos, keep up the good work
@antonmartyniuk
@antonmartyniuk 10 ай бұрын
Looks great. Please make a video about Grafana and Dashboards in depth
@portlyoldman
@portlyoldman 10 ай бұрын
Yes please for Grafana, metrics arc videos!
@qniken8770
@qniken8770 10 ай бұрын
Great video as always. It would be nice if you could give us an example how to build up kestrel with prometheus and grafana :)
@THILLAIRAJA24
@THILLAIRAJA24 10 ай бұрын
Thanks for sharing this.
@JunaidBedford
@JunaidBedford 10 ай бұрын
Yes Grafana videos. Thanks
@r-naotwo6290
@r-naotwo6290 10 ай бұрын
Yes! A video on prometheus and grafana pleeeeeaaase!
@nove1398
@nove1398 10 ай бұрын
Yes more Grafana videos of course!
@simeonnov
@simeonnov 10 ай бұрын
This is interesting, thank you. I would love it if you made a video about ways to do reporting in .NET. Something similar to crystal reports but obviously the modern way of doing things. Are there any such tools?
@miguelcervantes629
@miguelcervantes629 10 ай бұрын
A grafana video would be great! Amazing video
@georgekopadze791
@georgekopadze791 4 ай бұрын
Hello Nick, Thank you for your effort to do that wonderful KZbin videos. Please, it's gonna be really useful if you create a video explaining grafana and prometheus. Thank you
@rmichaeldeutsch
@rmichaeldeutsch 10 ай бұрын
Cool stuff! 😎 Is there a way to ignore specific endpoints from metric tracking? (ex: healthchecks, metric scraping, etc.)
@Yupmoh
@Yupmoh 10 ай бұрын
+1 for a Prometheus / Grafan video! :D
@jamesjanse3731
@jamesjanse3731 10 ай бұрын
Would love to see Grafana and Prometheus video!
@samuelantony3934
@samuelantony3934 10 ай бұрын
Really interesting, please explain about the setup of prometheus.
@marchenkoalexandr
@marchenkoalexandr 10 ай бұрын
You definitely want take a look at OpenTelemetry Operator with its Autoinstrumentation, it will do the same and even more (traces) without the need to touch the app at all. (The only downside it is totally not ready yet for realistic usage, but is really promising)
@jackkendall6420
@jackkendall6420 10 ай бұрын
I would love to see your overview of OpenTelemetry in general!
@JustNightmare
@JustNightmare 9 ай бұрын
Graphana video would rock!
@devmarkmonster
@devmarkmonster 10 ай бұрын
Interesting Video. The problem I always face is the amount of metrics that are shared by default. Same as logging, configuring it to right levels is very important. I’m afraid that the default metrics cause for GBs of data very easily. Another thing I could use some guidance on is the combination of logging, traces and metrics with Open Telemetry and what kind of visualization tool to use that supports all of them.
@cristianodias3529
@cristianodias3529 10 ай бұрын
Yes! Please create a YT video that goes deep in Grafana!
@07309415
@07309415 10 ай бұрын
Would love a video on Grafana
@markhenderson5283
@markhenderson5283 10 ай бұрын
I was working on Grafana today. So I'd like to see a video about it.
@ytvandre
@ytvandre 10 ай бұрын
Is this is a replacement for AppInsights telemetry SDK? Would love to see a video about integrating this with azure monitor
@evanboltsis
@evanboltsis 10 ай бұрын
How about a full course on dometrain for grafana-prometheus and advanced metrics :)
@DasturlashniOrganamiz
@DasturlashniOrganamiz 10 ай бұрын
I have migrated my OSS project (called CashOverflow) to .NET 8. Live metrics is not supported yet. If I setup what you taught in my project, is it going to smoothly work in my prod as well? Or is there any additional setup needed for azure service app?
@stoyangrigorov5634
@stoyangrigorov5634 10 ай бұрын
awesome
@ghak992
@ghak992 10 ай бұрын
Yes please make the more depth video its look very promising,, thank u for shating
@youssefwael8
@youssefwael8 10 ай бұрын
Please make a video on exporting to OpenTelemetry Collector instead of Prometheus directly. Thank you and Keep Coding. 😁
@marchenkoalexandr
@marchenkoalexandr 10 ай бұрын
You do not want separate them, even more you want Prometheus for automatic metrics from traces
@obinnaokafor6252
@obinnaokafor6252 10 ай бұрын
Another amazing job by Microsoft and the dotnet team.
@Tymonello
@Tymonello 7 ай бұрын
How OpenTelemetry compares to AppMetrics? Is it better / newer /more features, or basically the same thing, but by other people?
@sikor02
@sikor02 10 ай бұрын
When I saw _meterFactory.Create and meter.CreateCounter called whenever there's a GET request, I thought it was a mistake and you will always get 1 in Grafana in best case. Just by reading the code it looks like you create a new meter/instrument every time.
@gunnarliljas8459
@gunnarliljas8459 10 ай бұрын
Indeed
@VladyslavHorbachov
@VladyslavHorbachov 10 ай бұрын
We need Grafana video!
@thegautamnayak
@thegautamnayak 6 ай бұрын
Is decorater pattern a better place to write metrics logic?
@cezarpimentel
@cezarpimentel 10 ай бұрын
Please, do a Graphana video! ❤️
@alainl8069
@alainl8069 10 ай бұрын
How to use metering and Grafana to monitor API services would be an interesting course in Dometrain
@dvanrooyen1434
@dvanrooyen1434 10 ай бұрын
Nick is there a log exporter for filebeats?
@musigahstallone
@musigahstallone 3 ай бұрын
hello is this the same as the modern day aspire dashboard
@StigBrembo
@StigBrembo 10 ай бұрын
Hi Nick. Have you stopped using minimal api? From your latest videos I only see you using controllers?
@ClAddict
@ClAddict 9 ай бұрын
Why was the meter created within the api call? Seems like that would new and dispose the metric way more frequently than it should.
@IgorRovitsky
@IgorRovitsky 10 ай бұрын
Looks promising, but I wonder how this might be used in a situation when the API is replicated in Swarm or k8
@Daniel15au
@Daniel15au 8 ай бұрын
I'd recommend VictoriaMetrics instead of Prometheus. It's fully Prometheus-compatible (supports Prometheus endpoints and the Prometheus integration in Grafana), but the storage format is more efficient.
@williameisenman5538
@williameisenman5538 10 ай бұрын
Please Make a Dedicated Grafana Video. This is quite interesting, indeed.
@R0ckyRocket
@R0ckyRocket 10 ай бұрын
can it measure excecution time of a specific function ?
@nwr0x
@nwr0x 10 ай бұрын
This is really nice, but I wonder where does dotnet-monitor lands with this.
@nocgod
@nocgod 10 ай бұрын
the last point we have to solve is the redundant requirement to register the Meter by string in the exporter and create it in your code through a factory. its a cludge imho
@StephenMoreira
@StephenMoreira 10 ай бұрын
Yes.
@VladimirKhil
@VladimirKhil 10 ай бұрын
What is the difference between app.UseOpenTelemetryPrometheusScrapingEndpoint() and app.MapPrometheusScrapingEndpoint() calls?
@zakariabenmassaoud
@zakariabenmassaoud 10 ай бұрын
Yes please! Grafana Grafana Grafana, and maybe how to create metrics
@teodorchirileanu
@teodorchirileanu 9 ай бұрын
I want grana video!
@orthodox-4-ever
@orthodox-4-ever 10 ай бұрын
We want Grafana video 👋
@goremukin1
@goremukin1 10 ай бұрын
Where are the metrics stored until Prometheus takes them?
@bobmarley8334
@bobmarley8334 4 ай бұрын
Awesome ideia to not share the code or even a repository! Thanks!
@mhDuke
@mhDuke 9 ай бұрын
please do grafana video
@Levonfly
@Levonfly 10 ай бұрын
Please separate video for Grafana
@ryanzwe
@ryanzwe 10 ай бұрын
Now this sounds interesting
@JonWoo
@JonWoo 10 ай бұрын
So we don't need new relic anymore? :)
@leadscollector
@leadscollector 10 ай бұрын
Ahhh here we go. Danka
@RichardBeales
@RichardBeales 10 ай бұрын
I think the meter / gauge instances are supposed to be re-used, we've seen problems with creating them on every request.
@EspenSkaufel
@EspenSkaufel 7 ай бұрын
They are, it is implemented in the DefaultMeterFactory
@tuberklz
@tuberklz 3 ай бұрын
maybe graphana is on the way?
@saidyeter
@saidyeter 10 ай бұрын
nice haircut
10 ай бұрын
throw new Exception("Shit hit the fan"); Good thing I'm not a fan then 😬
@UnbiasedThamizhan
@UnbiasedThamizhan 11 күн бұрын
You are good but very fast please do it with patience
@georgeteach7067
@georgeteach7067 6 күн бұрын
Just set your playback speed to .75
@E_G_
@E_G_ 10 ай бұрын
Great tool to use, thank you for sharing
@soonhongng7037
@soonhongng7037 24 күн бұрын
In .NET 8, their latest package has changed DI methods its no longer, app.MapPrometheusScrapingEndpoint(). rather, its either of following: 1. app.UseOpenTelemetryPrometheusScrapingEndpoint(); 2. app.UseOpenTelemetryPrometheusScrapingEndpoint( context => context.Request.Path == "/internal/metrics" && context.Connection.LocalPort == 5067);
Dependency Injection Is Now Complete In .NET 8!
9:49
Nick Chapsas
Рет қаралды 88 М.
Getting Started with OpenTelemetry in .NET
19:56
Nick Chapsas
Рет қаралды 48 М.
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 8 МЛН
Sprinting with More and More Money
00:29
MrBeast
Рет қаралды 170 МЛН
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 13 МЛН
Forget Grafana And Prometheus! Start With This.
10:51
Nick Chapsas
Рет қаралды 43 М.
Why Developers Hate "Clean Code"?
14:39
Nick Chapsas
Рет қаралды 48 М.
The New .NET 9 HybridCache That You Must Upgrade To!
14:34
Nick Chapsas
Рет қаралды 43 М.
Why Startups Hate .NET and C#
10:38
Nick Chapsas
Рет қаралды 243 М.
WHY and HOW to Add .NET Aspire to ANY .NET API and Web App in Minutes
22:02
The Blazor Competitor is Here!
15:08
Nick Chapsas
Рет қаралды 55 М.
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 8 МЛН