![Vasilii Oleinic](/img/default-banner.jpg)
- 41
- 60 430
Vasilii Oleinic
Romania
Registrace 20. 08. 2013
Helping developers build enterprise level software using .NET & C#.
.NET Core Configure Open telemetry & enhance your automated testing setup
✅ Free Testing & Detailed design newsletter: voleinic.substack.com/
✅ Use MREADY_20 or MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/
✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii
In this video I'm going to show you how you can set up Open telemetry in a .NET Core based distributed system. Additionally we are going to look into how you can make use of the Open telemetry inside your automated tests using xUnit.
This is part 1 of a potential series so if you've enjoyed the video let me know in the comment section. Depending on the feedback I will decide on the continuation of this series.
0:00 Intro & problem faced
0:50 Set up overview
2:00 What is OTEL?
3:55 Getting started with OTEL
6:36 Setting up Logging
8:27 Setting up Tracing
10:21 Setting up a basic Trace Processor
11:20 Setting up Metrics
12:40 Sampling in OTEL
15:10 Head sampling in .NET
19:28 Shameless promo
19:42 Demo of the setup
23:02 Next steps for leveraging OTEL
25:41 Setting up OTEL with Unit Tests
28:57 Setting up OTEL with Integration/Subcutaneous Tests
34:50 Setting up OTEL with E2E Tests
37:00 Afterthoughts
✅ Use MREADY_20 or MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/
✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii
In this video I'm going to show you how you can set up Open telemetry in a .NET Core based distributed system. Additionally we are going to look into how you can make use of the Open telemetry inside your automated tests using xUnit.
This is part 1 of a potential series so if you've enjoyed the video let me know in the comment section. Depending on the feedback I will decide on the continuation of this series.
0:00 Intro & problem faced
0:50 Set up overview
2:00 What is OTEL?
3:55 Getting started with OTEL
6:36 Setting up Logging
8:27 Setting up Tracing
10:21 Setting up a basic Trace Processor
11:20 Setting up Metrics
12:40 Sampling in OTEL
15:10 Head sampling in .NET
19:28 Shameless promo
19:42 Demo of the setup
23:02 Next steps for leveraging OTEL
25:41 Setting up OTEL with Unit Tests
28:57 Setting up OTEL with Integration/Subcutaneous Tests
34:50 Setting up OTEL with E2E Tests
37:00 Afterthoughts
zhlédnutí: 550
Video
Web Application architecture
zhlédnutí 6KPřed 5 měsíci
✅ Use MREADY_20 or MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ Links to related content: Reverse proxy with YARP : czcams.com/video/C8kWGjXGfr4/video.htmlsi=WWgHqMSJUiRSz-yV Ext...
.NET - Building an API gateway using YARP
zhlédnutí 860Před 5 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ 0:00 Intro 0:43 Basic set-up 8:52 Custom Load balancing 10:48 Rate limiting 13:00 Automatically add correlation id PS: the tena...
.NET | External configuration using Spring Cloud Config and GitHub repository
zhlédnutí 315Před 8 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ Hello everyone in this video we will set-up an external configuration using Spring Cloud Config and a GitHub repository.
.NET | CI setup using GitHub actions and Nuke build automation
zhlédnutí 677Před 9 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ In this video we are going to take a look at how we can create a CI pipeline by using GitHub actions and Nuke, a build automati...
.NET | Add Feature flags to your application
zhlédnutí 654Před 9 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ In this video we will cover how you can add all kinds of useful feature flags to your .NET Core API. 0:00 Use cases for feature...
.NET | Healthchecks easy set up
zhlédnutí 580Před 9 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ In this video we will go over how you can easily add healthchecks to monitor your dotnet core api.
.NET | Log into Elasticsearch using Serilog and view logs in Kibana
zhlédnutí 4KPřed 10 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ Serilog & SEQ setup: - czcams.com/video/xMJfTFiPn0I/video.htmlsi=9d6U83-ymowE1HdG In this video we will take a look at how you ...
.NET | Basic to Advanced versioning for Minimal API’s
zhlédnutí 479Před 10 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ In this video we will discover how we can add different versioning strategies (URL/QueryParams/Header/MediaType) to our Minial ...
.NET | Global Exception handling using built in middleware
zhlédnutí 408Před 10 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: voleinic.substack.com/ In this video we will go over 2 setups you can use to leverage the built-in exception Handling mechanisms in dotnet core. 0:00 ...
.NET | Easiest way to run background jobs with Hangfire
zhlédnutí 1,2KPřed 10 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: (voleinic.substack.com/) In this video we will go over how we can run background jobs in dotnet core based applications using Hangfire. 0:00 Setup usi...
.NET | Async messaging using MassTransit in under 10 minutes
zhlédnutí 1,2KPřed 10 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: (voleinic.substack.com/) In this video we will cover (totally opinionated) one of the best libraries to when it comes to async communication aka MassT...
.NET | Outbox design pattern in under 10 minutes
zhlédnutí 1,8KPřed 11 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: (voleinic.substack.com/) In this video we will cover the Outbox pattern which will help us increase the reliability of our async communication between...
.NET | Using MongoDb in under 20 minutes.
zhlédnutí 531Před 11 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: (voleinic.substack.com/) In this video we will cover how you can use MongoDb as a database inside your applications and why it cloud be a good thing f...
.NET | Response, Output & Distributed Cache | Patterns of working with Cache
zhlédnutí 627Před 11 měsíci
✅ Use MREADY20 to get 20% off the brand new "From ground zero - Microservices ready Architecture" Course : vasiliioleinic.com/ ✅ Become a Patreon and get access to the source code: www.patreon.com/OleinicVasilii ✅ Free Detailed design newsletter: (voleinic.substack.com/) In this video we are going to cover the ways we can work with Cache. Link to decorator pattern video: - czcams.com/video/MiBZ...
.NET | DDD Specification Design Pattern In under 10 minutes
zhlédnutí 3,5KPřed rokem
.NET | DDD Specification Design Pattern In under 10 minutes
.NET | Communication patterns inside a Modular-Monolith
zhlédnutí 2,2KPřed rokem
.NET | Communication patterns inside a Modular-Monolith
.NET Architecture | Building a Notification System using the Modular-Monolith approach
zhlédnutí 7KPřed rokem
.NET Architecture | Building a Notification System using the Modular-Monolith approach
API Integration Testing Basics #5 - performance testing using k6
zhlédnutí 954Před rokem
API Integration Testing Basics #5 - performance testing using k6
.NET Core Integration Testing Basics #4 - Synthetic Data with Bogus
zhlédnutí 629Před rokem
.NET Core Integration Testing Basics #4 - Synthetic Data with Bogus
.NET Core Integration Testing Basics #3 - Remove 3rd party API dependencies from your Tests
zhlédnutí 979Před rokem
.NET Core Integration Testing Basics #3 - Remove 3rd party API dependencies from your Tests
.NET Core Integration Testing Basics #2- Infrastructure pre-provisioning & Data Cleanup
zhlédnutí 2,1KPřed rokem
.NET Core Integration Testing Basics #2- Infrastructure pre-provisioning & Data Cleanup
.NET Minimal API part 10 - Working with the widgets
zhlédnutí 253Před rokem
.NET Minimal API part 10 - Working with the widgets
.NET Minimal API part 9 - Pragmatic Endpoint Registry
zhlédnutí 547Před rokem
.NET Minimal API part 9 - Pragmatic Endpoint Registry
.NET Minimal API part 8 - Structuring a minimal API project
zhlédnutí 2,9KPřed rokem
.NET Minimal API part 8 - Structuring a minimal API project
.NET Minimal API part 7 - Data Access Layer with EF Core best practices
zhlédnutí 1,3KPřed rokem
.NET Minimal API part 7 - Data Access Layer with EF Core best practices
.NET Minimal API Part 6 - Swagger setup practices
zhlédnutí 512Před rokem
.NET Minimal API Part 6 - Swagger setup practices
.NET Minimal API Part 5 - Middleware vs Filters
zhlédnutí 2,4KPřed rokem
.NET Minimal API Part 5 - Middleware vs Filters
Hi Vasily, it's really useful data. Do more.
Вася я ничего не понел ты нудный
think you.......please continue
Thank you so much
Thanks for the great content. I have a question regarding the database cleanup process. Should it really be inside a ClassFixture<T>? My concern is that each test should be independent, and with the current approach, we are using the same data across multiple tests within the test class. Is that correct?
Hi, yes, IMO the cost of spinning up a new instance of the API and Database for every test method in a class is overkill. This is why we spin up one api/db/etc per test class, hence we need that cleanup process which efectively resets the whole setup to a clean/default state after every test method. Edit just to make clear: if the clean-up process works correctly the data generated by a test should not be there when the next test runs, and every test will run against an clean* database.
Great video, I can't seem to resolve IApiMarker - is that because of a particular nuget package I'm missing, usually VS is good about pointing that out. Any help is appreciated.
Hi, thats an empty marker interface I created in part 1 inside the API
@@vasiliioleinic Oh sorry I must have skipped part 1. Thank you!
That's really great keep going ! .
so far the best tutorial for integration testing thank you :)
There is a currently on-going newsletter completely dedicated to automated testing in .NET which covers even more ground :)
Thank you Vasilii!
Great video. Thank you
Hi Vasilii, thanks for the useful video! I wanted to ask though, is it possible to set up authentication for elasticsearch as well as kibana? We can imagine that if we deploy this to production, there might be sensitive data that we don't want just anyone to access. thanks!
incredible coruse, but damn, its way above my current capabilities, hopefully will return to this playlist later :] Thanks
Looks so complicated. Great video!
Very objective. Which VS Code extension is this?❤
Hi it’s excalidraw.
What is you the drawing plugin for VSCode you are using ???. "excalidraw extension" - saw it another comment.
Hi yes, it's excalidraw :)
nice video
Oh man! This really shows how complicated things have gotten :) But very nice presentation and description 👏
brother, the way you talk, I can't understand it on 2x speed. A little annoying. Love the content though
What sort of asshole comes and complains to someone who is sharing their knowledge for free that their accent is difficult to understand? You clearly don't have the mental capacity and dedication required to learn to speak a 2nd language. Watch the video slower or, preferably, not at all - and instead reflect on how you can become a less substandard human
excellent video, thanks!! Really appreciate the efforts!!
Hi sir. I could not apply the discount ticket, it says Invalid 😢
Hi, sorry for the issue, can you try again with either MREADY20 or MREADY_20.
can i know what IDE you are using?
Hi, its Rider from Jetbrains.
Nice video, how did you setup drawing tool on the editor
Hi thx, its VSCode with the excalidraw extension.
Please do video 📹 tutor on drawing tools extension thanks 😊
Hola, muchas gracias por el video!! Podrías por favor hacer una explicación de como configurarlo con https... Parece que no es tan sencillo como con http :(
Hello i just subcribe to your patreon to get the source but i can't find it.
Hi, first of all thank you for the sub, second can you check again? Seems it got taken down sometime ago, so I just re-uploaded it.
if i add a secret, it asks for a password for parameters.json.But, in github actions I cannot write it or pass as a environment secret
Hi dear. Which version of .net are you using in your course?
This one was using .net7 at the time of recording.
@@vasiliioleinic thanks! Just to avoid confusion I was talking about your paid course...is it .net7?
@@davidpccode The source code for the course is .NET7. There is WIP to update it to .NET8, however the changes (introduced in .NET 8) have a really small impact on the scope of the course itself. (mostly NuGet packages upgrades)
@@vasiliioleinic Perfect .net 7 is perfect... i'm going to buy your course...thanks!!
Hope you will enjoy it, and as always any feedback is welcome.
Excelent content Vasilii! Congratulations.
what about issue with running tests in parrallel - it will save my life
Can you elaborate on that a bit?
Using a background service can be a more suitable approach? Or can i just use Quartz jobs for this processing.
Yes as mentioned in the video in most simple scenarios you can use a native background service just fine. Now things start getting interesting as time progresses, for example if you deploy multiple instances of your app then you will have to ensure that the background service runs only on one of them, and I don't mind reinventing the bicycle when learning stuff, but for production/live projects you are better off with a library that has that functionality built in, in my humble opinion.
What about the inbox pattern?
Thanks for the informative video. I don’t get all the hype from Microsoft around minimal APIs. No real enterprise app is going to have a bunch of delegates in startup code.
Well you are right it's not going to be a bunch of delegates in the startup code. Most likely everyone will create a class for the middleware/filter and implement it there and just wire it up later on. I'm currently using the MinimalAPI's for a couple of projects in live and have no real issue with it so far.
How does the outbox implementation in this video actually protect you against getting out of sync? If I save some details in on DBContext (call it CustomersDbContext) and then raise a CustomerCreatedEvent, my CustomerCreatedEvent could fail to be written to the outbox due to a network error, but the original save to the CustomersDbContext would have commited.
Im new to MassTransit and I get confused overt the naming convention, I understand you are setting up the broker, dbcontext, and mass transit on the same Installer class, but why are you loading also the consumers?, Aren't they supposed to be on the other end of the transmission, ie, on another machine receiving the messages? thanks.
It can be both ways. If you split your solution using logical boundaries(aka modules in this case) any module can listen to events/messages that come from another module.A system might get deployed as a monolith with only logical boundaries or as a set of services with logical and physical boundaries, the choice is yours. As well as the choice of the provider, if you deploy everything as a single unit then you might opt in to use an in-memory provider, if you go the distributed route you will opt in for smth like rabbitmq.
Also there might be cases where you trigger some heavy background job that requires a lot of processing power so you might opt in to add a consumer on a separate ie machine that will do the heavy lifting there and thus offload.
Nice tutorial. I'm very interested in your project :)
you need to fix audio, level is too low
Will fix that in later videos.
Thanks for video, I want to ask about the index page, the 2 rows of notification -system with date, should we create them by ourselves or they were created by Elasticsearch?
They are created automatically with the provided format, that is if you configured them in app-settings like in the video :) Edit : line 35 i the appsettings.json is where you specify the format of how you want your indexes to be called.
@vasiliioleinic Thanks for reply, but there is an error related to ssl certificate raised when I run the project locally: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot , I have searched more about it to be configured in C# project windows, but the problem still, any idea?
Sorry never had that issue myself, will have to take a look once im free and come back to you if and when I find something.
Hey Vasilii 😄 I have a question ➡ how do you see the MassTransit Outbox Pattern in a modular monolith app. Important note is that I have separate DbContext implementation for each module of course. They all inherit from abstract ApplicationDbContext class. I thought about 2 solutions: - separate DbContext only for MassTransit outbox specific stuff - per module MassTransit registration - if it even is possible 😅 Hope you have some solution to this 🥹
Hi, good question, personally I would go with a separate DbContext for the outbox. At least thats how I went with it in the course on ModularMonoliths Im working on right now 😅 (not the CZcams series) so the answer is opinionated in that regard. Edit: nearly forgot about it : also take into account that MassTransit has a default in-memory Outbox by default, with some limitations of course.
@@vasiliioleinic I've tried to do this, but something doesn't work for me 🫤 I've created separate OutboxDbContext for MassTransit Inbox/Outbox related stuff, but not a single message gets persisted in a database, so something is definitely wrong 🥲 Can you share any details about the ModularMonoliths course? It seems interesting and I feel this is something that could save me 😄
@@drozdgabriel regarding message persistence, try maybe injecting the RegistrationDbContext and calling the SaveChanges method. If it works you can create a small wrapper around the message publisher endpoint and DbContext to not expose it's internal details then. Edit: sorry for long response for some reason CZcams decided not to notify me on this comment...
If we are talking about architecture lest talk about SMART - business value (internal, external), time taken to develop this one vs using something that exists on the market, how you measure the code quality and shipeables, the deployment, operational and hosting infrastructure costs, the revenue it returns, the extensibility over time, and the list can go on😀 Note aside - the project structure & namings can be improved 😜 Even some likes this option of having cool magic stuff like directory.package.props you need to take in consideration that not all your services can use the same package version and some might need to be "locked", and you kind want to avoid creating one directory.package.props per solution. Sometimes this works, sometimes it does not - it's kind of the same scenario as the hypermedia trend (HATEOAS).
Thanks for the feedback, noted about the naming improvements, and indeed the “locking” is a thing I missed here. Regarding the first bit there it is going to be part of a follow up series afterwards as it is a huge undertaking for a simple CZcams series in my opinion :)
I was wondering how can you take the endpoints logic away from the program class. Your mapping solution is beautiful! thanks man!!! awesome approach.
Fonts are somewhat lower for this video due to an error on my part seen only on editing. Starting next video it will return back to normal size. 🫡
bro you should change your screen size unfortunately it is not clear as expected too small to watch command line
Yeah sorry about that, saw that only during post edit… the other latest videos on the channel should have the font increased tho…
All is fine with my resolution and all is readable.
good
Hey man, nice bedroom, but maybe just put up a new background so i am not distracted by your bedspread pattern.
What is the benefit of using RabbitMQ inside of the modular monolith as opposed to a some sort of in memory bus?
1. An modular monolith is a “microservices-ready” setup, and you should be able to easily decouple a module into a separate microservice at any given time, doing that with in-memory bus, well good luck with that. 2. Scalling issues. 3. You might loose messages that are in memory. And last I’d say fancy management dashboard :P but im not sure what in memory provider you are using so that one might come with one also.
@@vasiliioleinic if you use a proper message broker within your MM - it is for sure makes it very ready for splitting into MS in the future. However what are the performance implications? You can easily use the channel based in memory brokers written from scratch - not very hard at all. You don’t get persistence, but if your entire MM is restarted - I’d argue that persistence of messages can be a double edged sword. MassTransit does make it easier to manage the broker, and with their new Db transport - you get even more options to use SQL server or Postgres as a broker
@@vasiliioleinic I disagree with your reply... IMO RabbitMQ, Kafka etc are overkill for modular monoliths and one should prefer using an in-memory-event/massage-bus for inter-module communication with this type of architecture. Only when your app gets popular to the point that you start seeing problems of scale, you deploy some of the modules as their own separate services (and then it's no more a monolith), you switch to RabbitMQ, Kafka etc. by changing implementation of the event/message-bus adapter. You use modular monolith when you don't have scaling issues - if you do then you start switching to microservices, because you maybe want to run more than one instance of the same module etc. Scale issues are the point when you should switch from monolith to distributed. If one cares about losing messages with an in-memory solution then there are patterns like the inbox/outbox for "at least once" delivery and processing of messages.
My use case in enterprise is to use message bus (azure message bus) is if you ever need to provide event messaging to other services (e.g. integration with separate domain’s system)
So you are using MassTransits outbox instead of your own from this video on?
Yes for this one specific system yes. Having less code to maintain is what I strive for more often than not. I would use my own if I didn’t use mass transit and relied on my own built infrastructure.
@@vasiliioleinic good decision 👍, maybe worth dropping a text comment for ppl who are new to mass transit
Very informative video. Keep it up. 👍
Hi Vasilii, can you do a video on finding performance issues? Using profiler tool, logging metrics and execution time, finding slow entity framework queries etc? That would be very helpful ❤
There is a video on metrics coming up. As for the other things mentioned will try to squeeze them in somewhere at some point.
Hi Vasilii, I hope you're doing great. I just wanted to let you know that, could you create conceptual videos as well? Videos that explain concepts like how async/await works, the differences between IoC (Inversion of Control) and Abstractions, and Interfaces, and topics on Resilience, etc. I'm aware that there are many videos out there already, but the issue is that they often don't teach these concepts clearly.
I will take that into account for future videos.
@@vasiliioleinic thank you so much. love your videos
Fonts are small and unreadable
Will take into account to increase it even more for next videos
Great videos - any chance you can get a proper microphone. The sound is not good.
Hi, this is a older video where I was just figuring out everything, the new ones should be way better. Thx for feed back.