setGlobalAttributes method

  1. @override
Future<void> setGlobalAttributes(
  1. Map<String, String> attributes
)
override

Merges app-provided attributes into the native layer's global attribute set. Native applies them to every subsequent span and log — both native-origin and bridged Dart spans — so this is the single write path for runtime attribute updates on Android.

Implementation

@override
Future<void> setGlobalAttributes(Map<String, String> attributes) async {
  if (attributes.isEmpty) {
    return;
  }
  await methodChannel.invokeMethod('setGlobalAttributes', {
    'attributes': attributes,
  });
}