This guide is for platform builders who want to integrate StackOne action logs with their existing monitoring infrastructure. For debugging individual failed requests, see Request Log Debugging. To build embedded log dashboards, see Request Log Dashboards.
Integration approaches
Choose the approach that fits your needs:Query request logs
Logs are read withPOST /logs. Filters, ordering and pagination all travel in the JSON body rather than the query string.
One row is one action run, and that includes MCP tool calls.
- cURL
- TypeScript (Node)
- Python
Key fields for monitoring
Filter logs
Filters go in thefilters object. Most take an array of strings, so a single value still needs brackets. The rest are scalars, and List Logs gives the type of each.
- cURL
- TypeScript (Node)
Grafana direct polling
The simplest approach is to let Grafana poll the StackOne API directly using the Infinity data source.Setup
- Install the Infinity plugin in Grafana
- Add a new Infinity data source with these settings:
Example query
BecausePOST /logs reads its filters from the body, the Infinity panel needs to send a POST with a JSON body rather than a URL with query parameters:
data so Infinity reads the array rather than the pagination envelope.
Dashboard variables
Create variables for dynamic filtering, and interpolate them into the body as JSON arrays:
With multi-value variables, the
${connector:json} format option renders the selection as a JSON array, which is what the filter expects:
Build a log sync worker
For high-volume ingestion or when you need to transform logs before storing, build a sync worker that polls the StackOne API and forwards logs to your observability platform.Core pattern
Page forward until you have collectedtotal rows. Bound each run with both start_time and end_time so the result set cannot shift underneath the sweep, and order ascending by event_time so the sequence is deterministic.
A run that fails partway is retried whole, because the window is only checkpointed once it completes. Make forwarding idempotent on log_id so the retry does not duplicate rows your platform already holds.
- TypeScript (Node)
- Python
Platform-specific examples
- Grafana Loki
- Datadog
- OpenTelemetry
Suggested dashboards
Key metrics to track
Grafana dashboard JSON
These panels query Prometheus, so they assume you already turn action logs into metrics, for example by having the sync worker increment counters as it forwards each row. StackOne does not expose a metrics endpoint, sostackone_action_runs_total and stackone_action_duration_bucket are series you define, not ones you can scrape.
Related
Request Logs API
Full API reference for logs
Dashboard Logs
View logs in the StackOne dashboard
Webhooks
Real-time event notifications