Skip to content

fix: change MetricsPusher to use import prometheus endpoint#1757

Merged
edgurgel merged 1 commit intomainfrom
fix/metrics-pusher
Mar 18, 2026
Merged

fix: change MetricsPusher to use import prometheus endpoint#1757
edgurgel merged 1 commit intomainfrom
fix/metrics-pusher

Conversation

@edgurgel
Copy link
Member

@edgurgel edgurgel commented Mar 18, 2026

Copilot AI review requested due to automatic review settings March 18, 2026 01:41
Copy link

Copilot AI left a 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 migrates MetricsPusher from Prometheus remote_write (protobuf + snappy via a Rustler NIF) to pushing plain Prometheus exposition text to a Prometheus import endpoint, optionally gzip-compressed.

Changes:

  • Switch MetricsPusher request format/headers to text/plain and use Req gzip body compression (compress_body) instead of remote_write encoding.
  • Remove the Rustler-based PrometheusRemoteWrite implementation and its associated Rust/native build/tooling.
  • Update MetricsPusher tests and docs to reflect the new import endpoint and gzip option.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/realtime/metrics_pusher.ex Send Prometheus text format directly, optionally gzip-compressed, and adjust headers/auth setup.
test/realtime/metrics_pusher_test.exs Update expectations to import endpoint + gzip, add a compress=false case, remove remote_write decoding assertions.
config/test.exs Sets a default metrics_pusher_auth for tests.
README.md Clarify that METRICS_PUSHER_URL is for Prometheus exposition format import.
mix.exs Remove :rustler dependency.
Dockerfile Remove Rust toolchain install and native crate copy step.
.gitignore Remove Rust/Rustler build artifact ignores.
Removed files (native/prometheus_remote_write/**, tests/fixtures) Delete the remote_write NIF implementation and its tests/fixtures and workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@coveralls
Copy link

coveralls commented Mar 18, 2026

Coverage Status

coverage: 92.171% (+0.009%) from 92.162%
when pulling 347e64d on fix/metrics-pusher
into 5816459 on main.

@edgurgel edgurgel force-pushed the fix/metrics-pusher branch from d9855d4 to 0233a17 Compare March 18, 2026 01:50
No need to use snappy and rust. We can simply send the prometheus export
format
@edgurgel edgurgel force-pushed the fix/metrics-pusher branch from 0233a17 to 347e64d Compare March 18, 2026 01:51
@edgurgel edgurgel merged commit 0b5c41b into main Mar 18, 2026
8 checks passed
@edgurgel edgurgel deleted the fix/metrics-pusher branch March 18, 2026 19: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.

4 participants