Velo: Connecting Wix Logs to a Monitoring Tool (Advanced)
The Velo logs feature allows you to connect Wix Logs to an external monitoring tool. This article explains how to connect your Wix Logs to a monitoring tool of your choice.
Notes
Overview
To connect your external monitoring tool, you need to provide Wix with an HTTP endpoint URL. There are 2 ways to create an HTTP endpoint:
Once the HTTP endpoint is set, Velo sends logs in the form of JSON objects to the endpoint. The endpoint must include code for adapting the JSON objects so that your external monitoring tool can parse them.
Wix Logs Lifecycle
To understand your part in the connection process, it's helpful to first learn the general lifecycle of Wix Logs that are connected to an external monitoring tool:
- Wix Logs records implicit and explicit logs in JSON format.
- Velo sends the JSON objects to your HTTP endpoint.
- Adapter code converts the JSON objects into a format that can be parsed by your external monitoring tool of choice.
- The adapted JSON objects are sent to your monitoring tool for analysis.
![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/b4ae9703-4364-4550-a797-1cc95ed8046e/2022/02/02/6ed2f50a-080c-4805-914a-b19cd99ec216/4d190576-d070-4da3-8369-f18e73758f09.png)
Step 1: Create an HTTP endpoint
You can set up website monitoring by either using an existing monitoring tool or by implementing your own HTTP endpoint.
Use an HTTP endpoint by an existing monitoring service
You can use external monitoring tools to create an endpoint, such as logz.io or Loggly.
Example with logz.io:
- Go to logz.io and create an account.
- Click Send data on the top-right of the page.
- Filter integrations by the Most Popular category.
- Click JSON
Read the instructions at the bottom of the page and then copy the relevant endpoint, as circled in red.
Implement your own HTTP endpoint
You can implement your own HTTP endpoint and adapter code to parse logs and integrate them with a monitoring tool of your choice.
Notes:
- You cannot create your HTTP endpoint on the Wix site you want to monitor.
- When you create your endpoint, use the POST method.
Before implementing your endpoint, familiarize yourself with the JSON representation of Wix Logs. Each log is recorded as a single log entry in JSON format. You can see a detailed description of log entries here.
Next you need to create adapter code to convert the JSON objects into a format that can be parsed by your external monitoring tool. You also need code that sends the JSON objects to the tool.
For your convenience, we created 2 open-source examples of adapter code that you can revise to implement your own HTTP endpoint:
- Example 1:
- Monitoring Tool: Google Cloud Logs
- Platform: Google App Engine
- View example
- Example 2:
- Monitoring Tool: Solarwinds Loggly
- Platform: Google App Engine
- View example
![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/b4ae9703-4364-4550-a797-1cc95ed8046e/2022/02/02/6591e1ae-2f0f-4d6a-97ef-49deec68df94/ad605092-fbf5-429f-8aa0-3baccc57d662.png)
The code is specific to the examples, but you can adapt it for the monitoring tool of your choice.
Step 2: Set Your endpoint
Once you've implemented your HTTP endpoint, you can connect Wix Logs to your monitoring tool by setting the endpoint in your site:
- In your site's dashboard, select Developer Tools.
- Select Logging Tools.
- In Connect an external logging tool, click Next>.
- In Enter your endpoint URL, enter your endpoint URL and click Connect.
Once your endpoint is connected, Velo starts sending logs to your monitoring tool.