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

Add metrics endpoints #665

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add metrics endpoints #665

wants to merge 1 commit into from

Commits on Aug 14, 2023

  1. backend: Add metrics endpoints

    Pull request #656 adds the necessary instance_stats database table as well as functions for querying instance counts (by channel, version, and architecture) from the groups, instance, and instance_application tables and storing the results in the new table.
    
    To make this data accessible outside Nebraska, we create the following:
    
    - Prometheus metrics endpoint: A new HTTP endpoint (instance-metrics/prometheus) that serves only the latest snapshot from the instance_stats table. As Prometheus is a time-series database, this serves instance counts with the latest timestamp only.
    - JSON metrics data endpoint: A new HTTP endpoint that emits all instance_stats data in JSON format. The difference here is that we query for all data, and we emit one JSON document per row.
    skoeva committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    00ddefe View commit details
    Browse the repository at this point in the history