Metrics and Monitoring
The system tracks:
- Token usage by model and type
- Conversation counts and patterns
- Voice usage statistics
- Cost metrics for billing
Logs​
The Breign API writes its logs to standard output, one JSON object per line. Collect them with your platform's log agent; the API does not ship logs anywhere itself.
Each line carries level, message and service, plus, when they are known, the identifiers of the unit of work it belongs to: requestId, userId, organizationId, agentId, chatId and appId. Filter on requestId to follow one request end to end.
Two summary lines are written at the end of each unit of work:
message | Written | Fields |
|---|---|---|
http.request | Once per HTTP request (health and API documentation routes at debug level only) | method, route, status, duration_ms |
chat.completed | Once per chat turn | status (ok, moderated, suspended when the turn waits for a client-side tool, error), duration_ms, stream |
Request identifiers​
Every HTTP response carries an x-request-id header. If the incoming request already has one (set by a load balancer or a gateway), the API reuses it; otherwise it generates one. The same value appears as requestId in the logs.
Conversation content​
Conversation content (messages, prompts, tool arguments) is logged on purpose only when LOGGER__ is true and LOGGER__ is debug. At debug level, which is the default of the official image, the logs also contain fragments of the replies streamed while an agent uses its tools, whatever the value of LOGGER__. If your logs must not contain conversation content, set LOGGER__ to info. See Environment variables.