DatadogClientAttributesProvider typedef

DatadogClientAttributesProvider = Map<String, Object?> Function(BaseRequest request, StreamedResponse? response, Object? error)

A callback function that allows you to provide attributes that should be attached to a Datadog RUM resource created from DatadogClient. This callback is called when the resource is finished loading, so the provided request and response streams are already closed.

If there was an error performing the request, this callback provides the error and, depending on the timing of the error, may send null in the response.

If this function throws, it will prevent proper tracking of this resource.

Implementation

typedef DatadogClientAttributesProvider = Map<String, Object?> Function(
    http.BaseRequest request, http.StreamedResponse? response, Object? error);