datadog_tracking_http_client
3.3.0, released 8 weeks ago by datadoghq.com
A tracking implementation of HttpClient for monitoring HTTP calls and distributed tracing with Datadog.
What it does
It wraps `dart:io`'s `HttpClient` via `HttpOverrides` or provides a composable `DatadogClient` for the `http` package to track performance of HTTP calls, capture request/response headers, and enable Datadog Distributed Tracing.
AI-written summary of version 3.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using Datadog RUM and want to automatically track performance and errors of HTTP requests.
- You need to enable Datadog Distributed Tracing for your backend API calls.
- You are using native HTTP libraries like cronet_http or cupertino_http with the composable DatadogClient.
Skip it when
- You are not using Datadog for monitoring and analytics.
- You need to use custom `HttpOverrides` that conflict with Datadog's initialization order and cannot be initialized prior to Datadog.
Strengths
- Automatic network tracking from background isolates and main thread.
- Supports distributed tracing with OTel b3 and W3C tracecontext header injection.
- Composable `DatadogClient` available for specific resource requests or packages like cronet_http.
Weaknesses
- Modifies global `HttpOverrides.global`, which can conflict with other packages overriding HTTP behavior.
- Requires proper ordering of `HttpOverrides` initialization if you have your own overrides.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Enable it during the configuration of the Datadog SDK using enableHttpTracking() and configure firstPartyHosts.
final configuration = DatadogConfiguration(
firstPartyHosts: ['example.com'],
)..enableHttpTracking();Alternatives
Packages that do the same job and could replace datadog_tracking_http_client.
Works with
Packages commonly used together with datadog_tracking_http_client: ones it builds on, ones built on it, and its own family.
- uuiddatadog_tracking_http_client depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- datadog_flutter_plugindatadog_tracking_http_client depends on itFlutter plugin for Datadog logs and Real User Monitoring (RUM).
- datadog_session_replaySame familyIntegrates Datadog Session Replay into Flutter apps via FFI.