OpentelemetryPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • OpentelemetryPlatform
Implementers

Constructors

OpentelemetryPlatform()
Constructs a OpentelemetryPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

droppedAppStartWrites() Future<int>
Cumulative native app-start events/attributes dropped because app.start had already closed. Android-only; other platforms return 0.
exportSpans(List<Map<String, dynamic>> spans) Future<void>
Forwards a batch of ended spans (serialized via ReadOnlySpan.toJson) to the native layer, which owns the single telemetry egress.
flushSpans() Future<bool>
Asks the native layer to persist its in-memory bridge queue to the disk buffer, completing only once the spans are durable. Returns false when the flush could not be confirmed (or the platform has no native bridge).
initialize(InitializationParams params) Future<String?>
markTimeToDisplay({String reason = 'flutter_first_frame'}) Future<void>
Signals native that the app has reached its first meaningful display (Time-To-Initial / Time-To-Full Display), closing the native app.start span so it can be emitted.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publishFlutterActionContext(dynamic spanContext, Duration window) Future<void>
Publishes the current user-action span context to native along with an expiry (window from now), so native span creators can parent to it while the action window is open.
recordAppStartAttribute(String key, String value) Future<void>
Sets an attribute on the in-flight native cold-start app.start span.
recordAppStartEvent(String name, int epochMs) Future<void>
Stamps an event onto the in-flight native cold-start app.start span.
setGlobalAttributes(Map<String, String> attributes) Future<void>
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.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance OpentelemetryPlatform
The default instance of OpentelemetryPlatform to use.
getter/setter pair