Skip to content

Add lightweight OpenTelemetry signals sample - #21

Merged
balajibashyam merged 4 commits into
mainfrom
feature/opentelemetry-signals-sample
Aug 8, 2026
Merged

Add lightweight OpenTelemetry signals sample#21
balajibashyam merged 4 commits into
mainfrom
feature/opentelemetry-signals-sample

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 companion sample for the .NET 8 Observability with OpenTelemetry: Tracing, Metrics & Structured Logging tutorial.

What's included

  • New sample: dotnet-8-essentials/observability-opentelemetry/ — 9 files

    • ASP.NET Core Minimal API with OpenTelemetry 1.17.0
    • Custom ActivitySource spans (Checkout.Process)
    • Custom Meter with counter (checkout.requests) and histogram (checkout.duration)
    • Low-cardinality metric tags (checkout.channel, checkout.outcome)
    • Source-generated structured ILogger events via LoggerMessage
    • Automatic log-to-trace correlation
    • Learning-only Console Exporter output
    • Input validation with rejection telemetry
    • ActivityListener and MeterListener unit tests
    • 8 xUnit v3 tests, all passing
  • Root README: New sample row in the table + updated repository structure

  • GitHub Actions: New test-opentelemetry-signals job in the shared workflow with package-baseline verification and deterministic API smoke test; path filters updated

Deliberately omitted (stays in the full tutorial)

OTLP, Collector, Docker Compose, Jaeger, Prometheus, Grafana, EF Core, HttpClient instrumentation, external service calls, queues, sampling, baggage, health checks, cloud exporters, benchmarking

Versions

  • .NET SDK: 10.0.302
  • OpenTelemetry.Extensions.Hosting: 1.17.0
  • OpenTelemetry.Exporter.Console: 1.17.0
  • OpenTelemetry.Instrumentation.AspNetCore: 1.17.0
  • xunit.v3: 3.2.2

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors, 0 warnings)
  • dotnet test --configuration Release — passed (8/8)
  • Security scan — clean
  • Package baseline — confirmed 3 direct packages, all at 1.17.0

@balajibashyam
balajibashyam merged commit 4cbb79d into main Aug 8, 2026
23 checks passed
@balajibashyam
balajibashyam deleted the feature/opentelemetry-signals-sample branch August 8, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant