Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.75 KB

File metadata and controls

42 lines (29 loc) · 1.75 KB

SquidStd.Telemetry.Abstractions

Dependency-free telemetry configuration shared by SquidStd observability providers (e.g. SquidStd.Telemetry.OpenTelemetry). Holds TelemetryOptions, the OtlpProtocolType enum, and the SquidStdActivity helper / SquidStd.* ActivitySource naming convention. No OpenTelemetry dependency: custom spans use the BCL System.Diagnostics.ActivitySource.

Install

dotnet add package SquidStd.Telemetry.Abstractions

Usage

using SquidStd.Telemetry.Abstractions;

using var activity = SquidStdActivity.Source.StartActivity("checkout");
activity?.SetTag("order.id", orderId);

Subsystems create their own new ActivitySource("SquidStd.Something"); the OpenTelemetry provider captures every SquidStd.* source automatically.

Key types

Type Purpose
TelemetryOptions Service name, OTLP endpoint/protocol, sampling and exporter configuration.
OtlpProtocolType OTLP transport: gRPC or HTTP.
SquidStdActivity Shared ActivitySource and the SquidStd.* source naming convention.

Related

License

MIT - part of SquidStd.