Introduction

edit

The Meziantou.Framework.OpenTelemetryCollector packages receive the telemetry that applications export with the OpenTelemetry protocol (OTLP): logs, traces and metrics. They add the OTLP endpoints to an ASP.NET Core application, over HTTP and gRPC, and pass each export request to handlers that you write, or to an in-memory store.

Use them to collect telemetry in your own service, or in tests, to check what an application exports.

What you can do with them

  • Host the OTLP endpoints and receive telemetry in memory. See Getting started.
  • Assert on the exported telemetry in tests, with the in-memory receiver. See Testing with the in-memory receiver.
  • Handle the telemetry in code: store it, forward it, or reject part of it. See Custom handlers.
  • Configure the endpoints: paths, HTTP and gRPC, Protobuf and JSON, compression and security. See Endpoints.
  • Drop telemetry before it reaches the handlers, request by request or trace by trace once the whole trace is received. See Sampling and Tail sampling.

Packages

PackageMain types
Meziantou.Framework.OpenTelemetryCollectorOpenTelemetryHandler, OpenTelemetrySampler, OpenTelemetryTailSampler, OpenTelemetryReceiverOptions
Meziantou.Framework.OpenTelemetryCollector.InMemoryInMemoryOpenTelemetryHandler, InMemoryOpenTelemetryHandlerOptions

The in-memory package references the main one.

Namespaces

Next steps