startResource method

void startResource(
  1. String key,
  2. RumHttpMethod httpMethod,
  3. String url, [
  4. Map<String, Object?> attributes = const {},
])

Notifies that the a Resource identified by key started being loaded from given url using the specified httpMethod. The supplied custom attributes will be attached to this Resource.

Note that key must be unique among all Resources being currently loaded, and should be sent to stopResource or stopResourceWithError / stopResourceWithErrorInfo when resource loading is complete.

Implementation

void startResource(String key, RumHttpMethod httpMethod, String url,
    [Map<String, Object?> attributes = const {}]) {
  wrap('rum.startResource', logger, attributes, () {
    return _platform.startResource(key, httpMethod, url, attributes);
  });
}