Skip to content

feat(metrics): add SQL editor scene for the alpha metrics product#60374

Merged
DanielVisca merged 7 commits into
masterfrom
daniel/metrics-sql-editor
May 28, 2026
Merged

feat(metrics): add SQL editor scene for the alpha metrics product#60374
DanielVisca merged 7 commits into
masterfrom
daniel/metrics-sql-editor

Conversation

@DanielVisca
Copy link
Copy Markdown
Contributor

@DanielVisca DanielVisca commented May 27, 2026

Problem

The /metrics scene shipped earlier as an empty scaffold — the route exists behind FEATURE_FLAGS.METRICS but there's nothing to do on the page. We have OTLP metrics flowing through the Rust capture-logs ingester into ClickHouse (metrics / metric_attributes tables) and a HogQL posthog.metrics table already registered. We need a usable surface so the alpha team can start exploring the data.

This is the base of a 4-PR stack to bring Metrics close to feature-parity with the Sentry "Application Metrics" experience. The stack:

  1. (this PR) SQL editor + setup prompt
  2. Single-metric line chart viewer (metric_query_runner.py + viewer tab)
  3. Group-by + samples view with trace-connected drill-in
  4. MCP query-metrics tool

Changes

image

Mirrors the logs pattern so the two surfaces stay recognisable. The /metrics scene now:

  • Shows a setup prompt with docs links when has_metrics is False.
  • Shows the shared HogQL SQLEditor (the same component the Logs SQL tab uses) preloaded with SELECT * FROM posthog.metrics LIMIT 10 once the team has ingested at least one metric.
  • Persists the SQL editor across navigation via the keepSqlEditorMounted pattern from logsSceneLogic.

Surface area

Area Change
Backend New MetricsViewSet.has_metrics action backed by HasMetricsQueryRunner (cached 7d, mirrors team_has_logs). New metrics API scope (OAuth-hidden, alpha).
HogQL Product.METRICS + _TABLE_TO_TAGS fallback for {metrics, metric_attributes}. New SCENE_TO_TAGS["Metrics"] entry so user-authored editor queries get tagged.
Frontend MetricsScene refactor, MetricsSetupPrompt, MetricsSqlEditor, metricsSceneLogic, metricsIngestionLogic, metricsSqlEditorTrackingLogic. New api.metrics.hasMetrics() client.
Schema New ProductIntentContext.METRICS_DOCS_VIEWED value. Regenerated posthog/schema.py + schema.json via hogli build:schema.

What's intentionally NOT in this PR

  • Metric-name picker / line chart / aggregation controls → PR2
  • Group-by + samples / trace-connected debugging → PR3
  • MCP query-metrics tool → PR4
  • Equations, monitors, dashboard widgets, Prom remote-write → punted

DRY notes for reviewers

metricsIngestionLogic, MetricsSetupPrompt, and the editor scaffolding are near-clones of the logs equivalents. Inlined rather than extracted into a generic productIngestionLogic({ key, apiCall }): with only two callers, the abstraction would be premature. Worth extracting once a third product (tracing? metrics-mcp?) wants the same shape.

How did you test this code?

I'm an agent. Automated coverage I actually ran:

  • pytest products/metrics/backend/tests — 6 tests pass (HasMetricsQueryRunner against a real ClickHouse, the has_metrics API, auth gating, positive-result caching, no-cache on negative).
  • pytest posthog/clickhouse/test/test_query_tagging.py -k 'scene or fallback' — all 34 query-tag tests still green after adding Product.METRICS and the SCENE_TO_TAGS["Metrics"] entry.
  • pnpm typescript:check — no new TS errors in products/metrics/.
  • ruff check + ruff format clean on touched files.

