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

[CHORE] adding metric usage correlation #162

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

nicolastakashi
Copy link
Owner

This pull request introduces significant changes to the prom-analytics-proxy project, focusing on adding new metrics usage endpoints, updating database schema and operations, and modifying dependencies.

New Endpoints and Routes:

  • Added new endpoints for metrics usage: /api/v1/serieUsage/{name} and /api/v1/metrics in api/routes/routes.go. These endpoints handle the retrieval and pushing of metrics usage data. [1] [2]

Database Schema and Operations:

  • Introduced new tables for storing rules usage in ClickHouse, PostgreSQL, and SQLite databases. This includes creating the table schemas and implementing methods to insert and retrieve rules usage data. [1] [2] [3]
  • Added new methods in database providers for inserting and retrieving rules usage data, including pagination support and JSON handling for labels. [1] [2] [3]

Dependency Updates:

  • Updated go.mod to include new dependencies: github.com/perses/metrics-usage and github.com/sirupsen/logrus. Also, updated the Go version to 1.23.1 and added a toolchain specification. [1] [2] [3]

Minor Code Improvements:

  • Added JSON encoding/decoding capabilities in internal/db/clickhouse.go to handle rules usage data.
  • Improved the initialization of slices to avoid potential issues with nil slices. [1] [2]

These changes enhance the functionality of the project by adding support for metrics usage tracking and improving database interactions.

@nicolastakashi nicolastakashi changed the title Chore/metric usage correlation [CHORE] adding metric usage correlation Jan 6, 2025
@nicolastakashi nicolastakashi merged commit 0744807 into main Jan 6, 2025
8 checks passed
@nicolastakashi nicolastakashi deleted the chore/metric-usage-correlation branch January 6, 2025 23:24
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