#335
How to config metrics properly
Improve documentation
Link
https://supabase.github.io/supavisor/monitoring/metrics/
Describe the problem
curl -X 'GET' 'http://localhost:4000/metrics/supabase-staging' -H 'accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODAxNjIxNTR9.U9orU6YYqXAtpF8uAiw6MS553tm4XxRzxOhz2IwDhpY' | jq
curl -X 'GET' 'http://localhost:4000/metrics' -H 'accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODAxNjIxNTR9.U9orU6YYqXAtpF8uAiw6MS553tm4XxRzxOhz2IwDhpY' | jqboth return nothing
Describe the improvement
How to config metrics properly ?
Activity
3version: '3'
services:
supavisor:
image: supabase/supavisor:1.1.45
container_name: supavisor
restart: always
ports:
- 4000:4000
- 5452:5452
- 6543:6543
environment:
PORT: 4000
PROXY_PORT_SESSION: 5452
PROXY_PORT_TRANSACTION: 6543
# DATABASE_URL: "ecto://postgres:postgres@host.docker.internal:5432/postgres"
DATABASE_URL: "ecto://supavisor:5w8JwUGH7wJBJflTPanW6wfiV7+7glCUCe3g@172.16.0.11:5432/postgres"
# DATABASE_URL: "ecto://postgres:password@db:5432/postgres"
CLUSTER_POSTGRES: "true"
SECRET_KEY_BASE: "4dbd5a53cd015363f63942622186ba205b498708f8b84679aaf9878737a766b2"
VAULT_ENC_KEY: "12345678901234567890123456789032"
API_JWT_SECRET: "dev"
METRICS_JWT_SECRET: "b8b55cf842a180997addc72c10493adbe35f6b2d13b223a9aa105b189a695317"
REGION: "local"
ERL_AFLAGS: -proto_dist inet_tcp
depends_on:
- db
command: sh -c "/app/bin/migrate && /app/bin/server"@dfang hey, are you still experiencing this issue?
Hey @dfang,
Thanks for flagging the issue. Mind sharing what your setup looks like?
I'm running
make devmake db_startcurl -X 'GET' 'http://localhost:4000/metrics' -H 'accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODAxNjIxNTR9.U9orU6YYqXAtpF8uAiw6MS553tm4XxRzxOhz2IwDhpY' | jqand am able to receive metrics.
Here's a truncated sample: