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 seconds 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": [log1, log2, ...]}
. Each log
is a JSON dictionary of Modelbit's log fields.
Modelbit will post log data in requests up to 6MB in size. Make sure your webhook supports 6MB bodies.
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
.