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 implementingOTelSemanticuntil 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
bodywith 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
bodyinside a MobX action AND inside an OTel span namedmobx 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
asyncActionfor that pattern; this wrapper is more permissive).