Introducing a new way to review your PRs.

Read the announcement

gotempsh / temps

AI-native open-source alternative to Vercel + Sentry + PostHog + Pingdom + Resend + E2B. 440+ CLI operations with drop-in skills for Claude Code, Codex & OpenCode — deployments, analytics, session replay, error tracking, OpenTelemetry, email, sandboxes & AI gateway in one self-hosted Rust binary.

View on GitHub

25 documents · Updated Oct 21, 2026

docs / analytics-products

Analytics products

Analytics products turn product use, service traffic, browser health, failures, payments, and service checks into views for product and operations work. They share project and environment scope, but each view answers a different question: what users do, where they stop, how fast the product feels, what happened in a session, which errors matter, how revenue changes, and whether a service is healthy. For the wider system view, read Observability and analytics, Telemetry ingestion and monitoring, and Status pages.

Product scope

The analytics area connects observed activity to a decision. It lets an engineer move from a total or trend to the people, pages, requests, events, failures, payments, or checks that explain it.

ProductMain questionMain result
Event analyticsWhat do visitors and users do?Counts, trends, segments, journeys, and event detail
Funnel analysisWhere do users leave a chosen flow?Step counts, conversion, timing, and drop-off
AI visitor activityWhat patterns appear in recent visitor journeys?Categories, evidence, and a short report
API traffic reportingHow is a project's API used and how does it perform?Volume, errors, latency, routes, callers, and optional summary
AI crawler reportingWhich AI agents fetch the product and when?Filtered request feed and provider or agent timeline
Performance reportingHow fast is the product for real users?Web Vitals averages, percentiles, trends, and dimensions
Session replayWhat happened during one browser session?A replay with visitor and device context
Error trackingWhich failures affect the product?Grouped issues, events, source context, and trends
Revenue reportingHow do payments and subscriptions change?MRR, cash, refunds, customers, and event history
Status pageIs a monitored service healthy?Current status, uptime, incidents, and updates

References: crates/…/lib.rs• L4-15 crates/…/plugin.rs• L45-95 web/…/SentryEventDetail.tsx• L113-146 web/…/Revenue.tsx• L156-255

Event processing

Event analytics receives page views and custom events. It attributes them to a project and optional environment or deployment, then makes visitor, session, page, source, event, and journey views available for a selected time range.

The normal flow separates collection from analysis. A browser or backend sends an event, the service adds identity and context when available, and dashboard queries read the stored result. PostgreSQL is the source of record. An optional ClickHouse copy supports larger analytical queries and can lag behind a fresh write.

This diagram shows how product activity becomes a view that can be explored by event, visitor, page, or time.

flowchart LR
    A[Browser or backend activity] --> B[Event attribution]
    B --> C[Stored event]
    C --> D[Counts and time series]
    C --> E[Event detail and visitors]
    C --> F[Segments and journeys]

Views can count events, sessions, or visitors. They can narrow results by environment, deployment, geography, device, browser, operating system, referrer, channel, language, campaign, page, or event properties. Crawler activity is excluded from human-use views where the product supports that choice.

Analytics ingest keys

An analytics ingest key lets an application that Temps does not deploy send event, performance, and session-replay data to a selected project and optional environment. It is a public write credential. It does not grant read access or prove that a visitor performed a business action.

The key can be created, listed, labeled, limited, rotated, and revoked through project-scoped admin actions. Revocation is soft so the record remains available for audit and investigation. An environment-scoped key follows that environment's current deployment, so a deployment change does not require a new key. The ingest endpoint is exposed separately from general settings so an analytics reader can obtain the address needed by an install snippet.

The service treats a presented key as the source of project scope instead of falling back to the request host. Browser origin checks and request limits add controls for public clients, while deployment tokens cannot manage these credentials. Key changes are audited, and shared cache and rate-limit state is invalidated when a key is rotated or revoked or when deployment scope changes.

