Skip to content

Comments

Implement Prometheus exporter#62

Merged
No767 merged 8 commits intomainfrom
noelle/prometheus
Jul 21, 2025
Merged

Implement Prometheus exporter#62
No767 merged 8 commits intomainfrom
noelle/prometheus

Conversation

@No767
Copy link
Member

@No767 No767 commented Jul 21, 2025

Summary

Implements Prometheus metrics through prometheus-fastapi-instrumentator. This is the final general feature for Kanae, as
it was asked for me to implement metrics for data collection. This PR only adds basic HTTP metrics, such as response size and the amount of requests made. This does not include metrics directly from Kanae; only the default HTTP metrics. This PR fully completes all general features for Kanae, as this feature was asked by previous leadership to implement.

There are some notable changes compared to previous versions in this PR. Namely:

  • Metrics are exposed on the same server as all operations. Thus, the endpoint becomes 127.0.0.1:8000/metrics, not 127.0.0.1:9555/metrics as envisioned
  • Added deploy/launcher.sh in order to reliably allow the Prometheus client library to manage multiprocess collection
  • Ensure that all .sh files have their EOL set to LF instead of automatically choosing

Types of changes

What types of changes does your code introduce to Kanae?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (Updates to README.md, the documentation, etc)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes. (if appropriate)
  • All workflows pass with my new changes
  • This PR does not address a duplicate issue or PR

@No767 No767 marked this pull request as draft July 21, 2025 16:18
@sonarqubecloud
Copy link

@No767 No767 marked this pull request as ready for review July 21, 2025 18:03
@No767 No767 merged commit d18ef4a into main Jul 21, 2025
13 checks passed
@No767 No767 deleted the noelle/prometheus branch July 21, 2025 18:03
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.

1 participant