startFeatureOperation method

void startFeatureOperation(
  1. String name, {
  2. String? operationKey,
  3. Map<String, Object?> attributes = const {},
})

Starts a feature operation with the given name.

You can also provide an optional operationKey, which allows you to track multiple operations of the same name. For example, multiple network requests for the same URL.

Additional custom attributes can be attached to this feature operation through attributes.

Implementation

void startFeatureOperation(
  String name, {
  String? operationKey,
  Map<String, Object?> attributes = const {},
}) {
  wrap('rum.startFeatureOperation', logger, attributes, () {
    final currentTime = timeProvider.now();
    return _platform.startFeatureOperation(
        currentTime, name, operationKey, attributes);
  });
}