Metrics
Overview of metrics and monitoring in IntelliAsk — the app's built-in Prometheus endpoint and the standalone Metrics Exporter. Points to the full exporter configuration and metrics catalog.
IntelliAsk exposes usage and operational data to Prometheus (or any OpenMetrics-compatible tool) so you can build Grafana dashboards for active users, token usage, models, ratings, and more.

There are two sources of metrics, covering different things:
- App-side endpoint — the IntelliAsk API server's own
/metricsendpoint, covering runtime/HTTP internals (documented below). - Metrics Exporter — a separate service (
exporter) that reads the MongoDB database and exposes richintelliask_*usage metrics (users, tokens, models, ratings, tools, files).
Metrics Exporter (usage metrics)
The Metrics Exporter is the recommended way to get usage analytics. It is a
bundled, optional stack component — enable it and it scrapes MongoDB and serves
intelliask_* metrics for Prometheus to scrape and Grafana to visualize.
Full reference
This page is just an overview. For the exporter's complete configuration (MongoDB
connection, caching, per-group metric toggles, logging) and the full catalog of
exposed intelliask_* metrics, see
Services → Metrics Exporter.
Metrics Exporter (service reference)
What it is, how it works, and how it is wired into the stack.
Configuration
Every variable — MongoDB, caching, timezone, the per-group metric toggles, logging, and the optional health check.
Metrics catalog
The full list of exposed intelliask_* metrics — name, type, labels, and what
each measures.
Deploy → Components → Exporter
Image tag, resource limits, env keys, and exposing it through the reverse proxy.
In the stack the exporter runs on container port 8000, published on host port
9100. Point your Prometheus scrape config at it and look for intelliask_*
metrics (e.g. intelliask_registered_users).
App-side metrics endpoint
Separately from the exporter, the IntelliAsk API server exposes its own built-in Prometheus metrics at /metrics. Set METRICS_SECRET and scrape the endpoint with Authorization: Bearer <METRICS_SECRET>. The endpoint returns 401 when the secret is unset, the header is missing, or the token does not match.
Process, HTTP, and Request Metrics
The endpoint also exposes the default Node.js and process metrics from prom-client, plus the following series.
| Group | Metric | Labels |
|---|---|---|
| HTTP | http_requests_total, http_request_duration_seconds | method, path, status |
| HTTP | http_requests_in_flight, http_request_body_bytes (from Content-Length) | method, path |
| SSE | sse_streams_total, sse_stream_duration_seconds | method, path, status |
| SSE | sse_streams_in_flight | method, path |
| Uploads | upload_requests_total, upload_request_duration_seconds | method, path, status |
| Uploads | upload_requests_in_flight, upload_bytes_total (from Content-Length) | method, path |
| OpenID | openid_user_lookup_total, openid_user_lookup_duration_seconds | result |
| Mongoose | mongoose_queries_total, mongoose_query_duration_seconds | model, operation, status |
| Generation jobs | generation_jobs_total | store, result |
| Generation jobs | generation_jobs_in_flight | store |
| Generation streams | generation_stream_subscriptions_total | store, type, result |
| Generation streams | generation_stream_resume_pending_events_total, generation_stream_early_buffer_overflows_total, generation_stream_first_attachment_delay_seconds | store |
| Generation streams | generation_stream_attachment_outcomes_total | store, outcome |
| Generation streams | generation_stream_recoveries_total, generation_stream_recovery_duration_seconds, generation_stream_recovery_events, generation_stream_recovery_content_parts | store, method, outcome |
| Content filter | content_filter_locator_traversal_failures_total | operation, reason |
| Content filter | content_filter_locator_traversal_size | operation, reason, dimension |
The generation stream recovery metrics describe how an early event buffer that overflowed is reconstructed. The content filter metrics count incomplete resolved file locator traversals.
Agent Startup Metrics
Initial Agent chat requests emit two startup metrics:
agent_startup_milestone_duration_seconds{milestone}measures cumulative latency from request ingress to each startup milestone.agent_startups_total{result}counts startup attempts by terminal result.
Milestones cover request admission, job creation and acknowledgement, conversation and history loading, client and run initialization, stream startup, and the first queued response or content event. Results distinguish content queued, completion without a content delta, deduplication, rejection, pause, replacement, abort, and error.
When backend OpenTelemetry tracing is enabled, the intelliask.agent.startup span reports the same milestones as events. It includes total startup duration, milestone count, terminal result, and the generation stream ID when one is assigned.
Redis Metrics
Redis-backed caches and services emit two logical-operation metrics:
redis_operations_total{client,use_case,operation,status}counts operations.redis_operation_duration_seconds{client,use_case,operation,status}measures latency.
client is keyv or ioredis, and status is success or error. Bounded use_case labels identify work such as caches, sessions, rate limits, concurrency, ACL principals, resumable stream jobs and pub/sub, MCP registry scans, and leader election. These metrics count IntelliAsk's logical operations rather than every internal Redis round trip. Connection lifecycle pings and global maintenance are excluded, and clearing a namespace is counted as one logical operation.
When backend OpenTelemetry tracing is enabled, each HTTP span also summarizes its Redis work with:
intelliask.redis.callsintelliask.redis.duration_msintelliask.redis.errorsintelliask.redis.max_call_msintelliask.redis.operationsintelliask.redis.use_cases
The ten use cases with the highest total duration also receive calls, duration_ms, errors, and max_call_ms attributes under intelliask.redis.<use_case>.*. This request-level summary does not require command-level Redis spans; enable OTEL_IOREDIS_TRACING_ENABLED only when individual command spans are needed.
Browser RUM Proxy Metrics
Browser RUM proxy outcomes are reported as rum_proxy_requests_total{endpoint,result}. endpoint is traces, logs, or unknown; result can be success, auth_drop, auth_error, bad_request, not_configured, collector_4xx, collector_5xx, collector_error, or collector_timeout.
Agent Event Actor Metrics
Durable bound Agent Events expose low-cardinality receipt and recovery metrics:
agent_event_actor_receipt_operations_total{operation,outcome,resolution}counts receipt reads, settlement, and legacy backfill.operationisread,settle, orbackfill;outcomeishit,miss,success,replay, orconflict.agent_event_actor_receipts_retained{resolution}reports replay receipts retained bycheckpoint_verified,action_compensated, orhistory_repairedresolution.agent_event_actor_receipts_expiry_eligiblereports retained receipts whose 90-day MongoDB TTL has elapsed but which have not yet been removed.agent_event_actor_reconciliations_pendingreports active reconciliation markers waiting for a terminal receipt.agent_event_actor_oldest_reconciliation_age_secondsreports the age of the oldest active reconciliation.agent_event_actor_deliveries{state}reports delivery rows currently inretryordeadstate.
Storage gauges are collected on authenticated scrapes and cached for up to 60 seconds. Alert on sustained reconciliation age, dead deliveries, or expiry-eligible receipts rather than a single scrape.
Shared-Link Metrics
share_link_rejections_total{operation,code} counts bounded create or update failures. operation is create or update; code is TARGET_MESSAGE_NOT_FOUND when the selected branch tail is not persisted, or NO_MESSAGES when the conversation has no persisted messages. The metric contains no conversation text or user identity.
Last updated on