Start Now
mteheran.dev
Introduction to
OpenTelemetry in .NET
Developer Presentation Template
Hello, I AM MIGUEL
TEHERAN
Developer and Consultant
Microsoft MVP
C# Corner MVP
Alibaba Cloud MVP
You can find me at:
Mteheran
Mteheran.dev
Go To Next Slide
Developer Presentation Template
What is Telemetry
and monitoring?
Options for
monitoring .NET
Apps
1. Diagnostics.Trace
2. Diagnostics.Debug
3. Diagnostics.EventSource
4. Diagnostics.Activity
5. Diagnostics.EventLog (Windows)
EventLog Example
Libraries for .NET
1. Serilog
2. Log4Net
3. Nlog
4. Elmah.io
5. Gelf4Net
Challenges and
Issues
1. Compatibility with other technologies
2. Only windows supports
3. Performance affectations
4. No standard in the formats
Go To Next Slide
Developer Presentation Template
What is
OpenTelemetry?
Developer Presentation Template
OpenTelemetry
01. Set of tools to collect telemetry data
to analyze behavior and performance
02. Trace, Metrics, Logs
03. Open Source and free
04. Standard across different technologies
05. https://opentelemetry.io/
06. Cloud native projects
Steps to use
OpenTelemetry in
.NET
1. dotnet new console
2. dotnet add package Microsoft.Extensions.Logging
3. dotnet add package OpenTelemetry.Exporter.Console
Steps to use
OpenTelemetry in
.NET
Update the program.cs file:
using Microsoft.Extensions.Logging;
using OpenTelemetry.Logs;
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddOpenTelemetry(options =>
{
options.AddConsoleExporter();
});
});
var logger = loggerFactory.CreateLogger<Program>();
logger.LogInformation("Hello dotnetos conference from OpenTelemetry");
Go To Next Slide
Developer Presentation Template
Demo
OpenTemeletry
supports
Observability
● Logs
● Metrics
● Traces
Go To Next Slide
Developer Presentation Template
Demo
Metrics & Traces
Developer Presentation Template
Advantages of using
OpenTelemetry
Go To Next Slide
Easy to implement
and use
Easy to use
Using exporters you
can integrate
OpenTelemetry with
other tools
Integration
Good support by the
community and
cloud providers
Support
No affectations in the
application´s
performance
Performance
For the community
OpenSource and free
Go To Next Slide
Developer Presentation Template
Advanced Demo
Payment API
Order API
SQL
Notification API
SignalR
RabbitMQ
Frontend
Blazor
Demo created by Giovani de león & Elvis batzibal
MTEHERAN.DEV
Thank You

Introduction to OpenTelemetry in .NET