ISpectLoggerNetwork extension

Trace helpers for raw HTTP request / response / error events.

These are typically emitted by interceptor packages (ispectify_dio, ispectify_http) - call them directly only when instrumenting a custom HTTP client.

on

Methods

httpError({required String source, required String operation, String? target, Object? error, StackTrace? errorStackTrace, Duration? duration, String? correlationId, Map<String, Object?>? meta, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerNetwork extension

Logs an HTTP error (4xx/5xx or transport failure) under networkCategory.
httpRequest({required String source, required String operation, String? target, String? correlationId, Map<String, Object?>? meta, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerNetwork extension

Logs an outgoing HTTP request under networkCategory.
httpResponse({required String source, required String operation, String? target, Duration? duration, String? correlationId, Map<String, Object?>? meta, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerNetwork extension

Logs an HTTP response (2xx/3xx) under networkCategory.