getAttributes method

  1. @override
Future<Map<String, String>> getAttributes()
override

Implementation

@override
Future<Map<String, String>> getAttributes() async {
  if (kDebugMode) {
    logger?.debug(
        this, 'Application is in debug mode, not getting the attributes');
    return {};
  }

  if (!kCanTrace) {
    logger?.debug(this, 'Firebase Http Metric is not allowed to trace');
    return {};
  }
  if (kInstance == null) {
    logger?.error(this, 'Firebase Http Metric is not initialized');
    return {};
  }

  return kInstance?.getAttributes() ?? {};
}