Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(station): serve metrics as properly certified HTTP asset #341

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

mraszyk
Copy link
Collaborator

@mraszyk mraszyk commented Sep 5, 2024

This PR serves station and control panel metrics as properly certified HTTP assets. The metrics include the timestamp at which they were exported. The metrics are refreshed and certified every time the metrics change, but they are not refreshed in a query call if only the canister cycles balance changes.

This PR also bumps dfinity/response-verification to eefc99e2a0041ae46873864e6e2f7aa8506a361f.

@mraszyk mraszyk marked this pull request as ready for review September 6, 2024 09:03
@mraszyk mraszyk requested a review from a team as a code owner September 6, 2024 09:03
with_metrics_registry(SERVICE_NAME, |registry| {
registry
.gauge_mut(
"metrics_timestamp",
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively the metrics registry could be adapted to use the prometheus format which optionally can include timestamp per each metric (check here)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't see how this can be done with the Rust prometheus crate.

@mraszyk mraszyk marked this pull request as draft September 12, 2024 10:55
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