References: crates/…/mod.rs• L4-18 crates/…/types.rs• L59-185 crates/…/handlers.rs• L212-373 crates/…/handlers.rs• L375-573 crates/…/plugin.rs• L85-91 crates/…/plugin.rs• L222-263

Analytics overview

The overview turns a project and date range into totals, trends, ranked dimensions, and paths through the product. An engineer can switch between page views, sessions, and visitors, then use the same scope to inspect event detail or a visitor segment.

Page flow adds entry pages, exit pages, drop-off points, and common transitions. Event detail adds counts, unique visitors and sessions, breakdowns, individual occurrences, and custom event data. Selected custom properties can become table columns for repeated analysis.

References: web/…/AnalyticsTrafficChart.tsx• L13-140 web/…/EventDetail.tsx• L80-179 web/…/EventDetail.tsx• L252-419 web/…/PageFlow-components.test.tsx• L51-127

Visitor segments

Visitor segments answer which visitors match a selected value such as an event, page, referrer, device, country, channel, language, or campaign. The result stays within the active project, time range, environment, and human-activity scope, and it links each visitor to a journey.

References: web/…/SegmentVisitors-components.tsx• L81-128 web/…/SegmentVisitors-components.tsx• L142-328

Visitor maps

The visitor globe combines visitors with location data and marks visitors seen in a recent live window. The live view adds a fast activity feed for page views and custom events, with pause and environment controls so an engineer can watch current use without treating it as a historical report.

References: web/…/VisitorGlobe.tsx• L524-721 web/…/LiveGlobe.tsx• L236-312 web/…/LiveGlobe.tsx• L354-508

API traffic reporting

API traffic reporting gives a project-scoped view of proxy requests for a selected time range and environment. It combines request totals, errors, error rate, latency, time series, ranked routes, ranked callers, and drill-down details.

The view keeps monitor checks out of product traffic. It can link a route or caller back to request logs when access allows it. Older analytics request-log links now redirect to the canonical request-log page while preserving the selected path, query string, and hash. An optional AI summary is requested on demand and remains separate from the core traffic data, so a missing provider or failed summary does not remove the report.

References: web/…/ApiTraffic.tsx• L249-433 web/…/ApiTraffic.tsx• L481-538 web/…/ApiTraffic.tsx• L816-987 web/…/RequestLogsRedirect.tsx• L7-19 web/…/RequestLogsRedirect.test.tsx• L33-45

AI crawler reporting

AI crawler reporting describes requests made by known AI agents that fetch site pages. It is distinct from visitor analytics: these rows show AI reading the site, not people arriving from an AI citation.

The feed supports project or global scope, time windows, provider and agent filters, path filters, pagination, and links to request detail. The timeline groups the same request activity by provider or agent over time. It preserves empty time buckets so the selected period remains readable.

References: web/…/AiCrawlerActivityFeed.tsx• L42-129 web/…/AiCrawlerActivityFeed.tsx• L137-275 web/…/AiAgentsTimelineChart.tsx• L146-240 web/…/AiAgentsTimelineChart.tsx• L242-374

Analytics insights

The insights panel gives short findings derived from the data already shown on an analytics page. An engineer can open the project AI assistant with those statistics as read-only context for a deeper question.

The panel treats paths, referrers, and campaign values as data rather than instructions. It removes control characters and limits string length before those values enter the assistant prompt.

References: web/…/InsightsPanel.tsx• L79-121 web/…/InsightsPanel.tsx• L123-189

AI visitor activity

AI visitor activity turns recent, non-crawler journeys into a bounded report about configured activity categories. It is an interpretation aid. It links each assessment to observed evidence, but it does not prove intent, identity, purchase, or another business fact.

Setup can start from a public application URL. The system suggests goals, then the operator selects an environment, category rules, eligibility thresholds, and optional event-property keys. Sharing selected activity with the configured AI provider is explicit. A preview lets the operator review a result before saving settings.

