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

[New exporter] Prometheus Remote Write #122

Open
dgzlopes opened this issue Feb 22, 2021 · 4 comments · May be fixed by #177
Open

[New exporter] Prometheus Remote Write #122

dgzlopes opened this issue Feb 22, 2021 · 4 comments · May be fixed by #177
Labels
feature New feature or request help wanted Extra attention is needed not enough requests

Comments

@dgzlopes
Copy link

dgzlopes commented Feb 22, 2021

The remote write and remote read features of Prometheus allow transparently sending and receiving samples.

Right now slo-generator has support for the Prometheus Push Gateway, but I think having support for Remote Write would be really cool! b/c:

  • Let's the user export the metrics to a wide-array of Remote Write compatible storages.
  • Removes the need for a "3rth" component: The Push Gateway.

Inspiration: https://pypi.org/project/opentelemetry-exporter-prometheus-remote-write/

@ocervell
Copy link
Collaborator

Hi @dgzlopes ! Sounds great, what is the use case for supporting this ? Which backend do you want to exporting to ?

@dgzlopes
Copy link
Author

dgzlopes commented Feb 23, 2021

In our case, we're using Grafana Cloud.

To ship the metrics to this "hosted" Prometheus instance we've to use Prometheus Remote Write.

I suppose that I can deploy the PushGateway and collect the metrics the same way I do with the rest of the services, but I thought that maybe skipping this third service was a good idea (fewer things to operate :P).

@ocervell
Copy link
Collaborator

Yep, sounds like a good idea. Would you be able to make a PR for it ? Thanks :)

@ocervell ocervell added contributors_needed feature New feature or request help wanted Extra attention is needed and removed help_needed labels May 12, 2021
@ocervell ocervell changed the title Support Prometheus Remote Write as Exporter [New exporter] Prometheus Remote Write Jun 2, 2021
@oktocat oktocat linked a pull request Oct 15, 2021 that will close this issue
oktocat added a commit to oktocat/slo-generator that referenced this issue Oct 20, 2021
closes: google#122

Co-authored-by: Kevin Labesse <[email protected]>
Signed-off-by: Kevin Labesse <[email protected]>
Signed-off-by: Denis Zaitcev <[email protected]>
@skinlayers
Copy link

skinlayers commented Aug 17, 2023

@ocervell I've forked @oktocat 's repo that was the source of PR #177. I've rebased it on the latest master and updated the changes. Unfortunately, the remote write related tests are failing. As I've never worked with mock before, I have been unable to fix the tests.
Example:

FAILED tests/unit/test_compute.py::TestCompute::test_export_prometheus_remote_write - RuntimeError: Working outside of application context.

But the code does appear to work when tested against a local Granfana Mimir setup.

I'm going to see if I can get approval to share my the updated code upstream. In the mean time, I'm going to try to implement the changes you requested in the original PR. Let me know if there's anything else I can do to help get this integrated smoothly. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed not enough requests
Projects
None yet
3 participants