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: add spaceapi_validation_versions metric indicating all versions supported by an endpoint #15

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

s3lph
Copy link
Member

@s3lph s3lph commented Jan 26, 2025

As a developer of SpaceAPI client software, it is of interest to me to know which schema versions are supported by which endpoints.

The directory collector already has the spaceapi_version metric delivering an overall distribution of used versions. However, there is currently no metric telling me e.g. how many endpoints that still implement v0.13 are also compliant with v14.

This PR adds the spaceapi_validation_version gauge metric with a version label. The metric is set for each version indicated to be supported by the endpoint, as returned by the validator's checkedVersions key, e.g.:

spaceapi_validation_version{route="https://spaceapi.kabelsalat.ch/",version="13"} 1
spaceapi_validation_version{route="https://spaceapi.kabelsalat.ch/",version="14"} 1
spaceapi_validation_version{route="https://spaceapi.kabelsalat.ch/",version="15"} 1

This PR bumps the github.com/spaceapi-community/go-spaceapi-validator-client dependency from v1.1.0 to v1.2.0 to make use of the checkedVersions key that was introduced in this version.

@s3lph s3lph requested review from dbrgn and gidsi January 28, 2025 16:05
@s3lph s3lph self-assigned this Jan 28, 2025
@dbrgn
Copy link
Contributor

dbrgn commented Jan 29, 2025

Ah, this is where the stats come from!

I only glanced over the diff, but it looks good to me.

@s3lph s3lph merged commit 3fb24ef into SpaceApi:master Feb 1, 2025
@s3lph s3lph deleted the feat-versions branch February 1, 2025 13:38
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.

None yet

2 participants