Reports use a recent 24-hour window and can sample eligible visitors. A saved setup can run manually or once per day. The product records run state, keeps the last report after a later failure, and marks sampled results so the reader knows that counts do not cover all traffic. The analytics service starts the activity scheduler only when its required service is available. The AI registry can report that no provider is ready at run time without making that state permanent during service startup.

The provider receives selected fields such as the goal, categories, page paths, event names, timestamps, and chosen scalar properties. Visitor IDs, IP addresses, and URL query strings are excluded. Preview output is not stored as the daily report.

This diagram shows how a goal and recent events become a report that an operator can review.

flowchart LR
    A[Application URL or goal] --> B[Suggested or chosen categories]
    C[Recent human events] --> D[Eligible visitor sample]
    B --> D
    D --> E[AI interpretation]
    E --> F[Evidence and report]

References: web/…/ActivityReport.tsx• L65-108 web/…/ActivityReport.tsx• L162-285 web/…/ActivityReport.tsx• L442-580 web/…/ActivityReport.tsx• L1093-1267 crates/…/plugin.rs• L59-75 crates/…/plugin.rs• L157-172

Funnel analysis

Funnels describe an ordered user path as named event steps. The product compares the people or sessions that reach each step so a team can see conversion, timing, and drop-off in a flow such as signup, onboarding, or checkout.

A funnel is a saved project-level definition. Teams can create, edit, delete, preview, and query funnels over a chosen date range. The management view loads saved funnels and passes the selected range to each result, while the result shows entries, completions, conversion from the start and previous step, drop-off, average completion time, and optional value per completion.

This diagram shows how named product events become a conversion view.

flowchart LR
    A[Product events] --> B[Ordered funnel steps]
    B --> C[Step matching]
    C --> D[Counts and timing]
    D --> E[Conversion and drop-off]

Funnel results are behavior reports. Browser events can be delayed, repeated, or forged, so they must not replace payment, entitlement, or order records.

References: web/…/FunnelManagement.tsx• L31-85 web/…/FunnelManagement.tsx• L88-205 web/…/FunnelCard.tsx• L38-59 web/…/FunnelCard.tsx• L102-180 web/…/FunnelVisualization.tsx• L352-442

Performance reporting

Performance reporting measures the experience of real browsers through Web Vitals and related timing data. It helps a team compare speed over time and find the pages, devices, locations, browsers, or operating systems that need work.

The product reports averages, percentiles, time series, and grouped page views for measures such as TTFB, LCP, FID, FCP, CLS, and INP. Late values can update the matching sample after the first request. Bot and hosting-provider samples are excluded from the normal real-user view where supported.

References: crates/…/handler.rs• L159-211 crates/…/handler.rs• L282-340 crates/…/service.rs• L75-156 crates/…/service.rs• L343-518

Session replay

Session replay records a browser session as screen and interaction events, then joins it with session metadata and visitor context. It gives an engineer a visual path from the first page to the point where a user meets a problem.

The replay list supports project-level browsing and shows visitor, browser, operating system, location, duration, viewport, and creation time. An engineer can open a selected session to watch its events. General analytics replay is a product-use tool. Error-attached replay is an error investigation tool and should be treated as a separate product path.

Replay data is sensitive user data. Recording must wait for consent. Inputs must be masked. Sensitive areas such as authentication, payment, account, administration, medical, and secret-management pages must be blocked or masked.

References: web/…/SessionReplays.tsx• L75-107 web/…/SessionReplays.tsx• L130-185 crates/…/handler.rs• L77-188 crates/…/service.rs• L370-659

Error tracking

Error tracking collects application failures through the Sentry protocol and groups related events into one issue. It helps an engineer see what failed, how often it fails, which release and environment are affected, and whether the issue is resolved, ignored, or still active.

The product supports project and global issue views, group details, event inspection, assignment, status changes, time series, environment filters, and dashboard summaries. An event detail view brings together the exception, request, user, device, release, trace, spans, breadcrumbs, measurements, tags, and raw event data. It also supports readable stack-trace views and copyable event or stack data for investigation.

