This integration is available to our Enterprise users.
Logmatic.io is a log visualization tool where you can funnel logs from all of your sources, correlate them, be alerted on issues and find their root cause. It is a great complement to Blackfire, as it can both log Blackfire data such as build reports history, and trigger Blackfire scenarios whenever an alert is raised. Basically, combining other log sources, this integration can help you automatically get more information on the performance of your code if an issue arises.
Create a Logmatic.io Alert based on an event that would require more information about the code's behavior and its resources consumption (for instance, that could be when the CPU usage is too high for more than 15 minutes).
Then add a new Alert Endpoint and use the webhook type to enable Blackfire.
Finally, configure the channel with the Base URL and Basic Auth credentials
which can be found in the Dashboard
Builds tab, in the Logmatic.io integration.
JSON Template field is not useful here, so you can simply leave it
A new build report will be generated each time an alert is raised through the Notification channel. You might need to adjust the alert thresholds in order to get an appropriate build report rhythm.
Logmatic.io's webhook URL looks like the following:
http://CLIENT-ID:CLIENT-TOKEN@blackfire.io/api/v1/build/env/UUID/logmatic. By default, this will hit the endpoint you
configured in your Blackfire environment options.
In order to override it, you can append an
endpoint query parameter.
Anytime a build report is available, the Logmatic.io notification channel will send data to Logmatic.io, which can parse and display it.
To configure a Logmatic.io notification channel, in the dashboard, go to the "Builds" tab of an environment and look for the Notification Channels section. Add a new notification channel. The notification channel simply needs the HTTP/S API endpoint (Example: https://api.logmatic.io/v1/input/<your_logmatic_api_key>).
The data sent is:
||The unique identifier of the build (if exists)|
||The unique identifier of the parent build (if exists)|
||Links to the build results page|