otel_flutter_local_notifications 0.2.0 copy "otel_flutter_local_notifications: ^0.2.0" to clipboard
otel_flutter_local_notifications: ^0.2.0 copied to clipboard

OpenTelemetry instrumentation for `package:flutter_local_notifications`. Wraps show / schedule / cancel with notification.* spans.

otel_flutter_local_notifications #

OpenTelemetry instrumentation for package:flutter_local_notifications.

final fln = FlutterLocalNotificationsPlugin();

// Show: wrap in a traced call
await tracedLocalNotificationCall<void>(
  operation: 'show',
  id: 42,
  invoke: () => fln.show(42, 'Title', 'Body', notificationDetails),
);

// Tap: bridge into your active span
await fln.initialize(
  initSettings,
  onDidReceiveNotificationResponse: (response) {
    recordNotificationResponse(
      id: response.id,
      payload: response.payload,
    );
    // ... your handler
  },
);

Each call opens a PRODUCER span named local_notif <op> <id> with notification.system=flutter_local_notifications, notification.operation, notification.id. The keys are exported as the LocalNotificationsSemantics enum.

Notification body (title/text) is intentionally not recorded — it often contains user-visible PII.

Suppression: runWithoutLocalNotificationsInstrumentationAsync.

License #

Apache 2.0

0
likes
160
points
72
downloads

Documentation

API reference

Publisher

verified publisherdartastic.io

Weekly Downloads

OpenTelemetry instrumentation for `package:flutter_local_notifications`. Wraps show / schedule / cancel with notification.* spans.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

dartastic_opentelemetry, dartastic_opentelemetry_api, flutter, flutter_local_notifications

More

Packages that depend on otel_flutter_local_notifications