Slide 1

Slide 1 text

Logs, Traces, Metrics: Observability von .NET 7 Anwendungen Thorsten Hans @ThorstenHans Cloud-Native Consultant

Slide 2

Slide 2 text

Consultant @ Thinktecture #Azure #Kubernetes #Rust #CloudNative #Docker #GoLang #WebAssembly [email protected] thinktecture.com thorsten-hans.com @ThorstenHans Microsoft MVP | Docker Captain Thorsten Hans

Slide 3

Slide 3 text

• Introduction • OpenTelemetry • Instrumenting .NET Apps • Conclusion Agenda

Slide 4

Slide 4 text

• Introduction • OpenTelemetry • Instrumenting .NET Apps • Conclusion Agenda

Slide 5

Slide 5 text

With Observability, we gain insights into complex systems by monitoring their states and behaviors. Introduction What is Observability?

Slide 6

Slide 6 text

Addressing Observability means we must collect, store, and analyze data from different sources (e.g., individual apps, databases, caches, infrastructure, …) Introduction What is Observability?

Slide 7

Slide 7 text

With Observability we can identify problems and potential defects before they happen, because we look at data over a period of time, which allows us to spot trends Introduction What is Observability?

Slide 8

Slide 8 text

• Logs • Textual records of discrete events or actions within a system • Provides a chronological record that aids in root cause analysis and debugging • Metrics • Point in time measure of different sources • Enables monitoring and alerting based on predefined thresholds or anomalies • Traces • Collection of spans that outline a program’s flow and data progression • Enables end-to-end tracing and troubleshooting of distributed systems Introduction Observability data types

Slide 9

Slide 9 text

• Introduction • OpenTelemetry • Instrumenting .NET Apps • Conclusion Agenda

Slide 10

Slide 10 text

• OpenTelemetry (OTel) is an open-source observability framework • OTel empowers devs with generating, collecting, and exporting telemetry data from distributed systems. • OTel provides a standardized set of APIs, libraries, and instrumentation tools that we can use to instrument our apps • OTel supports many programming languages and integrates with various observability systems OpenTelemetry https://opentelemetry.io/

Slide 11

Slide 11 text

• Introduction • OpenTelemetry • Instrumenting .NET Apps • Conclusion Agenda 1

Slide 12

Slide 12 text

Instrumenting .NET Apps • Let’s instrument a regular .NET Web App Demo

Slide 13

Slide 13 text

• Add Instrumentation packages to collect more insights • Exporter packages are used to send / expose data to integrate with well-known, battle-tested observability solutions (Jaeger, Zipkin, Prometheus, Elastic, ….) • Individual metrics and spans are captured using regular types from .NET BCL Instrumenting .NET Apps

Slide 14

Slide 14 text

Instrumenting .NET Apps • Take our instrumentation to the next level Demo

Slide 15

Slide 15 text

• Introduction • OpenTelemetry • Instrumenting .NET Apps • Conclusion Agenda

Slide 16

Slide 16 text

• Observability is mission-critical to • Maintain the reliability and performance of your app • Visualize the health of your app • Gain insights about how users use your app • Collect data and generate KPIs and group them into meaningful dashboards • Observability is more than just using ILogger • Do not underrate the importance of custom metrics Conclusion

Slide 17

Slide 17 text

• OpenTelemetry is the de-facto standard • Both manual and automatic instrumentation are super helpful to get insights of the entire application • Look for dedicated Instrumentation NuGet packages to gain more insights e.g, • OpenTelemetry.Instrumentation.SqlClient • OpenTelemetry.Instrumentation.GrpcNetClient • OpenTelemetry.Instrumentation.StackExchangeRedis • OpenTelemetry.Instrumentation.EntityFrameworkCore Conclusion

Slide 18

Slide 18 text

Thanks for your attention @ThorstenHans