Skip to content

[metrics] Add RID metrics: subscriptions and isa count#1502

Merged
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:more_metrics
Jun 4, 2026
Merged

[metrics] Add RID metrics: subscriptions and isa count#1502
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:more_metrics

Conversation

@the-glu
Copy link
Copy Markdown
Contributor

@the-glu the-glu commented Jun 2, 2026

This PR add two RID metrics: subscriptions and isa count

Contrib to #1257

Copy link
Copy Markdown
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@the-glu
Copy link
Copy Markdown
Contributor Author

the-glu commented Jun 2, 2026

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.

@the-glu
Copy link
Copy Markdown
Contributor Author

the-glu commented Jun 2, 2026

I added a small cache (1s, not configurable) who should prevent unexpected cases.

@the-glu the-glu requested a review from mickmis June 2, 2026 16:00
Comment thread cmds/core-service/main.go Outdated
Comment thread cmds/core-service/otel.go
Comment thread cmds/core-service/otel.go
Comment thread cmds/core-service/main.go Outdated
@the-glu the-glu requested a review from mickmis June 3, 2026 13:30
@the-glu the-glu force-pushed the more_metrics branch 2 times, most recently from 9a97123 to 930c222 Compare June 3, 2026 13:57
Copy link
Copy Markdown
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo naming to follow semantic conventions.

Comment thread cmds/core-service/main.go Outdated
Comment thread cmds/core-service/otel.go Outdated
@the-glu the-glu requested a review from mickmis June 4, 2026 08:02
@mickmis mickmis merged commit 5268fa5 into interuss:master Jun 4, 2026
12 checks passed
@mickmis mickmis deleted the more_metrics branch June 4, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants