vunet_flutter_plugin_dio 0.0.3 copy "vunet_flutter_plugin_dio: ^0.0.3" to clipboard
vunet_flutter_plugin_dio: ^0.0.3 copied to clipboard

Dio HTTP client instrumentation for vuTelemetry Flutter RUM.

vunet_flutter_plugin_dio #

Dio HTTP client instrumentation for vuTelemetry Flutter.

App developers import this package for Dio spans. Shared HTTP recording APIs used by this integration live on package:vunet_flutter_plugin/http_instrumentation.dart (for official integrations and advanced custom adapters). Day-to-day RUM APIs remain on package:vunet_flutter_plugin/flutter_sdk.dart.

Setup #

  1. Initialize the core SDK with VuTelemetry.initialize.
  2. Add this package alongside vunet_flutter_plugin and dio.
  3. Attach instrumentation per Dio instance:
import 'package:dio/dio.dart';
import 'package:vunet_flutter_plugin_dio/vunet_flutter_plugin_dio.dart';

final dio = Dio();
attachInstrumentedDio(dio);

Or add the interceptor yourself:

dio.interceptors.add(OtelDioInterceptor());

instrumentations.http in core does not cover Dio — attach per instance as shown above.

Timing phases #

Dio spans report dns (+ connect when you use attachInstrumentedDio or otherwise wire createInstrumentedHttpClient), total, and call.

ttfb and download are not supported at the interceptor layer: Dio has no headers-received / first-byte hook comparable to package:http's send() return, and inventing one from interceptor timing would mislabel nearly the full round-trip. Use total / call for end-to-end latency.

Error classification #

Dio failures set http.error.category via classifyDioException, which maps DioExceptionType to the HTTP RUM catalog (timeout, ssl, http_client, io, dns, unknown). The interceptor passes the result to HttpSpanRecorder.onError as errorCategory.

Core SDK paths (package:http, HttpOverrides) do not pass errorCategory; they rely on HttpSpanRecorder.classifyError, which only understands dart:io errors. Dio-specific classification lives in this package so the core plugin does not depend on Dio types.

Nested DioException.error values (for example an inner SocketException) are classified by delegating to HttpSpanRecorder.classifyError.

License #

VuNet Systems Ltd. proprietary and confidential (LicenseRef-VuNet-Proprietary). See LICENSE.

0
likes
120
points
371
downloads

Documentation

API reference

Publisher

verified publishervunetsystems.com

Weekly Downloads

Dio HTTP client instrumentation for vuTelemetry Flutter RUM.

Homepage

Topics

#opentelemetry #rum #monitoring #observability

License

unknown (license)

Dependencies

dio, flutter, logging, vunet_flutter_plugin

More

Packages that depend on vunet_flutter_plugin_dio