Open dgzlopes opened 3 years ago
Hi @dgzlopes ! Sounds great, what is the use case for supporting this ? Which backend do you want to exporting to ?
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).
Yep, sounds like a good idea. Would you be able to make a PR for it ? Thanks :)
@ocervell I've forked @oktocat 's repo that was the source of PR https://github.com/google/slo-generator/pull/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. :)
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:Inspiration: https://pypi.org/project/opentelemetry-exporter-prometheus-remote-write/