http_instrumentation library

HTTP client instrumentation APIs for official integrations and advanced custom adapters.

App developers should normally import package:vunet_flutter_plugin/flutter_sdk.dart instead. This library is the stable surface used by packages such as vunet_flutter_plugin_dio.

Classes

HttpClientConnectTiming
Zone-scoped timings produced by createInstrumentedHttpClient.
HttpSpanRecorder
Shared recorder that emits incubating <HTTP method> catalog attributes and phase events for all Flutter HTTP clients.
InstrumentationScopes
OpenTelemetry instrumentation scope names for Flutter RUM tracers.

Enums

HttpTimingPhase
Timing phases the Flutter HTTP instrumentation can measure.

Functions

createInstrumentedHttpClient({SecurityContext? context}) HttpClient
Creates an HttpClient whose connectionFactory records DNS + TCP connect durations into the current HttpClientConnectTiming zone value.
elapsedMs(Stopwatch sw) double
Stopwatch elapsed time in milliseconds, keeping sub-millisecond fractions.
withHttpConnectTiming<T>(Future<T> body(HttpClientConnectTiming timing)) Future<T>
Runs body with a fresh HttpClientConnectTiming in the zone so an instrumented HttpClient can report connect/DNS timings.

Typedefs

HttpConnectionFactory = Future<ConnectionTask<Socket>> Function(Uri url, String? proxyHost, int? proxyPort)
Signature of HttpClient.connectionFactory.