# `Modbuv.Telemetry`
[🔗](https://github.com/ultra0224/modbuv/blob/v0.1.0/lib/modbuv/telemetry.ex#L1)

Telemetry instrumentation for `Modbuv.Tcp.Client` and `Modbuv.Rtu.Master`
requests.

Each request emits `[:modbuv, :request, :start]` when it is sent and
`[:modbuv, :request, :stop]` when it completes, fails, or times out.

Start measurements are `%{system_time: native}`. Stop measurements are
`%{duration: native, monotonic_time: native}`; convert `duration` with
`System.convert_time_unit/3` to get RTT.

Metadata contains `:transport` (`:tcp` or `:rtu`), `:role` (`:client` or
`:master`), `:mode` (`:passive` or `:active`), `:slave`, and `:fc`. The stop
event adds `:result` (`:ok` or `:error`) and `:reason` (`nil` on success).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
