-
Notifications
You must be signed in to change notification settings - Fork 46
feat: support victoria metrics push exporter #4031
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for VictoriaMetrics as a new exporter type by implementing a push-based exporter that sends metrics to VictoriaMetrics' Prometheus-compatible endpoint. The implementation refactors common Prometheus rendering utilities into a shared package to be reused by both Prometheus and VictoriaMetrics exporters.
Key changes:
- Implements a new VictoriaMetrics exporter with URL/address-based configuration and HTTP client for pushing metrics
- Refactors Prometheus-specific histogram and escaping utilities into a shared exporters package
- Updates validation and configuration to recognize VictoriaMetrics as a valid exporter type
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/exporters/victoriametrics/victoriametrics.go | Implements the VictoriaMetrics exporter with Init, Export, Emit, and Render methods |
| cmd/exporters/victoriametrics/victoriametrics_test.go | Adds test coverage for VictoriaMetrics configuration options and rendering |
| cmd/exporters/utils.go | Extracts shared histogram and escaping utilities from Prometheus exporter |
| cmd/exporters/prometheus/prometheus.go | Refactors to use shared utilities from exporters package |
| cmd/exporters/prometheus/prometheus_test.go | Updates tests to use shared utilities |
| cmd/poller/poller.go | Adds VictoriaMetrics case to exporter loading logic |
| cmd/tools/doctor/doctor.go | Adds VictoriaMetrics to valid exporter types |
| cmd/tools/doctor/testdata/testConfig.yml | Adds test configurations for VictoriaMetrics |
| pkg/tree/tree_test.go | Updates expected exporter count from 13 to 17 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.