/PlayingWithOpenTelemetry

Try out OpenTelemetry observability framework

Primary LanguageC#

Playing with OpenTelemetry

In this repository, I started to explore the OpenTelemetry observability framework and collected some useful links for traces, metrics, and logs.

The solution contains 2 projects
WebApi
  • Tracing exporter: Configured for Otlp / OpenTelemetryProtocol (I used Jaeger, which supports Otlp)
  • HelloController: Returns a random response (200, 400, 500, ...) to simulate real-life scenarios involving both good and bad responses.
ClientConsoleApp
  • Tracing exporter: Configured for Otlp / OpenTelemetryProtocol (I used Jaeger, which supports Otlp)
  • Console application, which initiate HTTP calls to the WebApi
  • Using Polly to retry and cancel the call

Resources


OpenTelemetry vs .NET terminology

OpenTelemetry .NET
Tracer ActivitySource
TelemetrySpan Activity
SpanContext ActivityContext

Screenshot after running the WebApi and the ClientConsoleApp

Trace Trace-detailed