TrackedHttpOverrides class

HttpOverrides that instruments low-level dart:io HttpClient requests, emitting a client span with W3C Trace Context Level 1 (traceparent version 00) injected into headers.

Install globally with install (preferred) or HttpOverrides.global = TrackedHttpOverrides();.

When previous is set, createHttpClient delegates to that override (preserving certificate pinning, SecurityContext, etc.), installs the instrumented connectionFactory for DNS/connect timing, then wraps the result for span recording. This is the mechanism used when your app sets HttpOverrides.global before VuTelemetry.initialize with instrumentations.http: true.

Inheritance

Constructors

TrackedHttpOverrides({HttpOverrides? previous, HttpConnectionFactory? connectionFactory})

Properties

connectionFactory HttpConnectionFactory?
The app's own connectionFactory, composed with connect timing instead of being replaced by it.
final
hashCode int
The hash code for this object.
no setterinherited
previous HttpOverrides?
Prior overrides to delegate to when creating the underlying client.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createHttpClient(SecurityContext? context) HttpClient
Returns a new HttpClient using the given context.
override
findProxyFromEnvironment(Uri url, Map<String, String>? environment) String
Resolves the proxy server to be used for HTTP connections.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

bodyOrphanTimeoutForTesting Duration
Test-only orphan timeout. Restore with resetBodyOrphanTimeoutForTesting.
getter/setter pair

Static Methods

install({HttpConnectionFactory? connectionFactory}) TrackedHttpOverrides
Sets HttpOverrides.global to a new TrackedHttpOverrides, chaining any existing global / zone overrides so prior behaviour is preserved.
resetBodyOrphanTimeoutForTesting() → void

Constants

bodyOrphanTimeout → const Duration
Wait after response metadata is read before closing a span whose body was never listened to. Matches dart:io HttpClient.idleTimeout.