Source maps connect a compiled release to its original source. Teams can upload them through the console or standard Sentry tooling, inspect files by release, and remove a file or all files for a release. Source context is available only when the event release and uploaded map release match.

Temps is Sentry wire-compatible, so standard Sentry SDKs can send events. A DSN is a browser write key rather than a read token. The SDK must scrub payloads before sending because the stored event reflects the data provided by the SDK.

References: crates/…/handler.rs• L20-92 crates/…/handler.rs• L398-529 crates/…/error_tracking_service.rs• L22-212 web/…/SentryEventDetail.tsx• L113-146 web/…/SentryEventDetail.tsx• L473-551 web/…/SourceMaps.tsx• L176-238 web/…/SourceMaps.tsx• L463-610

Revenue reporting

Revenue reporting turns payment-provider events and imported history into project and installation-level business views. It keeps current subscription state separate from event history so the dashboard can show both the present position and the changes that produced it.

The global view shows current MRR, recent and all-time paid amounts, refunds, active customers, transaction counts, and recent revenue events. Engineers can filter the event list by service, date range, and event type. Paid events, subscription changes, realized MRR, and refunds remain distinct because cash movement and recurring subscription state answer different questions.

Revenue integrations accept provider webhooks for ongoing updates. The CLI can import subscription and invoice history for backfill. Currency and amount fields come from the provider events, while MRR change records describe recurring revenue movement.

References: crates/…/plugin.rs• L48-119 crates/…/analytics.rs• L190-480 web/…/Revenue.tsx• L37-148 web/…/Revenue.tsx• L156-255 skills/…/revenue.md• L7-48

Status-page capabilities

Status-page capabilities combine monitors and incidents into a health view for a project or environment. Monitors provide observed checks and uptime. Incidents provide the human explanation and timeline when a service is degraded or unavailable.

An environment receives one managed monitor as part of its lifecycle. The monitor keeps its identity and history when a deployment changes its health path. A deployment can update that path and request an immediate check. The scheduler checks active environments when monitors are due, while on-demand environments are not probed as normal service health.

The checker uses the public deployment URL, treats successful responses and redirects as operational, records response time and failure details, and emits a status-check event for outage handling. It retries timeouts, avoids duplicate checks, and does not store results from paused or no-longer-current deployments.

The status view combines monitor state with incident severity. Critical and major active incidents take priority over monitor detail. Project health also distinguishes a project with no monitor from one that has not deployed, and it excludes monitoring-only projects from deployment health. Status operations are authenticated and project-scoped. Mutation records include audit context for the actor, project, resource, environment, and resulting status.

This diagram shows how checks and incident updates become the status shown to an engineer or service user.

flowchart LR
    A[Scheduled or deployment check] --> B[Monitor result]
    C[Incident and updates] --> D[Incident state]
    B --> E[Overall health]
    D --> E
    E --> F[Status overview]
    E --> G[Project health]

References: crates/…/plugin.rs• L34-151 crates/…/health_check_service.rs• L378-547 crates/…/health_check_service.rs• L678-1116 crates/…/monitor_service.rs• L242-509 crates/…/monitor_service.rs• L729-780 crates/…/status_page.rs• L123-223 crates/…/audit.rs• L8-70

Data retention

Analytics retention limits how long event data and identifiers remain available. The policy is read from settings and applied in the background so product views, error views, visitor records, stored network identifiers, and any enabled analytical copy do not remain forever by accident.

The retention service keeps the PostgreSQL event and error-event policies in step with the configured windows. When ClickHouse is enabled, its event time-to-live follows the same event window. It removes visitors in bounded batches and removes their replicated event data with delivery fencing so a later queued write cannot restore expired data. It removes stored IP locations only when no supported data or audit record still refers to them.

The address window stays at least as long as the request-log window. A plugin that supplies its own proxy-log retention must declare a safe upper bound. If it does not, address deletion pauses because the service cannot prove that no retained log still points to the address. A temporary hold also protects addresses when an older log window still applies after a setting change.

