setCustomAttributes static method

void setCustomAttributes(
  1. Map<String, String> attributes
)

Set multiple custom attributes. Pushed to the native layer, which merges them into its global attribute set and applies them to every subsequent span — native-origin and bridged Dart spans alike.

Implementation

static void setCustomAttributes(Map<String, String> attributes) {
  unawaited(OpentelemetryPlatform.instance.setGlobalAttributes(attributes));
}