Skip to content

Add basic metrics to the ETOS API#134

Open
t-persson wants to merge 5 commits intoeiffel-community:mainfrom
t-persson:add-basic-metrics
Open

Add basic metrics to the ETOS API#134
t-persson wants to merge 5 commits intoeiffel-community:mainfrom
t-persson:add-basic-metrics

Conversation

@t-persson
Copy link
Copy Markdown
Collaborator

Applicable Issues

Actually found no issue for this.

Description of the Change

Added two metrics for the v1alpha and v0 routers. A histogram for request timing and a counter for total number of requests.
With these metrics we should be able to see if the ETOS API is being overloaded by requests.

Alternate Designs

I could add a lot more metrics, but this PR is mostly just to get started testing having metrics together with opentelemetry and we should investigate which metrics we need at a later stage.

Possible Drawbacks

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by: Tobias Persson tobias.persson@axis.com

@t-persson t-persson requested a review from a team as a code owner January 29, 2026 10:40
@t-persson t-persson requested review from andmat900 and fredjn and removed request for a team January 29, 2026 10:40
@t-persson t-persson requested a review from andmat900 March 30, 2026 12:13
# pylint:disable=too-many-locals,too-many-statements


@REQUEST_TIME.labels(**START_LABELS).time()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will likely include decorator overhead too? Intended?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since it is supposed to count request time it should be included. Not that the time we spend in decorators is enough to even notice.

@t-persson t-persson requested a review from andmat900 March 30, 2026 12:36
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