otel_mobx library

OpenTelemetry instrumentation for package:mobx.

Enums

MobxSemantics
Typed attribute keys for MobX instrumentation. The OTel semconv registry has no state-management convention yet; these are neutral state.* names in a local enum implementing OTelSemantic until the registry defines them.

Functions

mobxInstrumentationSuppressed() bool
Whether MobX instrumentation is suppressed in the current Zone (i.e. the caller is inside runWithoutMobxInstrumentation or runWithoutMobxInstrumentationAsync).
runWithoutMobxInstrumentation<T>(T body()) → T
Runs body with MobX instrumentation suppressed: traced* calls made inside it execute normally but create no spans.
runWithoutMobxInstrumentationAsync<T>(Future<T> body()) Future<T>
Async variant of runWithoutMobxInstrumentation.
tracedRunInAction<T>(String name, T body()) → T
Runs body inside a MobX action AND inside an OTel span named mobx action <name>. The span captures wall time for the action — including any synchronous reactions it triggered.
tracedRunInActionAsync<T>(String name, Future<T> body()) Future<T>
Async variant of tracedRunInAction — useful when the body performs awaits (note: MobX itself recommends asyncAction for that pattern; this wrapper is more permissive).