BloomHttpTelemetryTransport class

Production HTTP transport that posts JSON telemetry payloads to a remote collector endpoint.

Example:

final transport = BloomHttpTelemetryTransport(
  endpoint: Uri.parse('https://telemetry.example.com/api/v1/events'),
  headers: {'Authorization': 'Bearer <token>'},
);
Implemented types

Constructors

BloomHttpTelemetryTransport({required Uri endpoint, Map<String, String>? headers, Client? client, Duration timeout = const Duration(seconds: 10), void onError(BloomTelemetryEvent event, Object error, StackTrace stackTrace)?})
Creates a BloomHttpTelemetryTransport.

Properties

endpoint → Uri
Remote collector endpoint URI.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
Custom HTTP headers attached to transmission POST requests.
final
onError → void Function(BloomTelemetryEvent event, Object error, StackTrace stackTrace)?
Optional error callback invoked when transmission fails.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
Network timeout for sending telemetry packets.
final

Methods

close() → Future<void>
Closes the transport and flushes any pending buffer.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(BloomTelemetryEvent event) → Future<void>
Transmits a single event to the target collector.
override
toString() → String
A string representation of this object.
inherited

Operators

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