PowerSync exposes instance metrics via a Prometheus-compatible endpoint. This allows you to integrate with Prometheus or other monitoring systems that scrape Prometheus endpoints.
It’s not recommended to scrape the Prometheus endpoint manually, we suggest using Prometheus or other compatible tools. PowerSync does not currently support pushing to OpenTelemetry collectors.
To enable metrics, update your PowerSync YAML file to include the prometheus_port and set a port number.
powersync.yaml
Copy
Ask AI
telemetry: # Set the port at which the Prometheus metrics will be exposed prometheus_port: 9090
Update your Docker compose file to forward the prometheus_port.
docker-compose.yaml
Copy
Ask AI
ports: # Forward port 8080 for the PowerSync service - 8080:8080 # Forward port 9090 for Prometheus metrics - 9090:9090
Once enabled, restart the service and the metrics endpoint will return Prometheus-formatted metrics, as described in the What is Collected section of the Telemetry docs.
If you’re running multiple containers (e.g. splitting up replication containers and API containers) you need to scrape the metrics separately for each container.