Skip to main content

Receiving logs with a webhook

To receive logs you need a public webhook URL that can receive POST requests. Logs will be posted to this URL frequently in batches, typically within 1 minute of when the inferences took place.

In Settings, click Integrations and then Deployment Logs Webhook to add your webhook URL to Modelbit.

The body of the posted log data is a JSON object with the format { "data": [log-1, log-2, ...]}. Each log is a JSON dictionary with the fields specified below.

Request Size

Modelbit will post log data in requests up to 6MB in size. Make sure your webhook supports 6MB bodies.

For information on the log format, see the list of available log fields.

Authenticating with secret values

To improve the security of your webhook endpoint you can have Modelbit include a secret value in the request's headers. Requests including this secret value can be trusted as coming from Modelbit, and all other requests can be ignored.

Open the Deployment Logs Webhook integration form and enable Include a secret header value. Set a secret value, or use the one generated by Modelbit.

The value will be present in the header x-mb-webhook-secret.