otel_chopper 0.3.0
otel_chopper: ^0.3.0 copied to clipboard
OpenTelemetry instrumentation for `package:chopper`. A Chopper Interceptor that emits HTTP CLIENT spans with `http.*` semconv attributes and injects W3C trace context headers.
Changelog #
0.3.0 - 2026-10-11 #
Changed #
- Requires
dartastic_opentelemetry_api >=1.0.0-rc.4 <1.0.0-rc.5. - Context is propagated with the app's configured propagators
(
OTelAPI.textMapPropagator: W3C trace context and baggage by default,OTEL_PROPAGATORSto change them) instead of a fixed W3C propagator. - Breaking: depends on
dartastic_opentelemetry_apionly, no longer on the SDK. The application chooses and initializes the OpenTelemetry SDK. Parameters and fields typed with SDK classes now use the API types (APITracer,APISpan,APILogger, ...); SDK instances are still accepted wherever an API type is expected.
0.2.0 - 2026-08-08 #
Changed #
- Semantic conventions updated to the current OTel registry: deprecated
attribute keys are no longer emitted (
db.system->db.system.name,db.operation->db.operation.name,rpc.system->rpc.system.name, withrpc.servicefolded into a fully-qualifiedrpc.method). - Dependency floors raised to
dartastic_opentelemetry ^1.1.0-beta.12anddartastic_opentelemetry_api ^1.0.0-rc.1. The previous floors declared compatibility with API versions that predate the semconv enums this package uses and could not actually resolve-and-compile. repositoryURL corrected to the canonicalDartasticorg casing so pub.dev repository verification succeeds.
Added #
OTelChopperInterceptor— a ChopperInterceptorthat opens an HTTP CLIENT span around each outbound request and injects the W3Ctraceparentheader.- Span attributes:
http.request.method,url.full,server.address,server.port,http.response.status_code.4xx/5xxresponses flip span status to Error. The deprecatedhttp.methodlegacy key is not emitted. - Zone-scoped suppression
(
runWithoutChopperInstrumentation/ async variant). - 4 tests using
http.testing.MockClient(no network needed): span shape on success, error status flip, traceparent header injection, suppression scope.