Monitoring and Alerting
Overview of monitoring and alerting functionality for PowerSync Cloud instances
You can monitor activity and alert on issues and usage for your PowerSync Cloud instance(s):
-
Monitor Usage: View time-series and aggregated usage data with Usage Metrics
-
Monitor Service and Replication Activity: Track your PowerSync Service and replication logs with Instance Logs
-
Configure Alerts: Set up alerts for replication issues or usage activity *
- Includes Issue Alerts and/or Usage Alerts
-
Alert Notifications: Set up Email notifications or Webhooks to report events (like issue or usage alerts) to external systems *
These features can assist with troubleshooting common issues (e.g. replication errors due to a logical replication slot problem), investigating usage spikes, or being notified when usage exceeds a specific threshold.
* The availability of these features depends on your PowerSync Cloud plan. See the table below for a summary. More details are provided further below.
Summary of Feature Availability (by PowerSync Cloud Plan)
Monitoring and alerting functionality varies by PowerSync Cloud plan. This table provides a summary of availability:
Feature | Free | Pro | Team & Enterprise |
---|---|---|---|
Usage Metrics | Available | Available | Available |
Instance Logs | Available | Available | Available |
Log retention period | 24 hours | 7 days | 30 days |
Issue Alerts | Available | Available | Available |
Usage Alerts | Not available | Not available | Available |
Alert Notifications | - Email - Webhooks | - Email - Webhooks |
Self-hosting PowerSync
Similar monitoring and alerting functionality is planned for PowerSync Open Edition users and Enterprise Self-Hosted customers.
For Open Edition users, alerting APIs are currently available in an early access release. For Enterprise Self-Hosted customers we are planning a full alerting service that includes customizable alerts and webhook integrations.
Until this is available, please chat to us on our Discord to discuss your use case or any questions.
Usage Metrics
View time-series and aggregated usage data for your PowerSync instance(s), including storage size, concurrent connections, and synced data and operations. This data lets you monitor activity, spot patterns or spikes, and budget while tracking your position within our Cloud pricing plans.
View Usage Metrics
Access usage metrics in the Dashboard, in the Metrics workspace:
You have following options:
-
Filter options: data by time range.
-
Granularity: See data in a daily or hourly granularity.
-
Aggregates: View and copy aggregates for each usage metric.
-
CSV: Download data as CSV for custom calculations.
This usage data is also available programmatically via APIs in an early access release. Chat to us on our Discord if you require details.
Instance Logs
You can review logs for your PowerSync instance(s) to troubleshoot replication or sync service issues. Logs capture activity from the PowerSync Service and Replicator processes.
-
Service logs: Reflect sync processes from the PowerSync Service to clients.
-
Replicator logs: Reflect replication activity from your source database to the PowerSync Service.
Availability
The log retention period varies by plan:
-
Free plan: Logs from the last 24 hours
-
Pro plan: Logs from the last 7 days
-
Team & Enterprise plans: Logs from the last 30 days
View Instance Logs
Access instance logs through the Dashboard, in the Instance logs workspace (or by searching for the panel using the command palette):
You can manage logs with the following options:
-
Filter Options: Filter logs by level (
Note
,Error
,Warning
,Debug
) and by date range. -
Sorting: Sort logs by newest or oldest first.
-
Service Logs Metadata: Include metadata like
user_id
anduser_agent
in the logs if available. -
View Mode: Tail logs in real-time or view them statically.
-
Stack Traces: Option to show or hide stack traces for errors.
Issue Alerts
Issue alerts capture potential problems with your instance, such as connection or sync issues.
Availability
- Issue alerts are available on all Cloud plans.
Configure Issue Alerts
Issue alerts are set up per instance. To set up a new alert, navigate to your PowerSync Project tree, right-click on the “Issue Alerts” option under the selected instance, and follow the prompts.
You can set up alerts that trigger under certain conditions:
-
Connection Issues: Trigger when there is a connection problem
-
Replication/Sync Issues: Trigger when there is an issue with a replication or sync process
Severity Level
You also have the option to set the severity level of the alerts. For example, you can configure alerts to trigger only for warning
and/or fatal
issues. Free and Pro plan customers can only configure fatal
alerts.
View Issue Alerts
Once you have created an alert, you can right-click on it to open the alert logs. The logs panel includes the option to filter alerts by date range.
This command and other configuration options are also available from the command palette (SHIFT+SHIFT):
Configure Notifications
See Alert Notifications below to be notified when an issue alert is triggered.
Usage Alerts
Usage alerts trigger when specific usage metrics exceed a defined threshold. This helps with troubleshooting usage spikes, or unexpected usage activity.
Availability
Usage alerts are available on Team and Enterprise plans.
Configure Usage Alerts
Usage alerts are set up per instance. Navigate to your PowerSync Project tree, and click on the plus icon for the Usage Alerts option under your selected instance to create a new alert.
Usage alerts have the following configuration options:
-
Alert Name: A descriptive name for your alert to help identify it
-
Metric: Select from the following usage metrics to monitor:
- Data Synced
- Data Replicated
- Operations Synced
- Operations Replicated
- Peak Concurrent Connections
- Storage Size
These metrics correspond to the data shown in the Usage Metrics workspace and align with the PowerSync Service parameters outlined in our pricing.
-
Window (minutes): The number of minutes to look back when evaluating usage. All usage data points within this time window are included when determining if the configured threshold has been crossed
-
Calculation: Choose how to aggregate all data points within the window before comparing to the threshold:
- Average over window: Calculate the average of all values
- Max over window: Use the highest value
- Min over window: Use the lowest value
-
Threshold Condition: Set whether the alert triggers when usage goes Above or Below the specified value
-
Threshold Value: The numeric limit for the selected metric (in bytes for size-based metrics; count for all others)
View Usage Alert Logs
Once you have created an alert, you can right-click on it to open the alert logs. The logs panel includes the option to filter alerts by date range.
This command and other configuration options are also available from the command palette (SHIFT+SHIFT):
Configure Notifications
See Alert Notifications below to be notified when a usage alert is triggered.
Alert Notifications
You can set up notifications to be informed of issue or metric alerts, as well as deploy state changes. PowerSync provides multiple notification methods that trigger both when an alert becomes active and when it returns to normal (indicating the monitored conditions are back within acceptable thresholds).
- Email Notifications: Send alerts directly to your email address
- Webhooks: Notify external systems and services
Availability
-
Email notifications: Available on all plans (Free, Pro, Team and Enterprise)
-
Webhooks: Available on Pro, Team and Enterprise plans
Email Notifications
Email notifications allow you to receive alerts directly to your email address when specific events occur in PowerSync.
Set Up Email Notifications
Navigate to the Email Rules section in your PowerSync Project tree, and click on the plus icon to create a new email rule for your project.
Accounts on the Free plan are restricted to a single email rule; customers on paid plans can create an unlimited number of email rules.
Configuration
-
Email Address: Specify the email address that will receive the notifications
-
Event Triggers: Select one or more of the following events to trigger the email notification:
-
Issue alert state change
-
Usage alert state change (Team & Enterprise plan only)
-
Deploy state change
-
-
Enable/Disable: Control whether the email rule is active
Webhooks
Webhooks enable you to notify external systems when specific events occur in PowerSync.
Set Up Webhooks
Navigate to the Webhooks section in your PowerSync Project tree, and click on the plus icon to create a new webhook for your project.
Webhook Configuration
-
Specify Webhook Endpoint: Define the endpoint that will receive the webhook request (starting with
https://
). -
Event Triggers: Select one or more of the following events to trigger the webhook:
-
Issue alert state change
-
Usage alert state change (Team & Enterprise plan only)
-
Deploy state change
-
You can control how webhooks operate:
-
Enable, disable, or pause a webhook
-
If paused, invocations can still be generated and queued, but they won’t be processed
-
If disabled, invocations won’t be generated
-
-
Choose sequential or concurrent execution
- If concurrent, you can set the maximum number of concurrent invocations
-
Configure retry attempts for failed webhook deliveries
Webhook Secret
After creating a webhook, a secret is automatically generated and copied to your clipboard. Store this secret since you’ll need it to verify the webhook request signature. See Webhook Signature Verification
Test Webhooks
A test webhook can be sent to your specified endpoint to verify your setup. Right-click on a webhook in the PowerSync project tree and select the Test Webhook option:
Webhook Signature Verification
Every webhook request contains an x-journey-signature
header, which is a base64-encoded HMAC (Hash-based Message Authentication Code). To verify the request, you need to compute the HMAC using the shared secret that was generated when you created the webhook, and compare it to the value in the x-journey-signature
header.
JavaScript Example
Regenerate Secret
You can regenerate the secret used to validate the webhook signature. Right-click on a webhook in the PowerSync project tree and select the Regenerate secret option.
View Webhook Invocation Logs
You can review webhook invocation logs in the Dashboard and filter them by date. Right-click on a webhook in the PowerSync project tree and select the View webhook invocation logs option.