otel_chopper 0.2.0
otel_chopper: ^0.2.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.
otel_chopper #
OpenTelemetry instrumentation for
package:chopper.
import 'package:chopper/chopper.dart';
import 'package:otel_chopper/otel_chopper.dart';
final chopper = ChopperClient(
baseUrl: Uri.parse('https://api.example.com'),
interceptors: [OTelChopperInterceptor()],
services: [...],
);
Each outbound request opens a CLIENT span:
- name:
HTTP <METHOD>(low cardinality — span name doesn't include URL path) http.request.methodurl.full,server.address,server.porthttp.response.status_codeon completion- W3C
traceparentheader injected so the server side can stitch
4xx / 5xx responses flip span status to Error.
Suppression: runWithoutChopperInstrumentationAsync.
License #
Apache 2.0