Cleanup starts after service startup and repeats hourly. Each pass is paced and bounded, records only passes that changed data, and skips a pass when the policy cannot be read. This makes retention a controlled data-lifecycle task rather than an unbounded delete during ingest.

References: crates/…/retention.rs• L4-26 crates/…/retention.rs• L238-350 crates/…/retention.rs• L352-384 crates/…/retention.rs• L717-912 crates/…/retention.rs• L949-1062 crates/…/plugin.rs• L173-205

Access and trust boundaries

Read views use authenticated analytics or product permissions and stay within the requested project, environment, deployment, or visible project set. Public collection paths allow data writes, but they do not provide read access or make the data authoritative.

The main trust boundaries are:

  • Browser analytics: useful for behavior and experience signals, but open to blocking, retries, and forged values.
  • Authenticated backend analytics: suitable for conversion facts after the business transaction commits.
  • Error DSNs and ingest keys: public write credentials with limited scope, not general API secrets.
  • Replay data: sensitive visual data that requires consent, masking, and route or element blocking.
  • AI reports and summaries: opt-in interpretation of selected activity or traffic fields. Output is not proof of intent or identity.
  • Revenue state: derived from provider events and imports, not from untrusted browser analytics.
  • Status operations: protected changes because monitor and incident state affects the health message shown to others.
  • Global views: aggregates only the projects the caller may see and fail closed when bulk access is incomplete.

References: crates/…/handlers.rs• L238-280 crates/…/handlers.rs• L304-372 crates/…/types.rs• L8-18 crates/…/status_page.rs• L1022-1171

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep project and environment attribution aligned across event, performance, replay, live, segment, and global analytics views.
  • Keep event detail, property paths, segment filters, and AI activity property selection aligned with the event producer contract.
  • Keep chart range, aggregation, sorting, pagination, and drill-down filters aligned between the API and analytics views.
  • Keep request-log links and legacy analytics routes aligned with the canonical request-log path, including query strings and hashes.
  • Keep AI crawler provider and agent names aligned between the request taxonomy, feed filters, timeline grouping, and labels.
  • Keep AI activity consent, preview behavior, saved settings, sampling labels, last-report fallback, and daily scheduling aligned.
  • Keep funnel step definitions aligned with metric matching so editor, preview, saved query, date range, and visualization describe the same path.
  • Keep the release value used for error events aligned with uploaded source maps and displayed source context.
  • Keep source-map upload, release selection, file removal, and symbolication behavior aligned.
  • Keep revenue event types aligned with the meaning of cash, refunds, subscriptions, and MRR deltas.
  • Keep managed monitor identity, deployment health paths, current-deployment checks, due-time scheduling, and status reduction rules aligned.
  • Keep retention windows aligned across PostgreSQL events, ClickHouse events, error events, visitors, IP locations, proxy logs, and any plugin-provided log store.
  • Keep public ingest key precedence, scope, origin checks, request limits, identity rules, CORS behavior, audit records, and cache invalidation aligned.

Important failure modes

