blueswen/fastapi-observability

GCP Cloud Run and Grafana Cloud

Opened this issue · 2 comments

Hi,

How can I deploy this with my FastAPI cloud run application and connect it to Grafana cloud?
Because in cloud run only one container can be active

I don't have the experience to integrate GCP Cloud Run with Grafana Cloud. But there may be some ideas that could give a try:

  1. Logs:
    1. Just using Cloud Logging and Google Cloud Logging data source on Grafana Cloud.
    2. Or create a Grafana Agent service to collect logs in Cloud Logging from pub/sub and transmit them to Grafana Clod Loki.
  2. Metrics:
    1. Just using Google Cloud Managed Service for Prometheus to collect the app's metrics and Prometheus data source on Grafana Cloud.
    2. Or create a Grafana Agent service to collect metrics from your app and remote write them to Grafana Cloud Prometheus.
  3. Traces:
    1. Just using Cloud Trace and Google Cloud Trace data source on Grafana Cloud.
    2. Or send trace data to Grafana Cloud Tempo directly.

The main consideration is where you want to store your observability signals. Since Cloud Run doesn't have too much controllability like VM or service in GKE, storing observability signals in GCP and then querying them with a data source plugin on Grafana Cloud may be much easier.