I also confirmed end-to-end against a live dev stack: the SQL editor renders, runs the default query, and returns real metric rows (a summary metric being scraped from a local nodejs service via the OTel collector's Prometheus receiver — 10 rows of action_match_ms with service_name=nodejs, populated resource_attributes map, sane timestamp / time_bucket).

I did not test:

  • The MetricsSetupPrompt empty-state path in a browser (only the post-ingestion path).
  • The teamHasMetricsCheckFailed banner branch.
  • The localStorage persistence path across reloads.

Publish to changelog?

no

Docs update

Not needed — alpha gated by FEATURE_FLAGS.METRICS, no public docs yet.

🤖 Agent context

Authored by Daniel via PostHog Code (Claude Opus 4.7).

Approach. The task was "make /metrics useful". I mirrored the logs precedent because (a) it's the closest analogue, (b) the HogQL posthog.metrics table and Rust ingestion already exist in master, so a SQL editor over them is the minimum viable surface, and (c) Sentry's "SQL front end" framing (Better Stack and others do this too) is a credible alpha story while we work on the higher-fidelity viewer.

Stack plan agreed before implementation. PR1 SQL editor → PR2 line-chart viewer + metric_query_runner.py → PR3 group-by + samples / trace-connected → PR4 MCP query-metrics. Each shippable on its own.

Decisions worth noting:

  • register_grandfathered_environment_nested_viewset over environments_router.register — followed the precedent every other product (including logs) uses, despite the helper's docstring discouraging new use. Worth a repo-wide migration but not in this PR.
  • posthog.metrics namespace in the probe query and editor default, not bare FROM metrics. The HogQL table is intentionally only registered under the posthog. node (see posthog/hogql/database/database.py). Inline comments call this out so a future contributor doesn't "fix" it to match logs.
  • Added Metrics to SCENE_TO_TAGS rather than extending HogQLFeatureExtractor to look beyond chain[0]. Surgical, fixes the actual UntaggedQueryError that originally happened when running queries from the editor.
  • metrics scope added to OAUTH_HIDDEN_SCOPE_OBJECTS — same posture wizard_session uses for alpha products. PAT validation accepts it; OAuth/MCP scopes don't advertise it.
  • No try/except in HasMetricsQueryRunner, no negative-result caching, no in-flight dedup on the 5s setup-prompt polling, no localStorage false write-back. All match the logs precedent exactly. QA flagged these as concerns; treating them as a precedent-wide follow-up rather than a metrics-only fix in this PR.

Stack tooling. Created and submitted via Graphite (gt track + gt submit --draft).

@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team May 27, 2026 23:36
Copy link
Copy Markdown
Contributor Author

DanielVisca commented May 27, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down.

Add the run-playwright label if you want an E2E sweep before merging — CI will pick it up automatically.

Most PRs don't need this. Real regressions still get caught on master and fix-forward.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 27, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​babel/​plugin-transform-class-properties@​7.24.71001006996100
Addednpm/​@​babel/​plugin-transform-nullish-coalescing-operator@​7.24.71001007196100
Addednpm/​@​dnd-kit/​utilities@​3.2.11001007180100
Addednpm/​@​babel/​preset-react@​7.23.31001007196100
Addednpm/​@​babel/​preset-typescript@​7.23.31001007396100
Addednpm/​@​babel/​plugin-transform-private-property-in-object@​7.24.71001007396100
Addednpm/​@​babel/​plugin-transform-class-static-block@​7.28.61001007397100
Addednpm/​@​babel/​plugin-transform-runtime@​7.22.10991007497100
Addednpm/​@​babel/​plugin-transform-react-jsx@​7.23.41001007696100
Addednpm/​@​floating-ui/​react@​0.27.19971007687100
Addednpm/​@​babel/​preset-env@​7.23.5961007798100
Addednpm/​@​dagrejs/​dagre@​1.1.51001007887100
Addednpm/​@​cloudflare/​vitest-pool-workers@​0.12.219710078100100
Addednpm/​@​dnd-kit/​core@​6.0.8991007980100
Addednpm/​@​dnd-kit/​sortable@​7.0.21001007980100
Addednpm/​@​babel/​traverse@​7.26.41001007997100
Updatednpm/​@​babel/​runtime@​7.29.7 ⏵ 7.24.010099 -179 +197100
Addednpm/​@​dnd-kit/​modifiers@​6.0.110010010080100
Addednpm/​@​babel/​standalone@​7.26.7991008098100
Addednpm/​@​babel/​types@​7.26.3981008197100
Addednpm/​@​eslint-community/​eslint-plugin-eslint-comments@​4.7.11001008290100
Addednpm/​@​google-cloud/​storage@​5.20.59310010084100
Addednpm/​@​fontsource-variable/​inter@​5.2.8100100848490
Addednpm/​@​google-cloud/​pubsub@​4.11.09610010084100
Addednpm/​@​connectrpc/​connect-node@​2.1.110010010085100
Addednpm/​@​connectrpc/​connect@​2.1.11001009185100
Addednpm/​@​clickhouse/​client@​1.12.01001008899100
Addednpm/​@​bufbuild/​protobuf@​2.11.01001008891100
Addednpm/​@​base-ui/​react@​1.4.0901008994100
Addednpm/​@​elevenlabs/​client@​1.7.01001009199100
Addednpm/​@​bufbuild/​protoc-gen-es@​2.11.010010010091100
Addednpm/​@​hono/​node-server@​2.0.210010010096100
Addednpm/​@​cloudflare/​workers-types@​4.20260207.0100100100100100

View full report

@DanielVisca DanielVisca marked this pull request as ready for review May 27, 2026 23:40
@assign-reviewers-posthog assign-reviewers-posthog Bot requested review from a team May 27, 2026 23:41
@rafaeelaudibert rafaeelaudibert requested review from a team and removed request for a team May 27, 2026 23:42
cache.delete(f"team:{self.team.id}:has_metrics")

def test_has_metrics_returns_false_when_no_metrics(self):
sync_execute("TRUNCATE TABLE IF EXISTS metrics1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Truncates wrong table name. Uses metrics1 instead of metrics, which means the test won't properly clear the metrics table. This will cause test isolation issues.

sync_execute("TRUNCATE TABLE IF EXISTS metrics")
Suggested change
sync_execute("TRUNCATE TABLE IF EXISTS metrics1")
sync_execute("TRUNCATE TABLE IF EXISTS metrics")

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional and correct — metrics is a Distributed engine table, not a storage table:

-- bin/clickhouse-metrics.sql
CREATE OR REPLACE TABLE metrics1 (...) ENGINE = MergeTree ...
create or replace TABLE metrics AS metrics1 ENGINE = Distributed('posthog', 'default', 'metrics1');

ClickHouse Distributed tables don't support TRUNCATE — the statement errors with Table engine Distributed doesn't support TRUNCATE method. Data lives in the local metrics1 MergeTree, which is the table that has to be truncated.

This matches the logs precedent at products/logs/backend/test/test_has_logs_query_runner.py:64, which truncates logs32 (the local table) not logs (the Distributed alias).

Switching to TRUNCATE TABLE metrics as suggested would break the test suite.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Size Change: +12.6 kB (+0.02%)

Total Size: 80.7 MB

📦 View Changed
Filename Size Change
frontend/dist-report/exporter/_parent/products/metrics/frontend/MetricsScene 7.47 kB +6.32 kB (+549.87%) 🆘
frontend/dist-report/posthog-app/_parent/products/metrics/frontend/MetricsScene 7.5 kB +6.32 kB (+534.32%) 🆘
ℹ️ View Unchanged
Filename Size Change
frontend/dist-report/decompression-worker/src/scenes/session-recordings/player/snapshot-processing/decompressionWorker 2.85 kB 0 B
frontend/dist-report/exporter/_chunks/chunk 8.41 MB +305 B (0%)
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Action 24.9 kB 0 B
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Actions 1.3 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityScene 118 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 16.8 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 130 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityUsers 838 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 20.9 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.6 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.8 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.1 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 881 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.16 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.7 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.1 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.79 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillScene 895 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 912 B 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.3 kB 0 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.27 kB 0 B
frontend/dist-report/exporter/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 19 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.64 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.02 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.02 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.78 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 33.9 kB 0 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.04 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 39.2 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.61 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.15 kB 0 B
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.83 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/DataWarehouseScene 46.8 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.08 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 24 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.03 kB 0 B
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.27 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/Deployment 4.02 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/DeploymentProject 5.54 kB 0 B
frontend/dist-report/exporter/_parent/products/deployments/frontend/Deployments 9.28 kB 0 B
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeature 991 B 0 B
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.21 kB 0 B
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointScene 40.6 kB 0 B
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointsScene 24.5 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.37 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 104 kB 0 B
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 27.1 kB 0 B
frontend/dist-report/exporter/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.35 kB 0 B
frontend/dist-report/exporter/_parent/products/games/368Hedgehogs/368Hedgehogs 5.58 kB 0 B
frontend/dist-report/exporter/_parent/products/games/FlappyHog/FlappyHog 6.09 kB 0 B
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 59.7 kB 0 B
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.28 kB 0 B
frontend/dist-report/exporter/_parent/products/links/frontend/LinkScene 25.2 kB 0 B
frontend/dist-report/exporter/_parent/products/links/frontend/LinksScene 4.51 kB 0 B
frontend/dist-report/exporter/_parent/products/live_debugger/frontend/LiveDebugger 19.4 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/LogsScene 17.8 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.3 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.27 kB 0 B
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.22 kB 0 B
frontend/dist-report/exporter/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB 0 B
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.5 kB 0 B
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.5 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/StickinessBarChart/StickinessBarChart 3.27 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/StickinessLineChart/StickinessLineChart 3.11 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 7.12 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.21 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.57 kB 0 B
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.31 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/observations/ReplayObservation 8.13 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 32.3 kB 0 B
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 12.7 kB 0 B
frontend/dist-report/exporter/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.5 kB 0 B
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.02 kB 0 B
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.2 kB 0 B
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskDetailScene 23.5 kB 0 B
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskTracker 14.6 kB 0 B
frontend/dist-report/exporter/_parent/products/tracing/frontend/TracingScene 54.4 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterview 9.28 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviewResponse 5.64 kB 0 B
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviews 6.04 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.52 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.6 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.29 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB 0 B
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.5 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.6 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/Workflows/WorkflowScene 111 kB 0 B
frontend/dist-report/exporter/_parent/products/workflows/frontend/WorkflowsScene 60.1 kB 0 B
frontend/dist-report/exporter/src/exporter/exporter 19.6 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterDashboardScene 1.99 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterHeatmapScene 19.6 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterInsightScene 2.98 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterInterviewScene 310 kB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterNotebookScene 2.71 MB 0 B
frontend/dist-report/exporter/src/exporter/scenes/ExporterRecordingScene 1.1 kB 0 B
frontend/dist-report/exporter/src/exporterSharedChunkAnchors 1.19 kB 0 B
frontend/dist-report/exporter/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB 0 B
frontend/dist-report/exporter/src/lib/components/MonacoDiffEditor 471 B 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.22 kB 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 808 B 0 B
frontend/dist-report/exporter/src/lib/lemon-ui/Link/Link 359 B 0 B
frontend/dist-report/exporter/src/lib/monaco/CodeEditorInline 798 B 0 B
frontend/dist-report/exporter/src/lib/monaco/vimMode 211 kB 0 B
frontend/dist-report/exporter/src/lib/ui/Button/ButtonPrimitives 422 B 0 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitals 7.48 kB 0 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.05 kB 0 B
frontend/dist-report/exporter/src/queries/schema 840 kB +22 B (0%)
frontend/dist-report/exporter/src/scenes/approvals/changeRequestsLogic 850 B 0 B
frontend/dist-report/exporter/src/scenes/authentication/passkeyLogic 790 B 0 B
frontend/dist-report/exporter/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.2 kB 0 B
frontend/dist-report/exporter/src/scenes/data-pipelines/TransformationsScene 6.51 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/BoxPlot/BoxPlot 5.35 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 8.81 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/RegionMap/RegionMap 29.7 kB 0 B
frontend/dist-report/exporter/src/scenes/insights/views/WorldMap/WorldMap 1.04 MB 0 B
frontend/dist-report/exporter/src/scenes/models/ModelsScene 19 kB 0 B
frontend/dist-report/exporter/src/scenes/models/NodeDetailScene 17 kB 0 B
frontend/dist-report/monaco-editor-worker/src/lib/monaco/workers/monacoEditorWorker 288 kB 0 B
frontend/dist-report/monaco-json-worker/src/lib/monaco/workers/monacoJsonWorker 419 kB 0 B
frontend/dist-report/monaco-typescript-worker/src/lib/monaco/workers/monacoTsWorker 7.02 MB 0 B
frontend/dist-report/posthog-app/_chunks/chunk 8.61 MB +305 B (0%)
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Action 25.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Actions 1.36 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityScene 119 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 16.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 130 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityUsers 872 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 21 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.64 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 915 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.19 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.83 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillScene 929 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 946 B 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 19 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.67 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.82 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 26.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.07 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 38 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.65 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.18 kB 0 B
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.86 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/DataWarehouseScene 1.78 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.15 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 24.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.06 kB 0 B
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/Deployment 4.05 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/DeploymentProject 5.58 kB 0 B
frontend/dist-report/posthog-app/_parent/products/deployments/frontend/Deployments 9.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeature 1.16 kB 0 B
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.24 kB 0 B
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointScene 40.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointsScene 22.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.44 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 103 kB 0 B
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 27.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.38 kB 0 B
frontend/dist-report/posthog-app/_parent/products/games/368Hedgehogs/368Hedgehogs 5.61 kB 0 B
frontend/dist-report/posthog-app/_parent/products/games/FlappyHog/FlappyHog 6.12 kB 0 B
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 59.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinkScene 25.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinksScene 4.55 kB 0 B
frontend/dist-report/posthog-app/_parent/products/live_debugger/frontend/LiveDebugger 19.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/LogsScene 17.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.3 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.26 kB 0 B
frontend/dist-report/posthog-app/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.5 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/StickinessBarChart/StickinessBarChart 3.31 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/StickinessLineChart/StickinessLineChart 3.14 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 7.15 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.24 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.35 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/observations/ReplayObservation 8.17 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 32.3 kB 0 B
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 12.8 kB 0 B
frontend/dist-report/posthog-app/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.05 kB 0 B
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.2 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskDetailScene 23.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskTracker 14.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/tracing/frontend/TracingScene 54.4 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterview 9.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviewResponse 5.68 kB 0 B
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviews 6.08 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.56 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.7 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.32 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB 0 B
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.6 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/Workflows/WorkflowScene 104 kB 0 B
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/WorkflowsScene 60.2 kB 0 B
frontend/dist-report/posthog-app/src/index 61.1 kB 0 B
frontend/dist-report/posthog-app/src/layout/panel-layout/ai-first/tabs/NavTabChat 7.16 kB 0 B
frontend/dist-report/posthog-app/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB 0 B
frontend/dist-report/posthog-app/src/lib/components/MonacoDiffEditor 471 B 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.25 kB 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 842 B 0 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/Link/Link 359 B 0 B
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditorInline 832 B 0 B
frontend/dist-report/posthog-app/src/lib/monaco/vimMode 211 kB 0 B
frontend/dist-report/posthog-app/src/lib/ui/Button/ButtonPrimitives 426 B 0 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitals 7.52 kB 0 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.09 kB 0 B
frontend/dist-report/posthog-app/src/queries/schema 840 kB +22 B (0%)
frontend/dist-report/posthog-app/src/scenes/activity/explore/EventsScene 3.28 kB 0 B
frontend/dist-report/posthog-app/src/scenes/activity/explore/SessionsScene 4.69 kB 0 B
frontend/dist-report/posthog-app/src/scenes/activity/live/LiveEventsTable 5.58 kB 0 B
frontend/dist-report/posthog-app/src/scenes/agentic/AgenticAuthorize 5.84 kB 0 B
frontend/dist-report/posthog-app/src/scenes/approvals/ApprovalDetail 16.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/approvals/changeRequestsLogic 884 B 0 B
frontend/dist-report/posthog-app/src/scenes/audit-logs/AdvancedActivityLogsScene 42.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/AuthenticatedShell 170 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/AccountConnected 3.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/AgenticAccountMismatch 2.73 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/CLIAuthorize 11.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/CLILive 4.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/credential-review/CredentialReview 3.95 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/EmailMFAVerify 3.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/InviteSignup 15.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/Login 10.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/Login2FA 5.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/passkeyLogic 824 B 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/PasswordReset 4.71 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/PasswordResetComplete 3.34 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/SignupContainer 28.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/verify-email/VerifyEmail 5.13 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/TwoFactorReset 4.37 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/VercelConnect 5.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/authentication/VercelLinkError 2.61 kB 0 B
frontend/dist-report/posthog-app/src/scenes/billing/AuthorizationStatus 1.07 kB 0 B
frontend/dist-report/posthog-app/src/scenes/billing/Billing 833 B 0 B
frontend/dist-report/posthog-app/src/scenes/billing/BillingSection 21.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohort 28.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/CohortCalculationHistory 6.58 kB 0 B
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohorts 9.78 kB 0 B
frontend/dist-report/posthog-app/src/scenes/coupons/Coupons 1.06 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/Dashboard 1.65 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/Dashboards 19.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/templates/DashboardTemplateCopyScene 6.06 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/DataManagementScene 986 B 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionEdit 17.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionView 24.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/MaterializedColumns/MaterializedColumns 12 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-management/variables/SqlVariableEditScene 7.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/batch-exports/BatchExportScene 61 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DataPipelinesNewScene 2.66 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DestinationsScene 3.03 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/legacy-plugins/LegacyPluginScene 21 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/TransformationsScene 2.27 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-pipelines/WebScriptsScene 2.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-warehouse/DataWarehouseScene 1.72 kB 0 B
frontend/dist-report/posthog-app/src/scenes/data-warehouse/editor/EditorScene 1.48 kB 0 B
frontend/dist-report/posthog-app/src/scenes/debug/DebugScene 20.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/debug/hog/HogRepl 7.72 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/Experiment 207 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/Experiments 20.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetric 6.41 kB 0 B
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetrics 889 B 0 B
frontend/dist-report/posthog-app/src/scenes/exports/ExportsScene 4.33 kB 0 B
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlag 146 kB 0 B
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlags 1.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/Group 15.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/Groups 4.26 kB 0 B
frontend/dist-report/posthog-app/src/scenes/groups/GroupsNew 7.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health-alerts/HealthAlertsScene 4.14 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/categoryDetail/HealthCategoryDetailScene 7.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/HealthScene 12.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/health/pipelineStatus/PipelineStatusScene 9.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapNewScene 5.38 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapRecordingScene 4.27 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapScene 6.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmaps/HeatmapsScene 4.23 kB 0 B
frontend/dist-report/posthog-app/src/scenes/hog-functions/HogFunctionScene 59.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/inbox/InboxScene 63.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/InsightQuickStart/InsightQuickStart 5.77 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/InsightScene 34.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/BoxPlot/BoxPlot 5.39 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 4.84 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/RegionMap/RegionMap 29.8 kB 0 B
frontend/dist-report/posthog-app/src/scenes/insights/views/WorldMap/WorldMap 5.13 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/AsyncMigrations/AsyncMigrations 13.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/DeadLetterQueue/DeadLetterQueue 5.74 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/QueryPerformance/QueryPerformance 8.97 kB 0 B
frontend/dist-report/posthog-app/src/scenes/instance/SystemStatus/SystemStatus 17.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/IntegrationsRedirect/IntegrationsRedirect 1.08 kB 0 B
frontend/dist-report/posthog-app/src/scenes/marketing-analytics/MarketingAnalyticsScene 42 kB 0 B
frontend/dist-report/posthog-app/src/scenes/max/Max 1.02 kB 0 B
frontend/dist-report/posthog-app/src/scenes/models/ModelsScene 19 kB 0 B
frontend/dist-report/posthog-app/src/scenes/models/NodeDetailScene 17.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/moveToPostHogCloud/MoveToPostHogCloud 4.81 kB 0 B
frontend/dist-report/posthog-app/src/scenes/new-tab/NewTabScene 1.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookCanvasScene 3.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookPanel/NotebookPanel 5.94 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookScene 9.26 kB 0 B
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebooksScene 7.95 kB 0 B
frontend/dist-report/posthog-app/src/scenes/oauth/OAuthAuthorize 980 B 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/coupon/OnboardingCouponRedemption 1.55 kB 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/Onboarding 791 kB 0 B
frontend/dist-report/posthog-app/src/scenes/onboarding/sdks/SdkDoctorScene 10.2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/ConfirmOrganization/ConfirmOrganization 4.88 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/Create/Create 1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/Deactivated 1.48 kB 0 B
frontend/dist-report/posthog-app/src/scenes/organization/PendingDeletion 2.45 kB 0 B
frontend/dist-report/posthog-app/src/scenes/persons/PersonScene 19 kB 0 B
frontend/dist-report/posthog-app/src/scenes/persons/PersonsScene 6.09 kB 0 B
frontend/dist-report/posthog-app/src/scenes/PreflightCheck/PreflightCheck 5.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTour 275 kB 0 B
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTours 5.03 kB 0 B
frontend/dist-report/posthog-app/src/scenes/project-homepage/ProjectHomepage 18.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/project/Create/Create 1.18 kB 0 B
frontend/dist-report/posthog-app/src/scenes/resource-transfer/ResourceTransfer 9.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/saved-insights/SavedInsights 1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/detail/SessionRecordingDetail 2.1 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene 4.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/kiosk/SessionRecordingsKiosk 10.3 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/player/snapshot-processing/DecompressionWorkerManager 329 B 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene 5.45 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/SessionRecordings 1.12 kB 0 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/settings/SessionRecordingsSettingsScene 2.31 kB 0 B
frontend/dist-report/posthog-app/src/scenes/sessions/SessionProfileScene 15.4 kB 0 B
frontend/dist-report/posthog-app/src/scenes/settings/SettingsScene 3.9 kB 0 B
frontend/dist-report/posthog-app/src/scenes/sites/Site 1.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/startups/StartupProgram 21.5 kB 0 B
frontend/dist-report/posthog-app/src/scenes/StripeConfirmInstall/StripeConfirmInstall 3.88 kB 0 B
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionScene 14.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionsScene 5.53 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/forms/SurveyFormBuilder 1.89 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/Survey 1.36 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/Surveys 26.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/surveys/wizard/SurveyWizard 72.7 kB 0 B
frontend/dist-report/posthog-app/src/scenes/themes/CustomCssScene 3.91 kB 0 B
frontend/dist-report/posthog-app/src/scenes/toolbar-launch/ToolbarLaunch 2.82 kB 0 B
frontend/dist-report/posthog-app/src/scenes/Unsubscribe/Unsubscribe 2 kB 0 B
frontend/dist-report/posthog-app/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene 6.97 kB 0 B
frontend/dist-report/posthog-app/src/scenes/web-analytics/WebAnalyticsScene 10.6 kB 0 B
frontend/dist-report/posthog-app/src/scenes/wizard/Wizard 4.8 kB 0 B
frontend/dist-report/posthog-app/src/sharedChunkAnchors 1.19 kB 0 B
frontend/dist-report/render-query/src/render-query/render-query 27.4 MB +327 B (0%)
frontend/dist-report/toolbar/src/toolbar/toolbar 15.7 MB +305 B (0%)

compressed-size-action

@DanielVisca DanielVisca force-pushed the daniel/metrics-sql-editor branch from 8a04137 to 2ee7716 Compare May 27, 2026 23:44
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team May 27, 2026 23:44
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 27, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
products/metrics/backend/tests/test_has_metrics_query_runner.py:13-27
**Missing positive-path test for `HasMetricsQueryRunner`**

`TestHasMetricsQueryRunner` only exercises the empty-table branch. If a regression ever makes `run()` return `False` even when metrics exist (wrong table name, broken HogQL namespace resolution, etc.), none of the backend tests would catch it. A complementary positive test would insert one row into `metrics1`, call `runner.run()`, and assert the result is `True`.

Reviews (1): Last reviewed commit: "fix(metrics): satisfy strict product:lin..." | Re-trigger Greptile

Comment on lines +13 to +27
class TestHasMetricsQueryRunner(ClickhouseTestMixin, APIBaseTest):
CLASS_DATA_LEVEL_SETUP = True

def setUp(self):
super().setUp()
cache.delete(f"team:{self.team.id}:has_metrics")

def test_has_metrics_returns_false_when_no_metrics(self):
sync_execute("TRUNCATE TABLE IF EXISTS metrics1")
cache.delete(f"team:{self.team.id}:has_metrics")

runner = HasMetricsQueryRunner(self.team)
self.assertFalse(runner.run())


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing positive-path test for HasMetricsQueryRunner

TestHasMetricsQueryRunner only exercises the empty-table branch. If a regression ever makes run() return False even when metrics exist (wrong table name, broken HogQL namespace resolution, etc.), none of the backend tests would catch it. A complementary positive test would insert one row into metrics1, call runner.run(), and assert the result is True.

Prompt To Fix With AI
This is a comment left during a code review.
Path: products/metrics/backend/tests/test_has_metrics_query_runner.py
Line: 13-27

Comment:
**Missing positive-path test for `HasMetricsQueryRunner`**

`TestHasMetricsQueryRunner` only exercises the empty-table branch. If a regression ever makes `run()` return `False` even when metrics exist (wrong table name, broken HogQL namespace resolution, etc.), none of the backend tests would catch it. A complementary positive test would insert one row into `metrics1`, call `runner.run()`, and assert the result is `True`.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 48f89cd73b. Added two complementary tests:

  • test_has_metrics_returns_true_when_metrics_exist — inserts a minimal row into metrics1 and asserts runner.run() returns True. Catches regressions in HogQL posthog.metrics namespace resolution, table name, or the SELECT 1 LIMIT 1 shape.
  • test_has_metrics_respects_team_isolation — inserts a row for a different team_id and asserts runner.run() returns False for our team. Catches regressions in HogQL's auto-injected team_id filter.

All 7 backend tests in the file pass.

DanielVisca and others added 7 commits May 28, 2026 11:27
Mirrors the logs pattern to give the empty /metrics scene a usable starting
point: a HogQL SQL editor over posthog.metrics plus a setup prompt when
no metrics have been ingested. Adds the metrics scope (OAuth-hidden, alpha)
and a has_metrics endpoint backed by a cached query runner.

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
- Tag HogQL queries from the Metrics scene (was UntaggedQueryError on
  every editor run): adds Metrics to SCENE_TO_TAGS so user-authored
  `FROM posthog.metrics` queries get product=metrics, since the table
  fallback only matches chain[0] which is "posthog".
- Bound default editor query with WHERE timestamp > now() - INTERVAL 1
  DAY so the auto-run on first mount uses partition pruning instead of
  cross-partition merging on the (team_id, ..., timestamp) sort key.
- Wrap has_metrics probe in try/except: ClickHouse outages / un-
  provisioned tables now log + capture to Sentry and return False
  instead of bubbling a 500.
- Drop the legacy /api/projects/.../metrics/ route — only register the
  modern environments-nested path.
- Bump cache key to v1 suffix so a future shape change can roll cleanly.
- Drop banner dismissKey so verification-failed hint reappears on each
  failed check.
- Fix subject-verb agreement in empty-state copy.

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
Keep only the SCENE_TO_TAGS entry that fixes the actual UntaggedQueryError
in the SQL editor. Revert the rest to match the logs precedent that every
other product follows:

- has_metrics runner: no try/except (logs runner doesn't have one either)
- viewset registration: stay with register_grandfathered_environment_*
  (matches every other product including logs)
- cache key: bare team:{id}:has_metrics (no :v1 suffix)
- LemonBanner: keep dismissKey (logs uses the same pattern)
- empty-state copy: match the logs phrasing 1:1
- default editor query: SELECT * FROM posthog.metrics LIMIT 10 to mirror
  the logs default `SELECT * FROM logs LIMIT 10` — no ORDER BY needed

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
…ntation/

The metrics product is in strict isolation mode (it has backend/facade/
contracts.py), so hogli product:lint flags backend/api.py at root as
misplaced — the canonical location is backend/presentation/api.py.

- Move backend/api.py -> backend/presentation/api.py
- Update the import in posthog/api/__init__.py
- Add the matching tach interface block exposing
  backend.facade and backend.presentation.api
- Register products.metrics under posthog's depends_on so the import
  is allowed by tach
- Update the report_user_action mock path in the test

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
CI import-linter flagged the strict-mode contract:
products.metrics.backend.presentation.api was importing
products.metrics.backend.has_metrics_query_runner directly. In strict
mode (this product has backend/facade/contracts.py) the presentation
layer must only import from the facade.

- facade/api.py: thin team_has_metrics wrapper over the runner
- presentation/api.py: import from facade instead of the runner module
- package.json: add the canonical backend:contract-check script so
  turbo + product:lint recognise this product as isolated

Verified locally: lint-imports passes, hogli product:lint metrics
passes with no warnings, 6 backend tests still pass.

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
…yRunner

Per PR review: the runner-level test class only covered the empty-table
branch. Add two complementary tests:

- test_has_metrics_returns_true_when_metrics_exist: insert one row into
  metrics1 (the local table — INSERTs go through Distributed but the
  point is end-to-end the HogQL SELECT must find it), assert run()
  returns True. Catches regressions in posthog.metrics namespace
  resolution, table name, or LIMIT 1 shape.
- test_has_metrics_respects_team_isolation: insert a row for a
  different team, assert run() returns False for our team. Catches
  regressions in HogQL's team_id auto-filter.

Generated-By: PostHog Code
Task-Id: c20a4a56-d258-420f-8b00-df6aaf3083b5
@DanielVisca DanielVisca force-pushed the daniel/metrics-sql-editor branch from 7e5c2aa to 427a84b Compare May 28, 2026 18:30
@DanielVisca DanielVisca enabled auto-merge (squash) May 28, 2026 18:37
@DanielVisca DanielVisca merged commit 52e565e into master May 28, 2026
245 checks passed
@DanielVisca DanielVisca deleted the daniel/metrics-sql-editor branch May 28, 2026 18:59
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 28, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-28 19:38 UTC Run
prod-us ✅ Deployed 2026-05-28 19:52 UTC Run
prod-eu ✅ Deployed 2026-05-28 19:56 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants