Observability and analytics
Temps turns application activity and platform health signals into views for product analysis and operations. Analytics explains what users and systems do. Observability explains how a running system behaves through traces, metrics, logs, errors, health checks, and alerts.
System model
Signal families
Each signal family answers a different operational question. Analytics focuses on user and product behavior. OpenTelemetry (OTel) telemetry focuses on application execution. Error tracking groups failures for repair. Monitoring turns selected measurements and checks into action.
| Signal family | Main question | Typical views |
|---|---|---|
| Analytics | What did visitors and users do? | Visits, pages, events, funnels, visitor journeys, performance, and session replay |
| Traces | Where did a request spend time? | Trace lists, span trees, operations, and cross-service detail |
| Metrics | How is a service or workload changing over time? | Time series, dashboards, correlations, and metric alerts |
| Logs | What structured record explains an event? | Severity-filtered logs with search, context, aggregates, and trace links |
| Errors | Which failures need attention? | Cross-project issue groups, affected users, trends, and issue status |
| Platform signals | Is the hosted platform healthy? | Requests, errors, revenue activity, node health, alarms, and service metrics |
The boundaries matter. A product event such as purchase belongs to analytics. A database latency measurement belongs to metrics. A failure with a stack trace belongs to error tracking or traces rather than a plain log line. The separate products keep each signal useful for its intended query and retention pattern.
References: crates/…/mod.rs• L93-155 crates/…/types.rs• L11-49 crates/…/alarm_service.rs• L27-89
End-to-end flow
The platform follows a common path from signal capture to an operator view, but each signal family keeps its own meaning and query surface.
flowchart LR
A[Application and platform activity] --> B{Signal family}
B -->|User behavior| C[Analytics capture]
B -->|Traces, metrics, logs| D[OTel ingestion]
B -->|Runtime logs| E[Container log collection]
B -->|Errors| F[Error tracking]
B -->|Health and thresholds| G[Platform monitoring]
C --> H[Analytics storage and query]
D --> I[Telemetry storage and query]
E --> J[Chunk storage and log index]
F --> K[Issue groups and error trends]
G --> L[Checks, alarms, and incidents]
H --> M[Analytics views]
I --> N[Traces and metrics]
J --> O[Search, tail, and log analytics]
K --> P[Error views and notifications]
L --> Q[Status and notification views]
Project, environment, deployment, service, and worker-node context travels with a signal where available. This lets a reader move from a trend to the workload, request, or issue that produced it. Cross-project views apply access rules before they combine data and keep the owning project or service on each result.
References: crates/…/query_handler.rs• L514-555 crates/…/global.rs• L487-593 crates/…/alarm_service.rs• L297-464
Capture and ingestion
Analytics capture
Analytics accepts browser activity and server-side product events. Browser capture uses the deployed application's request context to associate an event with a project. Authenticated server-side capture supplies the project and deployment context directly. This is the safer path for business events that must match a completed transaction.
The analytics family also includes page views, visitor and session identity, Web Vitals, performance samples, and session replay. Apps that are not deployed by Temps can use a project-scoped, optionally environment-scoped analytics ingest key for supported analytics signals. The key is a public write credential designed for browser code, not a secret or authority for business data. Operators can restrict browser origins, set a per-key request limit, rotate a value, or revoke it while keeping its history. Management is limited to the project scope and is audited; deployment tokens cannot manage these credentials. The ingest endpoint can provide the configured public platform address for the install snippet.
An environment-scoped key derives the current deployment when it resolves. Deployments therefore do not require a new key, and deployment route updates invalidate cached scope so new events do not stay tied to the old deployment.
Visitor views can narrow a date range by geography, first-touch channel, or first-touch referrer. Facet results describe the current visitor group while keeping alternative values available for each filter. Visitor enrichment merges top-level attributes and records an audit event for a real change without copying attribute values into the audit trail. Deployment-token enrichment stays project-bound and has a per-token write budget.
API traffic analytics adds request volume, errors, latency, top routes, and top callers. Its optional AI summary is an assisted view of the same bounded traffic window, not a replacement for the raw request data.
For the product-level view of these capabilities, see Analytics products.
References: crates/…/analytics.rs• L33-106 crates/…/analytics.rs• L376-427 crates/…/handler.rs• L327-557 crates/…/visitor_audit.rs• L40-59 crates/…/handlers.rs• L212-280 crates/…/handlers.rs• L445-572 crates/…/types.rs• L59-185 crates/…/plugin.rs• L85-92 crates/…/plugin.rs• L157-205 crates/…/plugin.rs• L222-263
OpenTelemetry ingestion
OTel is the standard input for application traces, metrics, and structured logs. Exporters send batches to the platform. The platform authenticates project or service credentials, limits request size and concurrency, applies rate and storage checks, and passes accepted records to the telemetry service for storage and query.
The server stores all spans it receives. Span and metric batches can use local durable storage or a project-selected Cloud path through a durable outbox. OTel logs are written to the fast query store for every severity and are also sent to the cold archive. Transient storage errors receive bounded retries. Failed batches are counted and grouped by signal and stable error class so an operator can see why data was lost.
Traces describe spans and their relationships. Metrics describe measured values over time. Logs carry severity, body, attributes, and optional trace context. Ingest failure groups are recent operational data. They explain rejected or dropped records without treating a rising drop count as a complete explanation.
For the receiver, credentials, storage rules, and monitoring of the ingest path, see Telemetry ingestion and monitoring.
References: crates/…/otel_service.rs• L421-513 crates/…/otel_service.rs• L517-555 crates/…/otel_service.rs• L557-735 crates/…/otel_service.rs• L753-1027 crates/…/e2e_http_test.rs• L582-901
External service metric collection
The platform also collects operational metrics from managed external services. A background scraper selects running services with metrics enabled, connects with the protected service configuration, and sends engine-specific readings to the metrics store. It runs service collections in parallel with bounded work so one slow or unavailable service does not stop the other sources.
Collected points retain source, engine, environment, and node context. Current values pass through as gauges. Cumulative readings become interval values after the scraper compares them with the prior reading. The first reading establishes a baseline, and a reset starts a new interval instead of producing a negative or false spike.
High-availability PostgreSQL services use the current elected primary as the source. When failover changes the primary, the scraper discards the old server's counter baseline before it records new intervals. Connection, query, and timeout failures produce no points for that service and do not stop the scrape cycle.
References: crates/…/scraper.rs• L4-33 crates/…/scraper.rs• L170-377 crates/…/scraper.rs• L382-497 crates/…/postgres.rs• L57-136 crates/…/postgres.rs• L217-255 crates/…/lib.rs• L10-25
Runtime log collection
Runtime logs form a separate path from OTel logs. Local and remote collectors follow application containers and managed external-service containers. Each parsed line keeps its project or external-service owner, environment, service, deployment, container, and worker-node context. Unknown containers are skipped instead of being assigned to the wrong owner.
Collection checks ownership before it opens a stream. A project-labelled container must name a project or deployment owned by this instance. An external-service container can resolve through its service label, its imported container name, or its cluster-member name. A temporary database or ownership lookup failure is retried in the background rather than treated as proof that the container is not owned here.
The collector resumes from the latest stored position after a restart and retries temporary stream errors. It resumes after the last stored second to avoid replaying the inclusive Docker boundary. Local discovery uses Docker when a daemon is present. Remote worker collection uses the agent stream and feeds the same storage path, so multi-node logs behave like local logs in search and live tail.
The collection service reports recovery state separately from analytics index state. Startup recovery can be recovering, retrying, or stopped, and collection starts only after the recoverable WAL pass completes. A damaged generation can be moved to a deferred area while the other streams continue; deferred lines stay out of search until an operator repairs and retries that generation. The capabilities response shows the state and counts to all readers while it limits server paths and raw error details to instance administrators.
The parser recognizes JSON and logfmt records. It normalizes level, message, timestamp, request, trace, HTTP, and duration fields while keeping bounded residual attributes for search and analytics. The line index can then answer attribute facets, histograms, and grouped metrics without storing a second copy of message text.
References: crates/…/collector.rs• L66-85 crates/…/collector.rs• L142-246 crates/…/collector.rs• L291-390 crates/…/collector.rs• L437-707 crates/…/plugin.rs• L389-447 crates/…/global.rs• L220-373
Context and correlation
Correlation joins signals that describe the same work. A log emitted inside a traced request should carry the request and trace identifiers. The console can then move from a trace to related logs instead of making the engineer search by time and service name.
Analytics uses visitor and session context to connect page views and events into journeys. Deployment, environment, container, and node context separates releases and runtime targets. These links are useful only when producers send stable identifiers and do not place sensitive data into event properties, log fields, URLs, or metric labels.
References: crates/…/parser.rs• L72-107 crates/…/types.rs• L11-50 crates/…/query_handler.rs• L1134-1230
Error tracking
Error tracking turns incoming failures into issue groups and keeps the raw events that explain each group. The group is the work item for investigation. Time-window counts and affected-user counts support prioritization.
Project and global views use the same project and environment boundary. Engineers can filter by status, search visible projects, inspect event details, relate an issue to a deployment, and move a group through unresolved, assigned, resolved, or ignored states. A later event can reopen a resolved or ignored group as a regression.
References: crates/…/error_tracking_service.rs• L22-40 crates/…/error_crud_service.rs• L228-365
Processing and storage
Query and storage roles
Storage supports two needs: durable capture and fast product queries. The OTel storage contract covers metrics, traces, logs, trace summaries, operation statistics, ingest-failure reports, and cross-project trace references while allowing the active backend to change. Trace summaries provide a bounded list view without rebuilding every trace from raw spans for each request.
The default product shape can run with PostgreSQL and TimescaleDB. An optional ClickHouse path serves high-volume span and metric workloads. The important rule is that a query keeps the same result meaning across backends: filters, project scope, pagination, trace grouping, and duplicate handling must not change when storage changes.
Collected runtime logs use immutable compressed chunks in filesystem or S3-compatible storage. PostgreSQL keeps one manifest per chunk with time, owner, level, node, and format metadata. The manifest selects candidate chunks. The chunk footer, block index, and bloom data select the bytes needed for a search. A write-ahead log protects the unsealed head during a process failure.
The log writer commits a sealed chunk before it removes the WAL generation that protects it. If object or manifest storage fails, the WAL remains available for recovery. Line-index writes are useful but not required for the chunk to remain durable; the reindexer can rebuild missing index rows later. This separates durable log history from optional fast analytics.
OTel logs use the fast query store and a cold archive. Collected runtime logs use the chunk store and a separate per-line index for attribute analytics. These are related operator views, but they are not the same source.
References: crates/…/mod.rs• L41-193 crates/…/chunk_writer.rs• L4-47 crates/…/chunk_writer.rs• L1151-1165 crates/…/wal.rs• L4-15 crates/…/wal.rs• L122-219 crates/…/types.rs• L16-42
Analytics retention
Analytics retention keeps event history and attached identifiers within the windows set by the platform. Event and error-event history use database time-based policies. Stale visitors are removed in bounded batches, and an IP location row is removed only after no analytics or audit record still points to it.
The retention service re-reads policy settings each hour and skips a pass when it cannot read them. It paces bounded work so cleanup does not hold long locks or compete with ingest. Its effective IP window cannot be shorter than the longest proxy-log window that may still reference an address; if an installed log resolver gives no upper bound, IP deletion pauses. A pass that changes data or policy creates one audit record with its windows and counts.
References: crates/…/retention.rs• L4-24 crates/…/retention.rs• L238-350 crates/…/retention.rs• L874-912 crates/…/retention.rs• L1023-1064 crates/…/plugin.rs• L173-205
Trace summaries and global reads
Trace summaries are one-row-per-trace records used for trace lists and cross-project pages. They keep trace count, error count, start time, duration, and root identity together. Raw spans remain the source for trace detail and for queries whose filters need span-level evidence.
Global trace reads first resolve the visible project scopes. They then read one ordered stream per active source and merge those streams into one page. The response reports the effective source and time window for each project, including when a source boundary narrowed the request.
The list keeps window membership separate from lifetime values. A trace qualifies when it has activity in the requested window, while its displayed summary can still describe the complete trace. During summary repair, reads use raw spans so the console does not expose stale summary data.
References: crates/…/global_traces.rs• L19-44 crates/…/global_traces.rs• L219-250 crates/…/global_traces.rs• L291-362 crates/…/global_traces.rs• L40-90 crates/…/cloud_routed.rs• L320-356
Metric processing
Metrics are stored as time-based points and returned as buckets or series. Queries can filter by metric type, service, environment, and labels. They can group by labels and apply an aggregation such as average, sum, rate, or a percentile. Metric name and label discovery supports the filter controls in the explorer.
Metric label discovery is sampled and bounded. This keeps autocomplete and chart queries useful on high-volume metrics. Label keys must use a small safe character set, and stable low-cardinality labels are preferred for both cost and signal quality.
Metric records support scalar values and richer histogram, exponential-histogram, summary, and exemplar data. The query result keeps those shapes distinct so a scalar aggregation does not silently discard histogram-only data. A metric query uses the analytics Cloud ledger when the project is analytics-Cloud-primary.
References: crates/…/query_handler.rs• L31-56 crates/…/query_handler.rs• L486-673 crates/…/otel_service.rs• L1031-1089 crates/…/cloud_routed.rs• L390-490
Log retention and search
Collected logs provide recent search, context around a matching line, live tail, global search, facets, histograms, grouped metrics, and retention management. Search uses a stable newest-first keyset cursor. A request either returns a complete page or marks the result as partial with a resumable cursor and the time reached by the scan.
Global search resolves the caller's project and external-service allow-list before it reaches the storage backend. A named project or service narrows that allow-list and cannot widen it. Results keep project or service identity, environment, container, deployment, and worker node so a combined view remains useful. Context and live tail use the same ownership boundary.
Global search can also use bounded log attributes. Attribute-only searches resolve indexed line pointers into full lines. Attribute and text searches use the index to narrow candidate chunks, then apply text matching to chunk data. The index does not hold message text, so this split keeps text search and attribute analytics distinct.
Runtime log data is retained in two linked forms. Chunk objects hold the complete lines. The line index holds pointers and extracted labels or attributes for fast analytics. The index can live in local ClickHouse, Temps Cloud, or TimescaleDB. A reindexer rebuilds it from chunks after an outage or backend change. A durable forget backlog removes retired chunks from the index after purge, retention, or compaction.
Retention first removes chunks from normal reads by tombstoning their manifests. A grace period protects in-flight readers before object and manifest cleanup. Manual purge requires log-delete permission and produces an audit event. The line index follows the same retirement path so aggregates do not count data that search can no longer resolve.
References: crates/…/log_handler.rs• L47-181 crates/…/log_handler.rs• L483-496 crates/…/global.rs• L52-189 crates/…/global.rs• L462-473 crates/…/global_search.rs• L6-21 crates/…/global_search.rs• L238-381 crates/…/plugin.rs• L596-660
Line index analytics
The runtime log line index turns bounded log attributes into product analytics. It supports attribute keys, distinct facets, time histograms, grouped metrics, numeric percentiles, and pointers to matching lines. It does not store message text, so text search remains a chunk-store operation.
The index uses the same resolved filters and access scope as normal log search. Local ClickHouse, Cloud, and TimescaleDB keep the same query meaning while using different data types or history bounds. If no index is ready, the API reports why and returns an unavailable response instead of returning an empty answer. Capabilities also show the active backend, live-versus-indexed chunk coverage, and pending removals.
References: crates/…/global.rs• L215-300 crates/…/global.rs• L667-873 crates/…/global.rs• L876-1007 crates/…/plugin.rs• L170-225 crates/…/plugin.rs• L596-660
Cloud telemetry source
Cloud telemetry is an optional source for linked instances and selected projects. The local platform keeps separate write-mode ledgers for spans and metrics. Each read resolves the requested window against the matching ledger, then uses local storage or Cloud for that signal group.
Cloud-primary span and metric writes are committed to durable local outboxes before background shipping. If the Cloud link, outbox, or Cloud write mode is unavailable, the platform narrows the path to local storage rather than dropping data. This can change the meaning of a successful ingest response for Cloud-primary data: it confirms durable outbox capture rather than local table storage.
Collected log line analytics has its own Cloud boundary. A linked instance may send only the project-approved log fidelity and attribute keys. Default or failed consent lookup sends the minimum index data. Cloud reads use pseudonymous project, service, and instance references and mask forgotten chunks because the Cloud query path cannot delete rows directly.
Global trace reads can merge local and Cloud streams while keeping one order and one total. A window that crosses a source change is narrowed to one effective source for that project, and the response reports the clamp. A Cloud read failure is returned as unavailable rather than converted into a successful local result with incomplete history.
Logs, error records, insights, health summaries, control records, and trace-reference control data stay on local paths when Cloud does not provide the same projections. This split keeps source labels and empty results honest.
References: crates/…/cloud_routed.rs• L31-54 crates/…/cloud_routed.rs• L224-317 crates/…/cloud_routed.rs• L357-407 crates/…/plugin.rs• L969-1016 crates/…/global.rs• L377-459
Product surfaces
Analytics views
The project analytics area presents behavior as aggregate trends and individual journeys. Overview charts cover traffic dimensions such as pages, referrers, devices, locations, browsers, languages, and campaigns. Deeper views show pages, visitor details, sessions, funnels, API traffic, and session replays.
Analytics is the right surface for questions such as “Which pages do visitors use?” or “Where do users leave a flow?” It is not the source of truth for a payment or other business action when the event came only from an untrusted browser.
For the product grouping and user-facing detail, see Analytics products.
References: web/…/ProjectAnalytics.tsx• L14-43 web/…/index.tsx• L4-14 crates/…/handler.rs• L563-731
Global analytics views
Global analytics answers the same behavior questions across the projects visible to the caller. It provides summary totals, traffic over time, ranked pages and events, and breakdowns by referrer, channel, campaign, location, language, browser, operating system, and device.
The global view is an aggregate surface, not a replacement for project detail. A project filter narrows the scope. An expanded breakdown supplies paging and search for larger result sets. Rows keep project names when the scope contains more than one project.
References: crates/…/global.rs• L18-74 crates/…/global.rs• L92-136 web/…/GlobalAnalytics.tsx• L120-309
Analytics detail views
Analytics detail surfaces connect aggregate behavior to individual activity. Page views lead to page-level metrics, visitor sessions, referrers, countries, entry and exit behavior, and AI crawler activity. Visitor views add location, first-touch attribution, segment filters, and recent-activity context. Session replays provide a visual record when replay capture is enabled.
AI crawler reporting is a separate behavior lens built from request logs. It shows request volume over time and ranks providers, agents, crawl purpose, response status, and requested pages. A row links back to the request log so an aggregate count can be checked against its traffic.
References: web/…/Pages.tsx• L48-117 web/…/PageDetail.tsx• L99-151 web/…/VisitorGlobe.tsx• L460-655 web/…/SessionReplays.tsx• L81-107 crates/…/responses.rs• L1043-1069
Error views
The error surface is an issue queue for failures across projects or within one project. It shows the issue title and type, status, project and environment, event count, affected users, and last-seen time. Selecting an issue leads to event detail and the context needed to connect it to a deployment or regression.
References: web/…/GlobalErrors.tsx• L27-149 crates/…/handler.rs• L398-610
Observe and signal explorers
Observe gives an event-oriented view of recent requests, traces, errors, and revenue activity. It is designed for fast scanning and links each row to a detail panel. Runtime logs stay on the dedicated Logs surface because their volume and storage behavior do not fit the merged business-signal timeline.
Metrics, traces, logs, and errors each have focused explorers for their own query needs. Metrics adds saved dashboards, label discovery, and alert rules. Traces support trace summaries, operation statistics, global source windows, and detail. Logs support time, severity, project, service, trace, source, environment, node, deployment, container, text, context, and attribute filters. Global logs can combine application and external-service records while preserving source identity. Log analytics adds facets, histograms, and grouped metrics when an index is ready. Pipeline reports expose recent ingest-failure groups and pipeline counter history when those collectors are enabled.
The log explorer uses store-backed facet counts for the full time range rather than counts from only the loaded page. It separates application logs from managed database logs, supports list, repeated-pattern, and service views, and can load older lines as the reader reaches the end of the current page. A selected record can show structured fields and nearby lines, while the interface keeps project, environment, deployment, node, and container identity visible.
The log query input accepts message text and key-value filters for project, source, level, environment, node, and deployment. Suggestions come from the current search scope, so a user can refine a query without depending on the lines already loaded in the browser. Facet lists can be capped or unavailable, and the UI reports that state instead of presenting an empty list as proof that no values exist.
The unified Observe feed keeps the same project scope and event identity when request logs and spans use a high-volume telemetry store. Its default view shows root spans once per trace, while a name search can find child spans. The project-scoped feed applies a bounded time window even when the caller omits one, and it rejects a window that is too wide rather than scanning without a limit.
Global operational pages share a filter model and a common page state model. Search, project scope, signal-specific filters, and time range stay in the URL. Refresh controls re-run the current view. Loading, error, empty, retry, and pagination states explain what the current view means, and an empty result offers a path to the project list rather than looking like a failed query.
References: web/…/Observe.tsx• L46-84 web/…/Metrics.tsx• L20-47 web/…/Traces.tsx• L14-22 web/…/GlobalLogs.tsx• L21-243 web/…/GlobalTraces.tsx• L30-225 web/…/GlobalPage.tsx• L84-260 web/…/GlobalPage.test.tsx• L29-57 web/…/LogExplorer.tsx• L92-143 web/…/LogExplorer.tsx• L192-228 web/…/LogExplorer.tsx• L319-336 web/…/LogExplorer.tsx• L634-827 web/…/LogQueryInput.tsx• L24-32 web/…/LogQueryInput.tsx• L103-149 web/…/LogQueryInput.tsx• L248-405 crates/…/clickhouse_observe_test.rs• L282-380 crates/…/clickhouse_observe_test.rs• L454-506 crates/…/global.rs• L215-459 crates/…/global.rs• L681-873
Monitoring and alerting
Monitoring turns current metric values, container state, and platform checks into alarms. An alarm is a durable operational signal with a type, severity, scope, and lifecycle. The service applies a cooldown and optional silence to limit repeated noise, then sends notifications and queue events when an alarm fires or resolves.
Alarm scope can belong to a project, environment, deployment, container, external service, worker node, or the host and control plane. Project alarms and system alarms use separate access boundaries. Operators can list and summarize them, acknowledge or resolve them, silence a scope for a limited period, or update a bounded batch. The alarm record remains the source for the UI while notifications and queued jobs let other systems react.
Container health monitoring detects restarts, exits, OOM kills, and sustained CPU or memory pressure. It checks local and worker-node runtimes with bounded concurrency and a per-worker check deadline. Worker runtime lookup failures skip only affected worker containers and never fall back to local Docker. It writes container resource points when a metrics store is available. Resource alarms require consecutive threshold breaches. CPU alarms compare utilization with the container limit or host capacity, while network points represent bytes since the previous poll. Intentional stops, paused deployments, sleeping environments, superseded deployments, and retained failed deployments do not create crash alarms.
This separates inspection from response. Engineers can explore a metric without creating an alert. An alert rule creates a durable operational signal that can feed alarm and notification paths.
References: crates/…/alarm_service.rs• L265-365 crates/…/alarm_service.rs• L372-483 crates/…/alarm_service.rs• L1013-1187 crates/…/container_health.rs• L26-35 crates/…/container_health.rs• L187-204 crates/…/container_health.rs• L268-523 crates/…/container_health.rs• L562-767 crates/…/container_health.rs• L919-1237 crates/…/alarm_handlers.rs• L493-584 crates/…/alarm_handlers.rs• L808-840 crates/…/plugin.rs• L54-140
Scheduled job monitoring
Scheduled job monitoring tracks jobs that run outside the platform and report check-ins. Each monitor defines a schedule, time zone, check-in margin, run-time limit, and failure or recovery threshold. The service keeps run history, marks missed or overdue work, and exposes the result through the same alarm path as other operational signals.
The check-in flow accepts starts and terminal results with optional release, environment, and trace context. It is safe to retry a terminal check-in, keeps late results from undoing a timeout, and can store a completion before the job sends its schedule configuration. Native monitor management can then create, pause, resume, edit, or delete a monitor while project access and audit rules protect its scope.
When failures reach the configured threshold, the monitor raises a project-scoped CronJobFailed alarm. Recovery requires the configured number of successful runs. A background cycle finds due monitors, records missed work, publishes or resolves alarms, and prunes old run history without creating an unbounded backlog.
References: crates/…/cron_monitors.rs• L123-203 crates/…/cron_monitors.rs• L305-514 crates/…/cron_monitors.rs• L573-730 crates/…/management.rs• L228-355 crates/…/handlers.rs• L102-257 crates/…/alarm_service.rs• L89-92 crates/…/plugin.rs• L77-140
Health and incident views
Status monitoring checks public application endpoints and turns check results into operational status, uptime history, and incidents. A monitor belongs to a project environment, so its result can be related to the deployment that users actually reach.
The health flow records a check and sends its completion through outage detection. A real status transition can create or resolve an incident, alarm, notification, and optional downtime workflow trigger. The outage path checks the current deployment state while creating the incident and checks the incident before each external side effect. A paused deployment therefore does not create or continue a downtime response.
HTTP checks extend health monitoring to provider-independent credential verification. A project can store an encrypted check recipe, run it on demand or on a schedule, inspect a typed healthy, warning, error, or unknown result, and receive deduplicated notifications. The transport accepts public HTTPS destinations only and limits redirects, response size, and execution time. Credential history records check and verification activity without exposing secret values.
For the public status-page product built from these signals, see Status pages.
References: crates/…/outage.rs• L252-395 crates/…/outage.rs• L397-519 crates/…/mod.rs• L64-173 crates/…/mod.rs• L294-365 crates/…/mod.rs• L456-569 crates/…/transport.rs• L12-117 crates/…/variable_history.rs• L6-93
Change checklist
When these files or sections are changed, remember to consider these:
- A new signal needs a clear project and deployment attribution rule, an ingest path, a storage/query path, and a matching console surface.
- Changes to analytics event fields or dimensions must stay compatible with browser capture, server-side capture, aggregate queries, visitor facets, and any analytical fan-out.
- Visitor enrichment changes must keep project confinement, merge limits, audit redaction, and the per-token write budget aligned.
- Analytics ingest-key changes must keep public-key resolution, project and environment scope, origin checks, rate limits, audit records, and the shared cache and limiter instances aligned. Deployment changes must invalidate environment-scoped cached attribution.
- New metric names and labels must remain valid and bounded. Alert rules must use the same metric source and label meaning as the explorer.
- External service metric changes must keep service selection, engine collector output, source and node context, counter baselines, and metric storage meaning aligned.
- High-availability metric changes must keep primary discovery, failover baseline reset, and the non-blocking timeout path aligned.
- Cloud span, metric, or log-index write-mode changes must update both the durable outbox or index path and the matching read source. A project must not read a signal from a source that did not receive it.
- Cloud log-index changes must preserve project consent, pseudonymous instance scope, forgotten-chunk masking, and the no-content-default rule.
- Global trace and log views must apply project visibility before aggregation or pagination and must preserve project or service identity in returned rows.
- Global log cursors must remain bound to the full filter set. Partial pages must keep their resume horizon distinct from a complete page.
- Collected-log changes must keep container, node, deployment, and external-service identity aligned between discovery, collection, chunk metadata, line index, filters, and display.
- Chunk format changes must keep writer, reader, compactor, reindexer, WAL recovery, manifest metadata, and reconcile adoption compatible.
- WAL recovery changes must preserve the order that commits a chunk before removing its protection. Damaged generations must either replay their readable prefix or remain visible as deferred work.
- Line-index changes must preserve the same attribute meaning across ClickHouse, Cloud, and TimescaleDB. Backend changes must trigger a complete rebuild before the new store is treated as current.
- Retention, purge, compaction, and missing-object paths must enqueue line-index forget work before cleanup can leave stale rows behind.
- Analytics retention changes must keep event and error-event policies, visitor deletion, IP reference checks, proxy-log windows, settings-read failure behavior, bounded progress, and system audit records aligned.
- Trace summary changes must preserve the match between window membership, lifetime values, raw-span fallback, and the count used for pagination.
- Cross-project trace changes must preserve the sharing boundary, first-seen discovery order, redaction state, historical window, and truncation signals.
- Ingest-failure reporting must keep error groups low-cardinality and recent. A failed report write must remain non-fatal to the already-failed ingest request.
- Container log discovery changes must keep ownership checks separate from stream retries. A transient database lookup must not skip a container, and an unknown container must not be assigned to a project.
- Container health changes must keep local and worker-node runtime selection, per-worker resolution and check deadlines, fair scheduling, intentional-stop checks, current-deployment checks, consecutive threshold counts, metric meaning, and alarm scope aligned.
- Cron monitor changes must keep schedule calculation, check-in identity, timeout and missed-run handling, terminal-run immutability, failure and recovery thresholds, run retention, and alarm synchronization aligned.
- Cron monitor management changes must keep project and environment scope, configuration ownership, pause and resume state, audit events, and alarm cleanup aligned.
- Alarm API changes must keep project and system scope checks aligned with list filters, lifecycle transitions, bulk limits, silence behavior, audit records, notifications, and queued jobs.
- Health-check status changes must preserve the link from check result to incident state, alarm state, notification, and downtime workflow trigger. Pause-state changes must preserve the transaction boundary that prevents alerts for paused deployments.
- HTTP check changes must keep secret storage, destination validation, lease ownership, unknown-result retry, notification fingerprinting, and variable history aligned.
- Alarm scope changes must keep cooldown, silence, resolution, notification, and queue events aligned for project, service, deployment, and system alarms.
- Observe feed changes must keep request and span reads consistent across storage backends, preserve root-only default trace rows, and retain the bounded project-scoped time window.
- Global observability page changes must keep URL filters, refresh behavior, filter notices, pagination, and the precedence of loading and error states over empty results aligned.
- Log explorer changes must keep store-wide facet counts, source labels, keyset continuation, URL filters, and loaded-line presentation states aligned.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A browser analytics request has no matching deployed host and no valid ingest key | The event cannot be assigned to a project and the analytics view stays empty | Use the deployed origin or a project-scoped analytics ingest key for apps hosted elsewhere |
| A public browser event is used as the authority for revenue or access | Forged, blocked, or retried events can produce false business totals | Emit authoritative events from authenticated server code after the transaction commits |
| An analytics ingest key is managed by a deployment token or outside its project | A deployed app credential can change a long-lived write credential or cross a tenant boundary without the required audit trail | Require human or API-key authorization with project scope, deny deployment tokens, and audit every write |
| An environment-scoped key keeps a cached deployment after a deploy | New events can be attributed to the previous deployment | Invalidate all resolved scopes when the route-table deployment update arrives |
| A deployment-token enrichment targets an arbitrary visitor or grows unbounded custom data | A token can change data outside its project or create uncontrolled personal-data and audit volume | Require the sealed visitor id, enforce project scope and size limits, and reserve the per-token write budget |
| An enabled external service is unreachable, slow, or denied access | That service has a gap in its metric series while other services continue to scrape | Keep per-service connection and collection timeouts, return an empty batch, and inspect the service health separately |
| A counter is read for the first time or after the scraper restarts | The first interval is absent instead of showing a false spike | Establish an in-memory baseline and emit counter deltas only after a later reading |
| A counter series changes labels or a primary changes after failover | Values from different series or servers can create invalid deltas | Key baselines by source, metric, and labels, then reset the service baseline on primary change |
| A PostgreSQL metric query fails on a permission or version difference | The current scrape has no PostgreSQL points rather than blocking the scraper | Treat query errors as an empty batch and skip optional version-specific views where needed |
| A collected container has no trusted project or external-service match | Its logs are skipped rather than safely attributed | Set the deployment or external-service identity before collection begins |
| A container ownership lookup fails during discovery | A one-time discovery event can leave a running container without log collection | Classify transient lookup failures for background retry and skip only a confirmed non-owner |
| A control-plane process has no local Docker daemon | Local containers are not discovered on that process | Use the remote collector for worker-node logs and do not treat the local skip as global log loss |
| A log search reaches its time or byte budget | The platform cannot prove a complete ordered page | Use the partial flag and resume cursor, or narrow the time range and source filters |
| A global log cursor is reused after its filters change | The next page can skip or repeat lines from a different search scope | Bind the cursor to the complete search scope and reject mismatched cursors |
| A log chunk is written without a manifest or the manifest points to a missing object | Search can miss data or encounter an unreadable candidate | Use WAL recovery, manifest reconciliation, tombstones, and grace-period GC |
| WAL recovery cannot read a generation in full | Collection may pause for a repairable storage error, or readable lines may be absent from search if the generation is deferred | Keep the generation until its committed prefix is handled, report deferred work, and never replay deferred files automatically |
| A metric name or label set is invalid or too unique | The point can be dropped or create an expensive, noisy series set | Validate names and use stable, low-cardinality labels |
| A line index is unavailable or behind the chunk manifests | Log attribute facets and aggregates are unavailable or incomplete | Report index capabilities, keep coverage and forget backlog visible, and run the reindexer or sweeper |
| A retired chunk is not forgotten from the line index | Facets and aggregates can count deleted or compacted lines | Enqueue the chunk in the durable forget backlog and retry with the sweeper |
| A trace summary is stale while its rebuild is pending | A trace list can show old names or counts | Read raw spans until the summary rebuild is complete |
| A global query paginates before applying project visibility | Rows or totals can leak hidden projects or make later pages incomplete | Resolve access and hidden-project filters before aggregation and pagination |
| A Cloud-primary batch cannot be committed to its outbox | The affected telemetry is rejected so the exporter can retry, or the path falls back to local storage when the mode is suspended | Keep the outbox durable, count refused data, and expose the ingest error rather than acknowledging lost data |
| A Cloud or local telemetry window crosses a write-mode change | A mixed result can be labeled as one source or silently omit part of the history | Clamp the window and return the effective source and cutover information |
| A Cloud read fails and falls back to local rows | A successful empty result can hide missing post-cutover telemetry | Return the Cloud read error and show the unavailable source |
| A transient OTel storage failure exhausts its retry budget | The batch is dropped and the operator may otherwise see only a counter increase | Record a recent grouped ingest-failure reason as best effort and keep the drop count accurate |
| A remote or local log stream resumes from an inclusive timestamp | Replayed boundary lines can inflate counts and confuse the live view | Resume after the last stored second and keep stable line and chunk ordering |
| A resource threshold is crossed only once | A brief sample can page an operator for noise | Require the configured consecutive checks, then apply alarm cooldown and silence rules |
| A CPU threshold uses raw Docker percent instead of capacity-relative utilization | A multi-core limit can alert too early, or an uncapped container can alert against the wrong ceiling | Compare the threshold with utilization relative to the container limit or host core count and expose raw cores separately |
| Network counters are stored as cumulative values for each poll | Time-window sums overstate traffic and make dashboard totals meaningless | Emit poll-to-poll deltas and treat a counter reset as a new baseline |
| A stopped, sleeping, superseded, or paused deployment container exits | An expected lifecycle action can look like a crash and create a false alarm | Re-check intentional-stop, current-deployment, environment, and pause state before firing |
| A worker runtime cannot be resolved, or a worker check exceeds its deadline | Affected worker containers are skipped while local and other worker checks continue; using local Docker could inspect the wrong container | Resolve the runtime by node, cache the result only for the poll cycle, apply a per-check deadline, and never fall back to local Docker |
| A project alarm request targets a system alarm or another project | The caller could read or change an alarm outside its scope | Apply project or system scope checks before list and lifecycle operations |
| A bulk alarm update exceeds its limit or races another transition | The request can create an unbounded write or report stale state changes | Bound each request, re-check eligible status in the update, and return remaining work |
| A firing alarm is repeatedly emitted for the same scope | Notifications and queue events can overwhelm operators | Use the same type-and-scope cooldown and active silence for every fire path |
| A cron check-in uses a duplicate terminal ID or arrives after its run timed out | A retry can change a completed result or hide a missed or timed-out run | Treat terminal run records as immutable and keep check-in IDs unique within a monitor |
| A cron monitor has no valid schedule or its time zone is unsupported | The platform cannot determine the next expected run and cannot judge health | Validate the schedule, time zone, interval, and threshold limits before storing the monitor |
| A cron monitor misses runs during a long outage or restart | A large historical backlog can create excessive run records and alarm noise | Coalesce overdue schedule gaps into bounded missed-run work and process due monitors in limited batches |
| Cron alarm publication fails after a monitor becomes failing | The monitor shows failure but the native alarm and notification can be missing | Keep a durable pending flag and retry alarm synchronization until the alarm link is stored |
| A monitor is paused or deleted while its failure alarm remains active | An old alarm can continue to page for a monitor that no longer runs | Resolve the linked alarm during pause or deletion and clear the monitor alarm link |
| A status check is stored for a deployment that is no longer current or is paused | A false outage can create an incident and notify operators for an old release | Re-check current deployment and pause state in the write transaction |
| A deployment is paused after an outage incident is created but before side effects finish | A notification, alarm, or workflow can describe an outage that is no longer actionable | Check that the incident remains open before each side effect |
| An HTTP check sends a secret to a private, redirected, oversized, or unapproved endpoint | The check can become a server-side request forgery or leak credentials | Require public HTTPS, validate DNS, pin addresses, disable redirects, cap responses, and restrict write-only providers |
| An HTTP check result is unknown or a notification send fails | Operators can miss a real credential or endpoint change, or receive repeated noise | Store typed unknown results, retry unknowns, fingerprint notifications, and retry failed sends |
| A log facet query is capped, unavailable, or based only on the loaded page | The reader can mistake a partial or stale value list for the full time-range result | Use store-backed counts, show the capped or unavailable state, and allow a typed filter value |
| A log row is selected after it ages out of retention | The record or its surrounding context cannot be loaded | Return an explicit retention message instead of showing an empty context panel |
| The Observe feed reads a different backend from the one that received request logs or spans | The unified feed can silently show no events even though the data exists | Route reads through the active storage backends and test the project-scoped merge on each supported backend |
| An Observe query has no time range or requests an over-wide range | An unbounded scan can be slow or consume excess storage resources | Apply a default window and reject ranges beyond the shared cap |
| Analytics retention reads no policy or loses a linked reference check | The cleanup can either stop indefinitely or delete an IP location still needed by events, logs, visitors, or audits | Skip the destructive pass on settings failure, inspect all present reference columns, and keep the effective window at least as long as retained logs |
| A global observability query fails while its result is also empty | The page can tell the reader that no data exists instead of showing the service failure | Render loading and error states before the empty state and provide a retry action |
Key files
| File | Why to read it |
|---|---|
| crates/…/plugin.rs | Shows how analytics services, ingest-key controls, visitor auditing, API traffic, retention, and background work enter the platform. |
| crates/…/handler.rs | Shows the analytics query surfaces, access checks, visitor segmentation, enrichment boundary, and API traffic summary contract. |
| crates/…/analytics.rs | Shows the visitor and session views, facets, event aggregates, and bounded enrichment behavior. |
| crates/…/visitor_audit.rs | Defines the audit-safe visitor write record and the per-token change budget. |
| crates/…/handlers.rs | Shows project-scoped ingest-key management, audit boundaries, public endpoint discovery, and deployment-token denial. |
| crates/…/types.rs | Defines the public ingest-key contract, environment scope, origin controls, and rate-limit meaning. |
| crates/…/retention.rs | Shows how analytics event, visitor, and IP data follows configured retention windows without breaking linked records. |
| crates/…/mod.rs | Defines the common storage contract for metrics, traces, logs, summaries, ingest failures, and operational helpers. |
| crates/…/otel_service.rs | Coordinates OTel authentication, limits, retries, local or Cloud-primary writes, ingest-failure reporting, and query access. |
| crates/…/global_traces.rs | Shows global trace scope, source-stream merging, pagination, and summary semantics. |
| crates/…/cloud_routed.rs | Explains independent Cloud routing for span and metric reads and the no-silent-fallback boundary. |
| crates/…/cross_project.rs | Shows trace sharing, sibling discovery, historical windows, and unified waterfall limits. |
| crates/…/scraper.rs | Shows how enabled external services are scheduled, how counter intervals are formed, and how high-availability primary changes are handled. |
| crates/…/postgres.rs | Shows the PostgreSQL health and workload signals exposed to the metric system and the safe behavior for failed scrapes. |
| crates/…/lib.rs | Shows the public metric collector, scraper, store, and query types used by other platform services. |
| crates/…/plugin.rs | Shows how storage, local and remote collection, WAL recovery, line-index selection, reindexing, retention, compaction, and forget work are started. |
| crates/…/collector.rs | Shows how container ownership is checked, runtime logs resume, and temporary discovery or stream failures are retried. |
| crates/…/chunk_writer.rs | Shows the durable handoff from live lines to chunks, manifests, the line index, and WAL cleanup. |
| crates/…/wal.rs | Shows crash recovery for unsealed lines and the boundary between replayable and deferred generations. |
| crates/…/global.rs | Shows global log access, collection and index capabilities, attribute filters, facets, histograms, and grouped analytics. |
| crates/…/global_search.rs | Shows selector resolution, explicit authorization scope, keyset cursors, and honest partial pages. |
| crates/…/log_handler.rs | Shows log search, context, live tail, purge, error responses, and route contracts. |
| crates/…/types.rs | Shows the shared state that connects search, tail, retention, line indexing, manifests, and collection status. |
| crates/…/mod.rs | Shows the public service roles that make up the log collection and query path. |
| crates/…/parser.rs | Defines the normalized log fields and bounded attributes used by search and analytics. |
| crates/…/analytics.rs | Defines the shared meaning of attribute predicates, facets, histograms, pointers, and aggregates. |
| crates/…/clickhouse.rs | Shows local and Cloud line-index scope, consented Cloud egress, and index lifecycle. |
| crates/…/timescale.rs | Shows the bounded PostgreSQL fallback and its matching analytics semantics. |
| crates/…/compactor.rs | Shows replacement-before-forget compaction, reconciliation, and reader-safe garbage collection. |
| crates/…/reindexer.rs | Shows how the derived line index is rebuilt from durable chunks. |
| crates/…/forget_sweeper.rs | Shows durable retries for removing retired chunks from the line index. |
| crates/…/alarm_service.rs | Shows alarm types, including scheduled-job failures, scopes, cooldown and silence rules, lifecycle changes, notifications, and queued events. |
| crates/…/container_health.rs | Shows local and worker-node container checks, per-worker deadlines, resource metric meaning, intentional-stop rules, and threshold alarms. |
| crates/…/cron_monitors.rs | Shows scheduled check-in ingestion, deadlines, missed runs, health thresholds, alarm synchronization, and bounded run history. |
| crates/…/management.rs | Shows native monitor creation, configuration ownership, pause and resume behavior, and deletion. |
| crates/…/handlers.rs | Shows authenticated project-scoped monitor and run routes and audit boundaries. |
| crates/…/alarm_handlers.rs | Shows project and system alarm access, list and summary views, single and bulk lifecycle actions, and audit boundaries. |
| crates/…/outage.rs | Shows how status transitions become incidents, alarms, notifications, and workflows. |
| crates/…/mod.rs | Shows scheduled and manual HTTP credential checks, result states, leases, and notification behavior. |
| crates/…/transport.rs | Shows the destination and response safety boundary for outbound checks. |
| crates/…/variable_history.rs | Shows how credential detection and verification history is presented without exposing secret values. |
| crates/…/plugin.rs | Shows the shared monitoring service wiring, alarm routes, HTTP check routes, and scheduled monitor worker. |
| web/…/ProjectAnalytics.tsx | Maps analytics capabilities to the project-facing product surface. |
| web/…/GlobalAnalytics.tsx | Shows the cross-project analytics surface and aggregate breakdowns. |
| web/…/GlobalLogs.tsx | Shows cross-project log search, source filters, and partial-page behavior. |
| web/…/GlobalTraces.tsx | Shows cross-project trace summaries and trace navigation. |
| web/…/GlobalErrors.tsx | Shows cross-project error issue review and status filtering. |
| web/…/Observe.tsx | Shows the unified operational event view and its filter model. |
| web/…/Metrics.tsx | Shows the relationship between metric exploration, dashboards, and alerts. |
| web/…/GlobalPage.tsx | Shows the shared search, project, time-range, refresh, loading, error, empty, retry, and pagination behavior for global observability views. |
| web/…/GlobalPage.test.tsx | Verifies that global pages distinguish loading, query failure, empty results, and rendered data. |
| web/…/LogExplorer.tsx | Shows the log list, store-backed facets, virtualized paging, record inspection, and surrounding-line experience. |
| web/…/LogQueryInput.tsx | Shows message search, key-value filters, and scope-aware facet suggestions. |
| crates/…/clickhouse_observe_test.rs | Verifies that the unified Observe feed reads and merges request logs and spans through the active ClickHouse paths with bounded project-scoped queries. |