supabase / supabase-grafana

Observability for your Supabase project, using Prometheus/Grafana
https://supabase.com
MIT License
184 stars 37 forks source link

Add docs for usage with Grafana Cloud #12

Closed jpmcb closed 6 months ago

jpmcb commented 7 months ago

Improve documentation

Describe the problem

The current docs found in this GitHub repo are great for deploying a prometheus, grafana stack with the dashboards and the scrape config all in one.

But I'd love to get a better understanding how this agent can be used to send metrics to a Grafana cloud instance / another Grafana: it's inconvenient to have to use this agent with a Grafana that's deployed within the container.

Describe the improvement

Instructions on use as a standalone metrics agent

Additional context

I've also looked at: https://supabase.com/docs/guides/platform/metrics but those aren't too helpful since that scrape endpoint would require an agent to continuously get metrics (which it points to this repo as for that exact use case):

Additionally, we maintain a guide on quickly setting up a scraping agent to work with Grafana Cloud.

encima commented 6 months ago

Hello, thanks for opening this.

Unfortunately, the setup you describe is the pull pattern of most metrics. With Prometheus (or similar), there needs to be something to scrape the metrics coming from the endpoint.

The docs are not as accurate as they could be, you are right. This repo is an example to setup a self-hosted Grafana or deploy to Fly.

For use with Grafana Cloud, you would need an instance to push the metrics to your account (see their docs here).

I would be hesitant to add this to the docs here as we do not want to be seen endorsing one platform over another. Grafana Cloud is great, of course, but there are others available and you are welcome to use any of them as Prometheus is considered an industry standard.

jpmcb commented 6 months ago

👍🏼 for what it's worth, I was able to get it setup on Grafana cloud by using the agentless monitoring and pointing it at our Supabase metrics endpoint: https://grafana.com/blog/2023/09/21/introducing-agentless-monitoring-for-prometheus-in-grafana-cloud/