The device service SDKs shall collect and report the following metrics

1) Metrics defined for all EdgeX services in ADR #0006

  • Service uptime
  • Cumulative API requests succeeded / failed / invalid
  • Average response time for API requests
  • Average and Maximum request size

Note: The API requests of interest are the device accesses. For Device service purposes "request size" is to be read as "event size"

2) Metrics defined for Device Services in ADR #0006

  • Number of devices managed by this service
  • Device requests

Note: For "Device requests" we shall provide:

  • total number of events generated
  • total number of readings generated
  • number of events generated in the last sampling period (configurable with a default of 1 minute)
  • data volume of events generated in the last sampling period.

3) Metrics which will replace the lastConnected field in v3

  • Last successful read or write access (per device)

In addition the SDKs shall provide a facility for the device service implementations to collect and report custom metrics for that service.

  • No labels

3 Comments

  1. Note the sampling to get number of events generated or data volume can be derived from the raw data be the receiver. 

  2. Iain's idea of handling the metrics for the REST request in the REST handler middleware is something that we should look into. Might be a bit tricky, but would be nice to have is a central reusable code.

  3. Per WG meeting 6/6/22:

    Service uptime → better handled by querying the environment eg docker, ps etc

    Number of devices managed → can be obtained from core-metadata

    Requests success/fail/invalid → count fail+invalid only