astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
238 stars 46 forks source link

Metrics: expose cumulative device connection time by Realm #898

Closed Annopaolo closed 6 months ago

Annopaolo commented 7 months ago

Currently there is no way to retrieve the connection time of devices via metrics. Expose a new metric to display it: In order not to blow up the cardinality of metrics, the metric should be aggregated by realm and not by device. The connection time could be computed as one of the time-based actions in lib/astarte_data_updater_plant/data_updater/impl.ex.