ProtoTest.OpenTelemetry
1.0.1
OpenTelemetry is already supported without the package. Add "ProtoTest" source to your existing OTel setup.
dotnet add package ProtoTest.OpenTelemetry --version 1.0.1
NuGet\Install-Package ProtoTest.OpenTelemetry -Version 1.0.1
<PackageReference Include="ProtoTest.OpenTelemetry" Version="1.0.1" />
<PackageVersion Include="ProtoTest.OpenTelemetry" Version="1.0.1" />
<PackageReference Include="ProtoTest.OpenTelemetry" />
paket add ProtoTest.OpenTelemetry --version 1.0.1
#r "nuget: ProtoTest.OpenTelemetry, 1.0.1"
#:package ProtoTest.OpenTelemetry@1.0.1
#addin nuget:?package=ProtoTest.OpenTelemetry&version=1.0.1
#tool nuget:?package=ProtoTest.OpenTelemetry&version=1.0.1
ProtoTest.OpenTelemetry
Registers ProtoTest's built-in ActivitySource with an OpenTelemetry tracing pipeline; the local .prototrace archive stays independent.
dotnet add package ProtoTest.OpenTelemetry
Install an exporter such as OpenTelemetry.Exporter.OpenTelemetryProtocol alongside this package when needed.
Quick start
using OpenTelemetry;
using OpenTelemetry.Trace;
using ProtoTest.OpenTelemetry;
using var provider = Sdk.CreateTracerProviderBuilder()
.AddProtoTestInstrumentation()
.AddOtlpExporter()
.Build();
The provider can live in a ProtoTest run hook so it covers the whole run.
What it adds
- Instrumentation — the single extension
AddProtoTestInstrumentation()adds the"ProtoTest"activity source to the caller-ownedTracerProviderBuilder. - Operations as spans — each ProtoTest operation becomes an
ActivityKind.Internalspan, with tags such asprototest.test.id,prototest.entry.kind,prototest.source,prototest.phase,prototest.entity.kind/idandprototest.outcome. - Events as span events — instantaneous trace entries attach as
ActivityEvents to the span of their parent operation when one exists. - Outcome mapping — a failed operation sets
Errorwith a description plus anexceptionevent (type, message, stack trace); a succeeded operation setsOk. - Pipeline-agnostic — the caller owns the
TracerProviderBuilder; exporters, sampling and resources are ordinary OpenTelemetry configuration, and the package includes no exporter. - Stable source name — the added source is always
"ProtoTest", so the bridge needs no per-run setup.
ProtoTest tracing stays enabled and independent: the exported spans do not replace .prototrace. Large structured values (context.value, observation.data, shape.*, …) stay only in the archive, and attributes longer than 2048 characters are dropped from exported spans.
Learn more
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- OpenTelemetry (>= 1.18.0)
- ProtoTest.Core (>= 1.0.1)
-
net8.0
- OpenTelemetry (>= 1.18.0)
- ProtoTest.Core (>= 1.0.1)
-
net9.0
- OpenTelemetry (>= 1.18.0)
- ProtoTest.Core (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.