# Grafana Cloud Configuration for wisp.place monorepo # Copy these variables to your .env file to enable Grafana integration # The observability package will automatically pick up these environment variables # ============================================================================ # Grafana Loki (for logs) # ============================================================================ # Get this from your Grafana Cloud portal under Loki → Details # Example: https://logs-prod-012.grafana.net GRAFANA_LOKI_URL=https://logs-prod-xxx.grafana.net # Authentication Option 1: Bearer Token (Grafana Cloud) GRAFANA_LOKI_TOKEN=glc_xxx # Authentication Option 2: Username/Password (Self-hosted or some Grafana setups) # GRAFANA_LOKI_USERNAME=your-username # GRAFANA_LOKI_PASSWORD=your-password # ============================================================================ # Grafana Prometheus (for metrics) # ============================================================================ # Get this from your Grafana Cloud portal under Prometheus → Details # Note: You need to add /api/prom to the base URL for OTLP export # Example: https://prometheus-prod-10-prod-us-central-0.grafana.net/api/prom GRAFANA_PROMETHEUS_URL=https://prometheus-prod-xxx.grafana.net/api/prom # Authentication Option 1: Bearer Token (Grafana Cloud) GRAFANA_PROMETHEUS_TOKEN=glc_xxx # Authentication Option 2: Username/Password (Self-hosted or some Grafana setups) # GRAFANA_PROMETHEUS_USERNAME=your-username # GRAFANA_PROMETHEUS_PASSWORD=your-password # ============================================================================ # Optional Configuration # ============================================================================ # These will be used by both main-app and hosting-service if not overridden # Service metadata (optional - defaults are provided in code) # SERVICE_NAME=wisp-app # SERVICE_VERSION=1.0.0 # Batching configuration (optional) # GRAFANA_BATCH_SIZE=100 # Flush after this many entries # GRAFANA_FLUSH_INTERVAL=5000 # Flush every 5 seconds # ============================================================================ # How to get these values: # ============================================================================ # 1. Sign up for Grafana Cloud at https://grafana.com/ # 2. Go to your Grafana Cloud portal # 3. For Loki: # - Navigate to "Connections" → "Loki" # - Click "Details" # - Copy the Push endpoint URL (without /loki/api/v1/push) # - Create an API token with push permissions # 4. For Prometheus: # - Navigate to "Connections" → "Prometheus" # - Click "Details" # - Copy the Remote Write endpoint (add /api/prom for OTLP) # - Create an API token with write permissions # ============================================================================ # Testing the integration: # ============================================================================ # 1. Copy this file's contents to your .env file # 2. Fill in the actual values # 3. Restart your services (main-app and hosting-service) # 4. Check your Grafana Cloud dashboard for incoming data # 5. Use Grafana Explore to query: # - Loki: {job="main-app"} or {job="hosting-service"} # - Prometheus: http_requests_total{service="main-app"}