otel_mobx 0.1.0-beta.1
otel_mobx: ^0.1.0-beta.1 copied to clipboard
OpenTelemetry instrumentation for `package:mobx`. Wraps `runInAction` and reactions with state-management spans so MobX activity shows up in your traces.
dartastic_mobx_otel #
OpenTelemetry instrumentation for
package:mobx.
import 'package:dartastic_mobx_otel/dartastic_mobx_otel.dart';
tracedRunInAction('add_to_cart', () {
cart.add(item);
total.value += item.price;
});
await tracedRunInActionAsync('checkout', () async {
cart.clear();
user.lastPurchase = DateTime.now();
});
Each call opens an INTERNAL span named mobx action <name> with
state.system=mobx, state.operation=action,
state.action.name=<name>. The span captures wall time for the
action body — including any synchronous reactions it triggered.
Suppression: runWithoutMobxInstrumentation and its async
variant.
License #
Apache 2.0