TriggerConsequenceGuard
Browser event is blocked or forgedEvent totals and funnel conversion do not match orders or entitlementsSend authoritative conversion events from authenticated backend code after commit
Analytical copy is delayedRecent activity is absent from some aggregate views for a short timeCheck the source-of-record write path before treating a fresh event as lost
AI report input is sampledCategory counts describe the sample rather than all trafficShow the sampled state and treat the report as directional evidence
AI sharing is off or the provider is unavailableGoal suggestions, previews, or summaries cannot runRequire explicit sharing and keep the non-AI report usable where possible
Replay runs without consent or maskingSensitive user input can appear in stored replay dataGate recording on consent and mask or block sensitive areas
Error release and source-map release differStack traces stay minified or point to the wrong sourceUse the same deployment release value for both
Source maps are removed for a releaseEvents from that release lose readable source contextConfirm the release and affected files before deletion
Revenue webhook history is incomplete or has the wrong event meaningMRR, cash, refund, and churn views disagree with the providerVerify provider events and keep subscription and payment measures separate
A keyed request has an invalid keyThe request is rejected rather than falling back to Host scopeTreat a presented key as authoritative
An ingest key is managed by a deployment tokenA deployed app could change the public write credential without a user audit actorDeny deployment tokens and audit user or API-key changes
An environment-scoped key cache survives a deployment changeNew events can be attributed to the old deployment for a short timeInvalidate cached scopes on route-table deployment updates
Retention settings cannot be readData cleanup is skipped rather than using an unsafe defaultSkip the pass and report the settings error
ClickHouse retention or visitor cleanup is only partly appliedThe primary store and analytical copy can show different historical rangesRetry the failed pass and keep deletion fenced until both stores agree
An IP location is deleted while a log or audit row still points to itHistorical views lose location context or keep a broken referenceCheck every known reference and honor the proxy-log retention window
A plugin keeps proxy logs without declaring a boundIP cleanup cannot prove that retained logs no longer reference an addressSuspend address deletion until the plugin provides a safe maximum
A monitor probes an old deployment or wrong pathA healthy service can show outage, or stale health can overwrite current healthValidate paths and persist only current, unpaused deployment results
Overlapping monitor sweeps claim one monitor twiceDuplicate probes add duplicate health historyClaim due monitors atomically before dispatch
A new monitor or incident state is not included in reduction rulesOverall status shows the wrong health stateUpdate status reduction and audit contracts with each new state

Key files

FileWhy to read it
crates/…/plugin.rsShows how analytics services, routes, ingest-key state, activity jobs, retention, AI availability, and cache invalidation join the platform.
crates/…/handlers.rsShows project-scoped ingest-key management, the public ingest endpoint, access checks, rotation, revocation, and audit behavior.
crates/…/types.rsShows the public, non-secret key contract and resolved project, environment, deployment, origin, and limit scope.
crates/…/retention.rsShows how PostgreSQL and ClickHouse analytics data plus identifiers expire without breaking longer-lived request-log or audit references.
web/…/AnalyticsTrafficChart.tsxShows the main traffic view and its event, session, and visitor choices.
web/…/EventDetail.tsxShows event counts, visitors, occurrences, and custom data.
web/…/LiveGlobe.tsxShows live activity, environment scope, polling, and visitor context.
web/…/ApiTraffic.tsxShows traffic trends, route and caller analysis, drill-down, and optional AI summary.
web/…/RequestLogsRedirect.tsxShows how old analytics request-log links reach the canonical request-log page.
web/…/AiCrawlerActivityFeed.tsxShows the distinction between AI fetches and human visitor activity.
web/…/ActivityReport.tsxShows AI visitor activity setup, preview, report, consent, and scheduling.
web/…/FunnelManagement.tsxShows the funnel lifecycle and selected date range for metrics.
web/…/FunnelVisualization.tsxShows conversion, drop-off, timing, and value interpretation.
crates/…/service.rsShows the Web Vitals and real-user performance model.
crates/…/service.rsShows how session metadata and event batches become a replay.
crates/…/error_tracking_service.rsShows how error ingestion, grouping, source maps, and issue views form one product.
web/…/SentryEventDetail.tsxShows the investigation view for an individual error event.
web/…/SourceMaps.tsxShows source-map upload, release browsing, symbolication support, and deletion.
crates/…/analytics.rsShows the revenue summary, time series, customer movement, and event meaning.
web/…/Revenue.tsxShows the cross-service revenue view and its filters.
crates/…/health_check_service.rsShows how probes become current status without duplicate or stale results.
crates/…/monitor_service.rsShows monitor ownership, continuity, intervals, paths, uptime, and project health.
crates/…/status_page.rsShows the protected status, monitor, uptime, bulk-health, and incident interface.