[metrics] Add RID metrics: subscriptions and isa count#1502
Conversation
mickmis
left a comment
There was a problem hiding this comment.
Having a metric actively pulled from somewhere external to the runtime and doing a DB query sounds a bit dangerous. What about decoupling the DB polling from the the observe callback? And have a routine periodically querying those stats. We already have some form of 'DB' ping that could be put in common.
I don't think that an issue? It's very simple, readonly calls, using index / simple count only (and probably cached), and this allows calls to fetch as fast or as slow as needed in term of update interval from the monitoring system, without enforcing an update interval. Causing performances issues would mean DDOS on purpose, on an private, separate endpoint, and this can already be done on others, public by design. |
|
I added a small cache (1s, not configurable) who should prevent unexpected cases. |
9a97123 to
930c222
Compare
mickmis
left a comment
There was a problem hiding this comment.
LGTM modulo naming to follow semantic conventions.
This PR add two RID metrics: subscriptions and isa count
Contrib to #1257