railwatch 0.9.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AGENTS.md +37 -33
- data/CHANGELOG.md +66 -0
- data/README.md +51 -60
- data/config/routes.rb +0 -59
- data/docs/ai-and-mcp.md +9 -8
- data/docs/configuration.md +57 -71
- data/docs/faq.md +17 -25
- data/docs/getting-started.md +105 -117
- data/docs/replacing-nightwatch.md +8 -7
- data/docs/replacing-sentry.md +12 -16
- data/docs/security.md +14 -20
- data/docs/self-hosting.md +24 -22
- data/docs/testing.md +6 -14
- data/docs/troubleshooting.md +12 -46
- data/lib/generators/railwatch/install/install_generator.rb +12 -240
- data/lib/generators/railwatch/install/templates/initializer.rb.tt +10 -40
- data/lib/generators/railwatch/install/templates/post-deploy +0 -7
- data/lib/railwatch/authentication.rb +6 -5
- data/lib/railwatch/buffer.rb +9 -0
- data/lib/railwatch/configuration.rb +21 -151
- data/lib/railwatch/engine.rb +9 -118
- data/lib/railwatch/patches.rb +0 -11
- data/lib/railwatch/reporter.rb +92 -21
- data/lib/railwatch/sampler.rb +10 -2
- data/lib/railwatch/subscribers/process_info.rb +1 -2
- data/lib/railwatch/version.rb +1 -1
- data/lib/railwatch.rb +8 -64
- data/lib/tasks/railwatch_tasks.rake +3 -325
- data/llms.txt +23 -25
- metadata +3 -453
- data/app/channels/railwatch/environment_channel.rb +0 -62
- data/app/controllers/concerns/railwatch/telemetry_identity.rb +0 -25
- data/app/controllers/railwatch/alerts_controller.rb +0 -48
- data/app/controllers/railwatch/anomaly_rules_controller.rb +0 -31
- data/app/controllers/railwatch/attachments_controller.rb +0 -22
- data/app/controllers/railwatch/broadcasts_controller.rb +0 -15
- data/app/controllers/railwatch/cache_events_controller.rb +0 -30
- data/app/controllers/railwatch/commands_controller.rb +0 -16
- data/app/controllers/railwatch/comments_controller.rb +0 -11
- data/app/controllers/railwatch/dashboard_controller.rb +0 -70
- data/app/controllers/railwatch/deploys_controller.rb +0 -34
- data/app/controllers/railwatch/deprecations_controller.rb +0 -54
- data/app/controllers/railwatch/environment_scoped.rb +0 -81
- data/app/controllers/railwatch/exceptions_controller.rb +0 -52
- data/app/controllers/railwatch/executions_controller.rb +0 -13
- data/app/controllers/railwatch/issues_controller.rb +0 -258
- data/app/controllers/railwatch/jobs_controller.rb +0 -63
- data/app/controllers/railwatch/llm_calls_controller.rb +0 -124
- data/app/controllers/railwatch/logs_controller.rb +0 -40
- data/app/controllers/railwatch/mails_controller.rb +0 -19
- data/app/controllers/railwatch/notifications_controller.rb +0 -11
- data/app/controllers/railwatch/outgoing_requests_controller.rb +0 -19
- data/app/controllers/railwatch/overview_controller.rb +0 -38
- data/app/controllers/railwatch/people_controller.rb +0 -25
- data/app/controllers/railwatch/processes_controller.rb +0 -33
- data/app/controllers/railwatch/profiles_controller.rb +0 -65
- data/app/controllers/railwatch/queries_controller.rb +0 -59
- data/app/controllers/railwatch/releases_controller.rb +0 -75
- data/app/controllers/railwatch/requests_controller.rb +0 -37
- data/app/controllers/railwatch/saved_views_controller.rb +0 -53
- data/app/controllers/railwatch/scheduled_tasks_controller.rb +0 -45
- data/app/controllers/railwatch/spans_controller.rb +0 -47
- data/app/controllers/railwatch/storage_ops_controller.rb +0 -15
- data/app/controllers/railwatch/tenants_controller.rb +0 -44
- data/app/controllers/railwatch/thresholds_controller.rb +0 -47
- data/app/controllers/railwatch/traces_controller.rb +0 -72
- data/app/controllers/railwatch/transactions_controller.rb +0 -21
- data/app/controllers/railwatch/view_renders_controller.rb +0 -28
- data/app/controllers/railwatch/visits_controller.rb +0 -53
- data/app/frontend/components/app-content.tsx +0 -26
- data/app/frontend/components/app-logo-icon.tsx +0 -23
- data/app/frontend/components/app-logo.tsx +0 -14
- data/app/frontend/components/app-shell.tsx +0 -38
- data/app/frontend/components/app-sidebar-header.tsx +0 -54
- data/app/frontend/components/app-sidebar.tsx +0 -94
- data/app/frontend/components/app-wordmark.tsx +0 -29
- data/app/frontend/components/breadcrumbs.tsx +0 -46
- data/app/frontend/components/icon.tsx +0 -16
- data/app/frontend/components/input-error.tsx +0 -18
- data/app/frontend/components/nav-footer.tsx +0 -46
- data/app/frontend/components/nav-main.tsx +0 -41
- data/app/frontend/components/nav-user.tsx +0 -50
- data/app/frontend/components/railwatch/chart-hover.tsx +0 -34
- data/app/frontend/components/railwatch/chart-panel.tsx +0 -170
- data/app/frontend/components/railwatch/code.tsx +0 -28
- data/app/frontend/components/railwatch/command-palette.tsx +0 -132
- data/app/frontend/components/railwatch/copy-block.tsx +0 -52
- data/app/frontend/components/railwatch/copy-id.tsx +0 -49
- data/app/frontend/components/railwatch/cursor-load-more.tsx +0 -39
- data/app/frontend/components/railwatch/data-table.tsx +0 -195
- data/app/frontend/components/railwatch/digit-roll.tsx +0 -312
- data/app/frontend/components/railwatch/empty-state.tsx +0 -159
- data/app/frontend/components/railwatch/env-nav.tsx +0 -130
- data/app/frontend/components/railwatch/env-switcher.tsx +0 -145
- data/app/frontend/components/railwatch/filter-bar.tsx +0 -153
- data/app/frontend/components/railwatch/flamegraph.tsx +0 -324
- data/app/frontend/components/railwatch/frames.tsx +0 -295
- data/app/frontend/components/railwatch/json-viewer.tsx +0 -159
- data/app/frontend/components/railwatch/live-dot.tsx +0 -78
- data/app/frontend/components/railwatch/live-toggle.tsx +0 -76
- data/app/frontend/components/railwatch/metric-chart.tsx +0 -112
- data/app/frontend/components/railwatch/mobile-page-switcher.tsx +0 -89
- data/app/frontend/components/railwatch/onboarding.tsx +0 -91
- data/app/frontend/components/railwatch/origin-identity.tsx +0 -84
- data/app/frontend/components/railwatch/page-header.tsx +0 -42
- data/app/frontend/components/railwatch/percentile-picker.tsx +0 -18
- data/app/frontend/components/railwatch/relative-time.tsx +0 -18
- data/app/frontend/components/railwatch/saved-views.tsx +0 -232
- data/app/frontend/components/railwatch/segmented.tsx +0 -64
- data/app/frontend/components/railwatch/series-chart.tsx +0 -400
- data/app/frontend/components/railwatch/shortcuts-dialog.tsx +0 -89
- data/app/frontend/components/railwatch/signal-toast.tsx +0 -121
- data/app/frontend/components/railwatch/sort-header.tsx +0 -37
- data/app/frontend/components/railwatch/source-link.tsx +0 -57
- data/app/frontend/components/railwatch/sparkline-cell.tsx +0 -14
- data/app/frontend/components/railwatch/sql-block.tsx +0 -116
- data/app/frontend/components/railwatch/stat.tsx +0 -185
- data/app/frontend/components/railwatch/status-badge.tsx +0 -79
- data/app/frontend/components/railwatch/step-picker.tsx +0 -57
- data/app/frontend/components/railwatch/timeline.tsx +0 -405
- data/app/frontend/components/railwatch/utilisation-bar.tsx +0 -44
- data/app/frontend/components/railwatch/window-picker.tsx +0 -147
- data/app/frontend/components/ui/avatar.tsx +0 -51
- data/app/frontend/components/ui/badge.tsx +0 -46
- data/app/frontend/components/ui/breadcrumb.tsx +0 -109
- data/app/frontend/components/ui/button.tsx +0 -60
- data/app/frontend/components/ui/card.tsx +0 -92
- data/app/frontend/components/ui/chart.tsx +0 -374
- data/app/frontend/components/ui/checkbox.tsx +0 -32
- data/app/frontend/components/ui/collapsible.tsx +0 -31
- data/app/frontend/components/ui/command.tsx +0 -182
- data/app/frontend/components/ui/dialog.tsx +0 -158
- data/app/frontend/components/ui/dropdown-menu.tsx +0 -255
- data/app/frontend/components/ui/hover-card.tsx +0 -42
- data/app/frontend/components/ui/input.tsx +0 -21
- data/app/frontend/components/ui/label.tsx +0 -24
- data/app/frontend/components/ui/popover.tsx +0 -87
- data/app/frontend/components/ui/select.tsx +0 -185
- data/app/frontend/components/ui/separator.tsx +0 -28
- data/app/frontend/components/ui/sheet.tsx +0 -137
- data/app/frontend/components/ui/sidebar.tsx +0 -726
- data/app/frontend/components/ui/skeleton.tsx +0 -13
- data/app/frontend/components/ui/sonner.tsx +0 -41
- data/app/frontend/components/ui/table.tsx +0 -114
- data/app/frontend/components/ui/tabs.tsx +0 -91
- data/app/frontend/components/ui/textarea.tsx +0 -18
- data/app/frontend/components/ui/tooltip.tsx +0 -61
- data/app/frontend/components/user-info.tsx +0 -32
- data/app/frontend/components/user-menu-content.tsx +0 -94
- data/app/frontend/entrypoints/application.css +0 -244
- data/app/frontend/entrypoints/inertia.tsx +0 -92
- data/app/frontend/fonts/CommitMono-Bold.woff2 +0 -0
- data/app/frontend/fonts/CommitMono-Regular.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Black.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Bold.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Medium.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Regular.woff2 +0 -0
- data/app/frontend/hooks/use-appearance.tsx +0 -67
- data/app/frontend/hooks/use-clipboard.ts +0 -32
- data/app/frontend/hooks/use-flash.tsx +0 -23
- data/app/frontend/hooks/use-hotkeys.ts +0 -63
- data/app/frontend/hooks/use-initials.tsx +0 -15
- data/app/frontend/hooks/use-live.ts +0 -205
- data/app/frontend/hooks/use-mobile-navigation.ts +0 -8
- data/app/frontend/hooks/use-mobile.ts +0 -21
- data/app/frontend/hooks/use-percentile.ts +0 -24
- data/app/frontend/hooks/use-reduced-motion.ts +0 -25
- data/app/frontend/hooks/use-row-nav.ts +0 -106
- data/app/frontend/hooks/use-step.ts +0 -27
- data/app/frontend/hooks/use-ticker.ts +0 -12
- data/app/frontend/hooks/use-window.ts +0 -58
- data/app/frontend/layouts/app/app-sidebar-layout.tsx +0 -107
- data/app/frontend/layouts/app-layout.tsx +0 -21
- data/app/frontend/layouts/env-layout.tsx +0 -53
- data/app/frontend/layouts/persistent-layout.tsx +0 -18
- data/app/frontend/lib/cable.ts +0 -10
- data/app/frontend/lib/env-pages.ts +0 -236
- data/app/frontend/lib/execution-path.ts +0 -55
- data/app/frontend/lib/explain.ts +0 -50
- data/app/frontend/lib/filter.ts +0 -25
- data/app/frontend/lib/flamegraph.ts +0 -155
- data/app/frontend/lib/format.ts +0 -71
- data/app/frontend/lib/keyboard.ts +0 -18
- data/app/frontend/lib/mount.ts +0 -23
- data/app/frontend/lib/source-link.ts +0 -217
- data/app/frontend/lib/utils.ts +0 -6
- data/app/frontend/pages/alerts/index.tsx +0 -171
- data/app/frontend/pages/broadcasts/index.tsx +0 -171
- data/app/frontend/pages/cache_events/index.tsx +0 -127
- data/app/frontend/pages/commands/index.tsx +0 -143
- data/app/frontend/pages/deploys/index.tsx +0 -94
- data/app/frontend/pages/deploys/show.tsx +0 -309
- data/app/frontend/pages/deprecations/index.tsx +0 -176
- data/app/frontend/pages/exceptions/index.tsx +0 -271
- data/app/frontend/pages/executions/show.tsx +0 -821
- data/app/frontend/pages/issues/index.tsx +0 -399
- data/app/frontend/pages/issues/show.tsx +0 -1367
- data/app/frontend/pages/jobs/index.tsx +0 -381
- data/app/frontend/pages/jobs/klass.tsx +0 -215
- data/app/frontend/pages/llm_calls/index.tsx +0 -664
- data/app/frontend/pages/logs/index.tsx +0 -303
- data/app/frontend/pages/mails/index.tsx +0 -218
- data/app/frontend/pages/notifications/index.tsx +0 -161
- data/app/frontend/pages/outgoing_requests/index.tsx +0 -309
- data/app/frontend/pages/overview/show.tsx +0 -333
- data/app/frontend/pages/people/index.tsx +0 -102
- data/app/frontend/pages/people/show.tsx +0 -149
- data/app/frontend/pages/processes/index.tsx +0 -335
- data/app/frontend/pages/profiles/index.tsx +0 -110
- data/app/frontend/pages/profiles/show.tsx +0 -105
- data/app/frontend/pages/queries/index.tsx +0 -492
- data/app/frontend/pages/queries/show.tsx +0 -276
- data/app/frontend/pages/releases/index.tsx +0 -190
- data/app/frontend/pages/releases/release-health.tsx +0 -68
- data/app/frontend/pages/releases/release-path.ts +0 -25
- data/app/frontend/pages/releases/show.tsx +0 -262
- data/app/frontend/pages/requests/index.tsx +0 -235
- data/app/frontend/pages/requests/route.tsx +0 -159
- data/app/frontend/pages/scheduled_tasks/index.tsx +0 -220
- data/app/frontend/pages/spans/index.tsx +0 -229
- data/app/frontend/pages/spans/show.tsx +0 -220
- data/app/frontend/pages/storage_ops/index.tsx +0 -150
- data/app/frontend/pages/tenants/index.tsx +0 -236
- data/app/frontend/pages/tenants/show.tsx +0 -477
- data/app/frontend/pages/tenants/tenant-path.ts +0 -26
- data/app/frontend/pages/thresholds/index.tsx +0 -414
- data/app/frontend/pages/traces/show.tsx +0 -208
- data/app/frontend/pages/transactions/index.tsx +0 -220
- data/app/frontend/pages/view_renders/index.tsx +0 -241
- data/app/frontend/pages/visits/index.tsx +0 -321
- data/app/frontend/public/icon.png +0 -0
- data/app/frontend/public/icon.svg +0 -5
- data/app/frontend/routes/index.d.ts +0 -2136
- data/app/frontend/routes/index.js +0 -2112
- data/app/frontend/types/globals.d.ts +0 -9
- data/app/frontend/types/index.ts +0 -288
- data/app/frontend/types/vite-env.d.ts +0 -9
- data/app/helpers/railwatch/assets_helper.rb +0 -52
- data/app/jobs/railwatch/anomaly_scan_job.rb +0 -11
- data/app/jobs/railwatch/application_job.rb +0 -7
- data/app/jobs/railwatch/auto_resolve_issues_job.rb +0 -19
- data/app/jobs/railwatch/check_scheduled_tasks_job.rb +0 -113
- data/app/jobs/railwatch/detect_anomalies_job.rb +0 -171
- data/app/jobs/railwatch/detect_performance_issues_job.rb +0 -95
- data/app/jobs/railwatch/group_exceptions_job.rb +0 -91
- data/app/jobs/railwatch/optimize_telemetry_job.rb +0 -23
- data/app/jobs/railwatch/performance_scan_job.rb +0 -11
- data/app/jobs/railwatch/prune_telemetry_job.rb +0 -129
- data/app/jobs/railwatch/release_health_rollup_job.rb +0 -64
- data/app/jobs/railwatch/rollup_catchup_job.rb +0 -21
- data/app/jobs/railwatch/rollup_job.rb +0 -132
- data/app/jobs/railwatch/scheduled_task_scan_job.rb +0 -11
- data/app/models/concerns/railwatch/detection_snapshotting.rb +0 -20
- data/app/models/railwatch/alert.rb +0 -229
- data/app/models/railwatch/alert_rule.rb +0 -121
- data/app/models/railwatch/anomaly_rule.rb +0 -51
- data/app/models/railwatch/application.rb +0 -44
- data/app/models/railwatch/application_record.rb +0 -33
- data/app/models/railwatch/comment.rb +0 -36
- data/app/models/railwatch/deploy.rb +0 -67
- data/app/models/railwatch/environment.rb +0 -68
- data/app/models/railwatch/execution_presenter.rb +0 -185
- data/app/models/railwatch/filter_query.rb +0 -184
- data/app/models/railwatch/followup_receipt.rb +0 -27
- data/app/models/railwatch/ingest/batch.rb +0 -355
- data/app/models/railwatch/ingest/mapper.rb +0 -585
- data/app/models/railwatch/ingest/payload.rb +0 -96
- data/app/models/railwatch/ingest/rollup_absorber.rb +0 -170
- data/app/models/railwatch/ingest/writer.rb +0 -137
- data/app/models/railwatch/issue.rb +0 -277
- data/app/models/railwatch/issue_activity.rb +0 -23
- data/app/models/railwatch/issue_detection_presenter.rb +0 -309
- data/app/models/railwatch/issue_detection_snapshot.rb +0 -77
- data/app/models/railwatch/maintenance_task.rb +0 -53
- data/app/models/railwatch/saved_view.rb +0 -63
- data/app/models/railwatch/telemetry/aggregations.rb +0 -251
- data/app/models/railwatch/telemetry/attachment.rb +0 -31
- data/app/models/railwatch/telemetry/bounded_gzip.rb +0 -101
- data/app/models/railwatch/telemetry/broadcast.rb +0 -13
- data/app/models/railwatch/telemetry/cache_event.rb +0 -16
- data/app/models/railwatch/telemetry/child.rb +0 -53
- data/app/models/railwatch/telemetry/cursor_page.rb +0 -99
- data/app/models/railwatch/telemetry/deprecation.rb +0 -13
- data/app/models/railwatch/telemetry/enqueued_job.rb +0 -13
- data/app/models/railwatch/telemetry/exception.rb +0 -28
- data/app/models/railwatch/telemetry/execution.rb +0 -152
- data/app/models/railwatch/telemetry/export_delivery.rb +0 -32
- data/app/models/railwatch/telemetry/export_destination.rb +0 -66
- data/app/models/railwatch/telemetry/health_sample.rb +0 -72
- data/app/models/railwatch/telemetry/ingest_batch.rb +0 -31
- data/app/models/railwatch/telemetry/llm_call.rb +0 -37
- data/app/models/railwatch/telemetry/log.rb +0 -91
- data/app/models/railwatch/telemetry/mail.rb +0 -13
- data/app/models/railwatch/telemetry/n_plus_one.rb +0 -92
- data/app/models/railwatch/telemetry/notification.rb +0 -13
- data/app/models/railwatch/telemetry/outgoing_request.rb +0 -13
- data/app/models/railwatch/telemetry/person.rb +0 -50
- data/app/models/railwatch/telemetry/process.rb +0 -10
- data/app/models/railwatch/telemetry/profile.rb +0 -37
- data/app/models/railwatch/telemetry/query.rb +0 -57
- data/app/models/railwatch/telemetry/query_shape.rb +0 -45
- data/app/models/railwatch/telemetry/release_health.rb +0 -69
- data/app/models/railwatch/telemetry/rollup.rb +0 -157
- data/app/models/railwatch/telemetry/session.rb +0 -24
- data/app/models/railwatch/telemetry/span.rb +0 -19
- data/app/models/railwatch/telemetry/storage_op.rb +0 -13
- data/app/models/railwatch/telemetry/tenant.rb +0 -240
- data/app/models/railwatch/telemetry/transaction.rb +0 -13
- data/app/models/railwatch/telemetry/view_render.rb +0 -13
- data/app/models/railwatch/telemetry/visit.rb +0 -24
- data/app/models/railwatch/telemetry_record.rb +0 -107
- data/app/models/railwatch/threshold.rb +0 -66
- data/app/models/railwatch/user.rb +0 -47
- data/app/models/railwatch/viewer.rb +0 -13
- data/app/models/railwatch/window.rb +0 -66
- data/app/views/layouts/railwatch/dashboard.html.erb +0 -25
- data/db/railwatch_migrate/20260916000000_create_railwatch_tables.rb +0 -151
- data/db/railwatch_migrate/20260917000000_create_railwatch_maintenance_tasks.rb +0 -18
- data/db/railwatch_migrate/20260917120000_create_railwatch_followup_receipts.rb +0 -20
- data/db/railwatch_migrate/20260918120000_widen_host_user_ids.rb +0 -71
- data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +0 -62
- data/db/railwatch_telemetry_migrate/20260903000001_create_telemetry.rb +0 -481
- data/db/railwatch_telemetry_migrate/20260903000002_rename_tenant_to_app_tenant.rb +0 -14
- data/db/railwatch_telemetry_migrate/20260903000003_add_statement_count_to_transactions.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000004_add_role_and_channel.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260903000005_add_locals_to_exceptions.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000006_add_spans_health_vitals_and_fts.rb +0 -82
- data/db/railwatch_telemetry_migrate/20260903000007_rename_span_attributes_to_payload.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260903000008_add_profiles_and_attachments.rb +0 -60
- data/db/railwatch_telemetry_migrate/20260903000009_add_truncated_to_attachments.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000010_create_sessions_and_release_health.rb +0 -51
- data/db/railwatch_telemetry_migrate/20260903000011_add_fingerprint_to_exceptions.rb +0 -11
- data/db/railwatch_telemetry_migrate/20260904000012_add_failed_to_broadcasts.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260904010000_add_filter_cursor_indexes.rb +0 -37
- data/db/railwatch_telemetry_migrate/20260904020000_add_n_plus_ones_execution_id_index.rb +0 -11
- data/db/railwatch_telemetry_migrate/20260904120000_create_query_shapes.rb +0 -15
- data/db/railwatch_telemetry_migrate/20260906120000_add_backpressure_factor_to_ingest_batches.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260907000000_rename_lantern_version_on_processes.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260913000000_rename_nightrail_version_on_processes.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260914000000_drop_orphan_durable_ingest_tables.rb +0 -18
- data/db/railwatch_telemetry_migrate/20260914010000_drop_orphan_durable_ingest_columns.rb +0 -25
- data/db/railwatch_telemetry_migrate/20260915000000_create_llm_calls.rb +0 -55
- data/db/railwatch_telemetry_migrate/20260915120000_add_detail_to_llm_calls.rb +0 -21
- data/db/railwatch_telemetry_migrate/20260915200000_add_explained_index_to_queries.rb +0 -16
- data/db/railwatch_telemetry_migrate/20260915210000_add_slowest_index_to_queries.rb +0 -18
- data/db/railwatch_telemetry_migrate/20260917010000_add_batch_ledger_to_ingest_batches.rb +0 -16
- data/db/railwatch_telemetry_migrate/20260919000100_create_export_queue.rb +0 -146
- data/db/railwatch_telemetry_migrate/20260922000000_add_covering_indexes_for_dashboard_aggregates.rb +0 -34
- data/db/railwatch_telemetry_migrate/20260923000000_add_people_index.rb +0 -15
- data/db/railwatch_telemetry_migrate/20260925000000_add_tenant_summary_index.rb +0 -17
- data/db/railwatch_telemetry_migrate/20261008000000_add_in_transaction_to_outgoing_requests.rb +0 -10
- data/docs/embedded.md +0 -503
- data/lib/puma/plugin/railwatch.rb +0 -215
- data/lib/railwatch/dashboard_assets.rb +0 -45
- data/lib/railwatch/embedded.rb +0 -50
- data/lib/railwatch/export/client.rb +0 -124
- data/lib/railwatch/export/lease.rb +0 -56
- data/lib/railwatch/export/outbox.rb +0 -361
- data/lib/railwatch/export/policy.rb +0 -79
- data/lib/railwatch/export/sender.rb +0 -130
- data/lib/railwatch/ingest_request_body_limit.rb +0 -10
- data/lib/railwatch/maintenance.rb +0 -194
- data/lib/railwatch/patches/migration_busy_timeout.rb +0 -73
- data/lib/railwatch/transport/local.rb +0 -78
- data/lib/railwatch/transport/socket.rb +0 -183
- data/lib/railwatch/writer.rb +0 -370
- data/public/railwatch/assets/CommitMono-Bold-D6h61ieg.woff2 +0 -0
- data/public/railwatch/assets/CommitMono-Regular-zr8w7Obm.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Black-auA4GeOK.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Bold-CJLnO8j1.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Medium-Cm2bwKpj.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Regular-Chaq1-PV.woff2 +0 -0
- data/public/railwatch/assets/app-layout-by7G3sa1.js +0 -41
- data/public/railwatch/assets/application-Cc5v_Vk9.css +0 -1
- data/public/railwatch/assets/arrow-up-DCZ7emux.js +0 -1
- data/public/railwatch/assets/braces-CykT5_5u.js +0 -1
- data/public/railwatch/assets/card-C-PPSA0g.js +0 -1
- data/public/railwatch/assets/chart-Cov79YC5.js +0 -39
- data/public/railwatch/assets/chart-hover-DdK4E-2h.js +0 -1
- data/public/railwatch/assets/chart-panel-BPaYRXJB.js +0 -1
- data/public/railwatch/assets/code-BYjC4YZ_.js +0 -1
- data/public/railwatch/assets/copy-id-LPfoj9cC.js +0 -1
- data/public/railwatch/assets/cursor-load-more-DSdhgpGl.js +0 -1
- data/public/railwatch/assets/data-table-CQ_YRWQs.js +0 -1
- data/public/railwatch/assets/env-layout-CdMWbUkm.js +0 -1
- data/public/railwatch/assets/execution-path-7MYt-Qbn.js +0 -1
- data/public/railwatch/assets/filter-bar-CrzpQ_vD.js +0 -1
- data/public/railwatch/assets/flamegraph-BIFEdTAg.js +0 -2
- data/public/railwatch/assets/format-B9SDkrWj.js +0 -1
- data/public/railwatch/assets/frames-C5t-x4f0.js +0 -1
- data/public/railwatch/assets/index--NQ7us-L.js +0 -1
- data/public/railwatch/assets/index-2kgYe_99.js +0 -1
- data/public/railwatch/assets/index-4YEPHxtO.js +0 -1
- data/public/railwatch/assets/index-AOCC1GDJ.js +0 -1
- data/public/railwatch/assets/index-BEo-u0eO.js +0 -1
- data/public/railwatch/assets/index-BJ1V3w2N.js +0 -1
- data/public/railwatch/assets/index-BPoHsBKb.js +0 -1
- data/public/railwatch/assets/index-BZzyGUM3.js +0 -1
- data/public/railwatch/assets/index-BgVq7yKL.js +0 -1
- data/public/railwatch/assets/index-BqFGEZvW.js +0 -1
- data/public/railwatch/assets/index-ByuHJ1CH.js +0 -1
- data/public/railwatch/assets/index-C2j50AL2.js +0 -1
- data/public/railwatch/assets/index-CLEdTkvW.js +0 -1
- data/public/railwatch/assets/index-CWgq8qBu.js +0 -1
- data/public/railwatch/assets/index-CXQ7_oVj.js +0 -2
- data/public/railwatch/assets/index-CmyYrjS2.js +0 -1
- data/public/railwatch/assets/index-Cn9_HjDo.js +0 -1
- data/public/railwatch/assets/index-CsMAm9UK.js +0 -1
- data/public/railwatch/assets/index-D0Kk_oGY.js +0 -1
- data/public/railwatch/assets/index-DC9ZptJh.js +0 -1
- data/public/railwatch/assets/index-DNzg7jmV.js +0 -1
- data/public/railwatch/assets/index-DQ8uJO5f.js +0 -1
- data/public/railwatch/assets/index-Deq14BxB.js +0 -1
- data/public/railwatch/assets/index-IaV3Blzp.js +0 -1
- data/public/railwatch/assets/index-TYNWcJQs.js +0 -1
- data/public/railwatch/assets/index-WonH2fcZ.js +0 -1
- data/public/railwatch/assets/index-WxWUaH_d.js +0 -1
- data/public/railwatch/assets/index-mUNrl4ky.js +0 -1
- data/public/railwatch/assets/inertia-DfNRARuA.js +0 -97
- data/public/railwatch/assets/json-viewer-DMsF5glp.js +0 -1
- data/public/railwatch/assets/klass-CmHYk5rz.js +0 -1
- data/public/railwatch/assets/origin-identity-1R3bqa3R.js +0 -1
- data/public/railwatch/assets/percentile-picker-73z5PAps.js +0 -1
- data/public/railwatch/assets/relative-time-Dsc_cCdX.js +0 -1
- data/public/railwatch/assets/release-health-BV5OaOWd.js +0 -1
- data/public/railwatch/assets/route-CWh58C7K.js +0 -1
- data/public/railwatch/assets/segmented-DB4zh-Am.js +0 -1
- data/public/railwatch/assets/select-DBKjFlOX.js +0 -1
- data/public/railwatch/assets/series-chart-BaiDG795.js +0 -1
- data/public/railwatch/assets/show-B4ICCFGh.js +0 -1
- data/public/railwatch/assets/show-B5lOU9Gv.js +0 -1
- data/public/railwatch/assets/show-BYPB74t4.js +0 -2
- data/public/railwatch/assets/show-C7A0m2M8.js +0 -1
- data/public/railwatch/assets/show-DT5X1zqE.js +0 -1
- data/public/railwatch/assets/show-D_NBdXsn.js +0 -2
- data/public/railwatch/assets/show-DgPCnRg8.js +0 -1
- data/public/railwatch/assets/show-Yl69HF0x.js +0 -1
- data/public/railwatch/assets/show-_QxuUQCm.js +0 -3
- data/public/railwatch/assets/show-g__jnN36.js +0 -1
- data/public/railwatch/assets/show-l4ztfjl9.js +0 -1
- data/public/railwatch/assets/sort-header-BcG8ulEH.js +0 -1
- data/public/railwatch/assets/source-link-B2183i2-.js +0 -1
- data/public/railwatch/assets/sparkline-cell-B47ipscB.js +0 -1
- data/public/railwatch/assets/stat-DT2hhsqS.js +0 -1
- data/public/railwatch/assets/status-badge-CmbRKlY7.js +0 -1
- data/public/railwatch/assets/tenant-path-C4rNGauE.js +0 -1
- data/public/railwatch/assets/use-clipboard-oTNeP4ax.js +0 -1
- data/public/railwatch/assets/use-live-CLZZj245.js +0 -1
- data/public/railwatch/icon.png +0 -0
- data/public/railwatch/icon.svg +0 -5
- data/public/railwatch/manifest.json +0 -1245
- data/public/railwatch/rails-vite.json +0 -1
- /data/{app/frontend/lib → lib/generators/railwatch/install/templates}/railwatch.ts +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Puts the telemetry database into incremental auto-vacuum mode, which is what
|
|
4
|
-
# lets PruneTelemetryJob hand the pages it frees back to the filesystem
|
|
5
|
-
# instead of parking them on the freelist forever. Without it the file only
|
|
6
|
-
# ever grows: deleting a day of telemetry frees pages for SQLite to reuse and
|
|
7
|
-
# returns not one byte to the disk.
|
|
8
|
-
#
|
|
9
|
-
# Why a migration, and why this version number. SQLite only lets a database
|
|
10
|
-
# leave auto_vacuum=none for free while it still holds no pages; after that
|
|
11
|
-
# the only way in is a full VACUUM, which rewrites the entire file with the
|
|
12
|
-
# write lock held. Declaring the pragma in config/database.yml cannot do it
|
|
13
|
-
# either: Rails applies its own DEFAULT_PRAGMAS before any declared ones, and
|
|
14
|
-
# `journal_mode = wal` writes the file header, so by the time
|
|
15
|
-
# `auto_vacuum = incremental` runs the database is no longer new and the
|
|
16
|
-
# statement is a silent no-op (measured: the mode comes out `none`).
|
|
17
|
-
#
|
|
18
|
-
# A migration is the one hook that runs both on a new install's db:prepare and
|
|
19
|
-
# on an existing install's upgrade, and this one is numbered below
|
|
20
|
-
# CreateTelemetry so that on a new database it runs while the file holds
|
|
21
|
-
# nothing but schema_migrations and ar_internal_metadata -- a few kilobytes,
|
|
22
|
-
# where the VACUUM that commits the mode is instant. Rails runs a pending
|
|
23
|
-
# migration whatever its version, so an existing install gets it too; there it
|
|
24
|
-
# does nothing at all, because converting a file that may be tens of gigabytes
|
|
25
|
-
# is not a decision a deploy gets to make. That one is `bin/rails
|
|
26
|
-
# railwatch:vacuum`, run deliberately, which says what it will cost first.
|
|
27
|
-
class EnableIncrementalVacuum < ActiveRecord::Migration[8.1]
|
|
28
|
-
# VACUUM cannot run inside a transaction.
|
|
29
|
-
disable_ddl_transaction!
|
|
30
|
-
|
|
31
|
-
# Rails' own bookkeeping, which is present before the first migration runs
|
|
32
|
-
# and so does not make a database "existing".
|
|
33
|
-
BOOKKEEPING = %w[schema_migrations ar_internal_metadata].freeze
|
|
34
|
-
|
|
35
|
-
def up
|
|
36
|
-
return say("not SQLite (#{connection.adapter_name}); auto_vacuum does not apply") unless sqlite?
|
|
37
|
-
return say("auto_vacuum is already incremental") if mode == "incremental"
|
|
38
|
-
|
|
39
|
-
populated = connection.tables - BOOKKEEPING
|
|
40
|
-
if populated.any?
|
|
41
|
-
return say("#{populated.size} tables already here: left in auto_vacuum=#{mode}. Run " \
|
|
42
|
-
"`bin/rails railwatch:vacuum` to convert this database when you can spare the lock.")
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
connection.execute("PRAGMA auto_vacuum = incremental")
|
|
46
|
-
connection.execute("VACUUM")
|
|
47
|
-
say("auto_vacuum = #{mode}")
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Irreversible in the useful sense: going back to `none` is another whole
|
|
51
|
-
# VACUUM, and nothing about the schema depends on the mode. Rolling back
|
|
52
|
-
# leaves it where it is rather than spending that on an undo nobody asked
|
|
53
|
-
# for.
|
|
54
|
-
def down
|
|
55
|
-
say("auto_vacuum left as #{sqlite? ? mode : connection.adapter_name}; use `PRAGMA auto_vacuum = none; VACUUM;` to undo it by hand")
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
private
|
|
59
|
-
def sqlite? = connection.adapter_name.match?(/sqlite/i)
|
|
60
|
-
|
|
61
|
-
def mode = { 0 => "none", 1 => "full", 2 => "incremental" }[connection.select_value("PRAGMA auto_vacuum").to_i]
|
|
62
|
-
end
|
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# One table per record type, matching the gem's wire types one to one.
|
|
4
|
-
# Every table starts with the shared envelope. JSON columns hold the
|
|
5
|
-
# variable parts; hot filter columns are real columns with indexes.
|
|
6
|
-
class CreateTelemetry < ActiveRecord::Migration[8.1]
|
|
7
|
-
def change
|
|
8
|
-
create_table :executions do |t|
|
|
9
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
10
|
-
# the history never calls a model that has since changed.
|
|
11
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
12
|
-
t.string :deploy, limit: 128
|
|
13
|
-
t.string :server, limit: 255
|
|
14
|
-
t.string :group_hash, limit: 32
|
|
15
|
-
t.string :trace_id, limit: 36
|
|
16
|
-
t.string :execution_source, limit: 20
|
|
17
|
-
t.string :execution_id, limit: 36
|
|
18
|
-
t.string :execution_preview, limit: 255
|
|
19
|
-
t.string :execution_stage, limit: 32
|
|
20
|
-
t.string :user_ref, limit: 255
|
|
21
|
-
t.string :tenant, limit: 255
|
|
22
|
-
t.string :kind, null: false, limit: 20 # request, job_attempt, scheduled_task, command
|
|
23
|
-
t.string :name, null: false, limit: 255 # "GET /widgets/:id", "WidgetJob", "rake db:migrate"
|
|
24
|
-
t.integer :duration, null: false # microseconds
|
|
25
|
-
t.integer :status # http status, or exit code
|
|
26
|
-
t.string :outcome, limit: 20 # processed, failed, aborted
|
|
27
|
-
t.string :method, limit: 10
|
|
28
|
-
t.string :route, limit: 255
|
|
29
|
-
t.string :controller, limit: 255
|
|
30
|
-
t.string :action, limit: 128
|
|
31
|
-
t.string :queue, limit: 128
|
|
32
|
-
t.integer :attempt
|
|
33
|
-
t.integer :queue_latency
|
|
34
|
-
t.string :job_id, limit: 36
|
|
35
|
-
t.string :task_key, limit: 128
|
|
36
|
-
t.string :inertia_component, limit: 255
|
|
37
|
-
t.boolean :inertia_partial, default: false
|
|
38
|
-
t.integer :allocations
|
|
39
|
-
t.bigint :peak_memory
|
|
40
|
-
t.string :exception_preview, limit: 255
|
|
41
|
-
t.json :stages, null: false, default: {}
|
|
42
|
-
t.json :counters, null: false, default: {}
|
|
43
|
-
t.json :detail, null: false, default: {} # headers, payload, url, ip, user agent, context, extras
|
|
44
|
-
end
|
|
45
|
-
add_index :executions, [ :kind, :occurred_at ]
|
|
46
|
-
add_index :executions, [ :group_hash, :occurred_at ]
|
|
47
|
-
add_index :executions, :execution_id, unique: true
|
|
48
|
-
add_index :executions, :trace_id
|
|
49
|
-
add_index :executions, [ :user_ref, :occurred_at ]
|
|
50
|
-
add_index :executions, [ :deploy, :occurred_at ]
|
|
51
|
-
add_index :executions, [ :tenant, :occurred_at ]
|
|
52
|
-
|
|
53
|
-
create_table :queries do |t|
|
|
54
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
55
|
-
# the history never calls a model that has since changed.
|
|
56
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
57
|
-
t.string :deploy, limit: 128
|
|
58
|
-
t.string :server, limit: 255
|
|
59
|
-
t.string :group_hash, limit: 32
|
|
60
|
-
t.string :trace_id, limit: 36
|
|
61
|
-
t.string :execution_source, limit: 20
|
|
62
|
-
t.string :execution_id, limit: 36
|
|
63
|
-
t.string :execution_preview, limit: 255
|
|
64
|
-
t.string :execution_stage, limit: 32
|
|
65
|
-
t.string :user_ref, limit: 255
|
|
66
|
-
t.string :tenant, limit: 255
|
|
67
|
-
t.text :sql, null: false
|
|
68
|
-
t.string :name, limit: 255
|
|
69
|
-
t.integer :duration, null: false
|
|
70
|
-
t.string :connection, limit: 64
|
|
71
|
-
t.string :adapter, limit: 32
|
|
72
|
-
t.boolean :async, default: false
|
|
73
|
-
t.boolean :in_transaction, default: false
|
|
74
|
-
t.integer :row_count
|
|
75
|
-
t.string :source, limit: 255
|
|
76
|
-
t.integer :allocations
|
|
77
|
-
end
|
|
78
|
-
add_index :queries, [ :group_hash, :occurred_at ]
|
|
79
|
-
add_index :queries, [ :execution_id, :occurred_at ]
|
|
80
|
-
add_index :queries, [ :occurred_at, :duration ]
|
|
81
|
-
|
|
82
|
-
create_table :exceptions do |t|
|
|
83
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
84
|
-
# the history never calls a model that has since changed.
|
|
85
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
86
|
-
t.string :deploy, limit: 128
|
|
87
|
-
t.string :server, limit: 255
|
|
88
|
-
t.string :group_hash, limit: 32
|
|
89
|
-
t.string :trace_id, limit: 36
|
|
90
|
-
t.string :execution_source, limit: 20
|
|
91
|
-
t.string :execution_id, limit: 36
|
|
92
|
-
t.string :execution_preview, limit: 255
|
|
93
|
-
t.string :execution_stage, limit: 32
|
|
94
|
-
t.string :user_ref, limit: 255
|
|
95
|
-
t.string :tenant, limit: 255
|
|
96
|
-
t.string :class_name, null: false, limit: 255
|
|
97
|
-
t.text :message, null: false
|
|
98
|
-
t.boolean :handled, null: false, default: false
|
|
99
|
-
t.string :severity, limit: 16
|
|
100
|
-
t.string :source, limit: 128
|
|
101
|
-
t.string :file, limit: 255
|
|
102
|
-
t.integer :line
|
|
103
|
-
t.json :frames, null: false, default: []
|
|
104
|
-
t.json :cause
|
|
105
|
-
t.text :context
|
|
106
|
-
t.string :ruby_version, limit: 16
|
|
107
|
-
t.string :rails_version, limit: 16
|
|
108
|
-
end
|
|
109
|
-
add_index :exceptions, [ :group_hash, :occurred_at ]
|
|
110
|
-
add_index :exceptions, [ :execution_id ]
|
|
111
|
-
add_index :exceptions, [ :occurred_at ]
|
|
112
|
-
|
|
113
|
-
create_table :cache_events do |t|
|
|
114
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
115
|
-
# the history never calls a model that has since changed.
|
|
116
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
117
|
-
t.string :deploy, limit: 128
|
|
118
|
-
t.string :server, limit: 255
|
|
119
|
-
t.string :group_hash, limit: 32
|
|
120
|
-
t.string :trace_id, limit: 36
|
|
121
|
-
t.string :execution_source, limit: 20
|
|
122
|
-
t.string :execution_id, limit: 36
|
|
123
|
-
t.string :execution_preview, limit: 255
|
|
124
|
-
t.string :execution_stage, limit: 32
|
|
125
|
-
t.string :user_ref, limit: 255
|
|
126
|
-
t.string :tenant, limit: 255
|
|
127
|
-
t.string :store, limit: 64
|
|
128
|
-
t.string :key, limit: 255
|
|
129
|
-
t.string :type, null: false, limit: 20
|
|
130
|
-
t.integer :duration, null: false
|
|
131
|
-
t.integer :ttl
|
|
132
|
-
t.integer :hits
|
|
133
|
-
end
|
|
134
|
-
add_index :cache_events, [ :group_hash, :occurred_at ]
|
|
135
|
-
add_index :cache_events, [ :execution_id ]
|
|
136
|
-
|
|
137
|
-
create_table :mails do |t|
|
|
138
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
139
|
-
# the history never calls a model that has since changed.
|
|
140
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
141
|
-
t.string :deploy, limit: 128
|
|
142
|
-
t.string :server, limit: 255
|
|
143
|
-
t.string :group_hash, limit: 32
|
|
144
|
-
t.string :trace_id, limit: 36
|
|
145
|
-
t.string :execution_source, limit: 20
|
|
146
|
-
t.string :execution_id, limit: 36
|
|
147
|
-
t.string :execution_preview, limit: 255
|
|
148
|
-
t.string :execution_stage, limit: 32
|
|
149
|
-
t.string :user_ref, limit: 255
|
|
150
|
-
t.string :tenant, limit: 255
|
|
151
|
-
t.string :mailer, null: false, limit: 255
|
|
152
|
-
t.string :subject, limit: 255
|
|
153
|
-
t.integer :to, default: 0
|
|
154
|
-
t.integer :cc, default: 0
|
|
155
|
-
t.integer :bcc, default: 0
|
|
156
|
-
t.integer :attachments, default: 0
|
|
157
|
-
t.string :delivery_method, limit: 64
|
|
158
|
-
t.boolean :perform_deliveries, default: true
|
|
159
|
-
t.integer :duration, null: false
|
|
160
|
-
t.boolean :failed, default: false
|
|
161
|
-
t.string :message_id, limit: 255
|
|
162
|
-
end
|
|
163
|
-
add_index :mails, [ :group_hash, :occurred_at ]
|
|
164
|
-
add_index :mails, [ :execution_id ]
|
|
165
|
-
|
|
166
|
-
create_table :broadcasts do |t|
|
|
167
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
168
|
-
# the history never calls a model that has since changed.
|
|
169
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
170
|
-
t.string :deploy, limit: 128
|
|
171
|
-
t.string :server, limit: 255
|
|
172
|
-
t.string :group_hash, limit: 32
|
|
173
|
-
t.string :trace_id, limit: 36
|
|
174
|
-
t.string :execution_source, limit: 20
|
|
175
|
-
t.string :execution_id, limit: 36
|
|
176
|
-
t.string :execution_preview, limit: 255
|
|
177
|
-
t.string :execution_stage, limit: 32
|
|
178
|
-
t.string :user_ref, limit: 255
|
|
179
|
-
t.string :tenant, limit: 255
|
|
180
|
-
t.string :kind, null: false, limit: 20
|
|
181
|
-
t.string :stream, limit: 255
|
|
182
|
-
t.string :channel, limit: 255
|
|
183
|
-
t.string :action, limit: 128
|
|
184
|
-
t.integer :bytes
|
|
185
|
-
t.integer :duration, null: false
|
|
186
|
-
end
|
|
187
|
-
add_index :broadcasts, [ :group_hash, :occurred_at ]
|
|
188
|
-
add_index :broadcasts, [ :execution_id ]
|
|
189
|
-
|
|
190
|
-
create_table :notifications do |t|
|
|
191
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
192
|
-
# the history never calls a model that has since changed.
|
|
193
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
194
|
-
t.string :deploy, limit: 128
|
|
195
|
-
t.string :server, limit: 255
|
|
196
|
-
t.string :group_hash, limit: 32
|
|
197
|
-
t.string :trace_id, limit: 36
|
|
198
|
-
t.string :execution_source, limit: 20
|
|
199
|
-
t.string :execution_id, limit: 36
|
|
200
|
-
t.string :execution_preview, limit: 255
|
|
201
|
-
t.string :execution_stage, limit: 32
|
|
202
|
-
t.string :user_ref, limit: 255
|
|
203
|
-
t.string :tenant, limit: 255
|
|
204
|
-
t.string :notifier, limit: 255
|
|
205
|
-
t.string :delivery_method, limit: 128
|
|
206
|
-
t.integer :duration, null: false
|
|
207
|
-
t.boolean :failed, default: false
|
|
208
|
-
end
|
|
209
|
-
add_index :notifications, [ :group_hash, :occurred_at ]
|
|
210
|
-
|
|
211
|
-
create_table :outgoing_requests do |t|
|
|
212
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
213
|
-
# the history never calls a model that has since changed.
|
|
214
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
215
|
-
t.string :deploy, limit: 128
|
|
216
|
-
t.string :server, limit: 255
|
|
217
|
-
t.string :group_hash, limit: 32
|
|
218
|
-
t.string :trace_id, limit: 36
|
|
219
|
-
t.string :execution_source, limit: 20
|
|
220
|
-
t.string :execution_id, limit: 36
|
|
221
|
-
t.string :execution_preview, limit: 255
|
|
222
|
-
t.string :execution_stage, limit: 32
|
|
223
|
-
t.string :user_ref, limit: 255
|
|
224
|
-
t.string :tenant, limit: 255
|
|
225
|
-
t.string :host, null: false, limit: 255
|
|
226
|
-
t.string :method, null: false, limit: 10
|
|
227
|
-
t.string :url, limit: 2048
|
|
228
|
-
t.integer :duration, null: false
|
|
229
|
-
t.integer :status_code
|
|
230
|
-
t.integer :request_size
|
|
231
|
-
t.integer :response_size
|
|
232
|
-
t.string :error, limit: 255
|
|
233
|
-
t.string :source, limit: 255
|
|
234
|
-
end
|
|
235
|
-
add_index :outgoing_requests, [ :group_hash, :occurred_at ]
|
|
236
|
-
add_index :outgoing_requests, [ :execution_id ]
|
|
237
|
-
|
|
238
|
-
create_table :storage_ops do |t|
|
|
239
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
240
|
-
# the history never calls a model that has since changed.
|
|
241
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
242
|
-
t.string :deploy, limit: 128
|
|
243
|
-
t.string :server, limit: 255
|
|
244
|
-
t.string :group_hash, limit: 32
|
|
245
|
-
t.string :trace_id, limit: 36
|
|
246
|
-
t.string :execution_source, limit: 20
|
|
247
|
-
t.string :execution_id, limit: 36
|
|
248
|
-
t.string :execution_preview, limit: 255
|
|
249
|
-
t.string :execution_stage, limit: 32
|
|
250
|
-
t.string :user_ref, limit: 255
|
|
251
|
-
t.string :tenant, limit: 255
|
|
252
|
-
t.string :service, limit: 64
|
|
253
|
-
t.string :op, null: false, limit: 32
|
|
254
|
-
t.string :key, limit: 255
|
|
255
|
-
t.integer :duration, null: false
|
|
256
|
-
end
|
|
257
|
-
add_index :storage_ops, [ :group_hash, :occurred_at ]
|
|
258
|
-
|
|
259
|
-
create_table :view_renders do |t|
|
|
260
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
261
|
-
# the history never calls a model that has since changed.
|
|
262
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
263
|
-
t.string :deploy, limit: 128
|
|
264
|
-
t.string :server, limit: 255
|
|
265
|
-
t.string :group_hash, limit: 32
|
|
266
|
-
t.string :trace_id, limit: 36
|
|
267
|
-
t.string :execution_source, limit: 20
|
|
268
|
-
t.string :execution_id, limit: 36
|
|
269
|
-
t.string :execution_preview, limit: 255
|
|
270
|
-
t.string :execution_stage, limit: 32
|
|
271
|
-
t.string :user_ref, limit: 255
|
|
272
|
-
t.string :tenant, limit: 255
|
|
273
|
-
t.string :identifier, null: false, limit: 255
|
|
274
|
-
t.string :kind, limit: 20
|
|
275
|
-
t.string :layout, limit: 255
|
|
276
|
-
t.integer :count
|
|
277
|
-
t.integer :cache_hits
|
|
278
|
-
t.integer :duration, null: false
|
|
279
|
-
end
|
|
280
|
-
add_index :view_renders, [ :group_hash, :occurred_at ]
|
|
281
|
-
add_index :view_renders, [ :execution_id ]
|
|
282
|
-
|
|
283
|
-
create_table :logs do |t|
|
|
284
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
285
|
-
# the history never calls a model that has since changed.
|
|
286
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
287
|
-
t.string :deploy, limit: 128
|
|
288
|
-
t.string :server, limit: 255
|
|
289
|
-
t.string :group_hash, limit: 32
|
|
290
|
-
t.string :trace_id, limit: 36
|
|
291
|
-
t.string :execution_source, limit: 20
|
|
292
|
-
t.string :execution_id, limit: 36
|
|
293
|
-
t.string :execution_preview, limit: 255
|
|
294
|
-
t.string :execution_stage, limit: 32
|
|
295
|
-
t.string :user_ref, limit: 255
|
|
296
|
-
t.string :tenant, limit: 255
|
|
297
|
-
t.string :level, null: false, limit: 10
|
|
298
|
-
t.text :message, null: false
|
|
299
|
-
t.json :tags, null: false, default: []
|
|
300
|
-
t.text :context
|
|
301
|
-
t.string :source, limit: 255
|
|
302
|
-
end
|
|
303
|
-
add_index :logs, [ :level, :occurred_at ]
|
|
304
|
-
add_index :logs, [ :execution_id ]
|
|
305
|
-
add_index :logs, [ :occurred_at ]
|
|
306
|
-
|
|
307
|
-
create_table :enqueued_jobs do |t|
|
|
308
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
309
|
-
# the history never calls a model that has since changed.
|
|
310
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
311
|
-
t.string :deploy, limit: 128
|
|
312
|
-
t.string :server, limit: 255
|
|
313
|
-
t.string :group_hash, limit: 32
|
|
314
|
-
t.string :trace_id, limit: 36
|
|
315
|
-
t.string :execution_source, limit: 20
|
|
316
|
-
t.string :execution_id, limit: 36
|
|
317
|
-
t.string :execution_preview, limit: 255
|
|
318
|
-
t.string :execution_stage, limit: 32
|
|
319
|
-
t.string :user_ref, limit: 255
|
|
320
|
-
t.string :tenant, limit: 255
|
|
321
|
-
t.string :job_id, limit: 36
|
|
322
|
-
t.string :name, null: false, limit: 255
|
|
323
|
-
t.string :queue, limit: 128
|
|
324
|
-
t.string :adapter, limit: 64
|
|
325
|
-
t.integer :priority
|
|
326
|
-
t.datetime :scheduled_at, precision: 6
|
|
327
|
-
t.integer :duration, null: false
|
|
328
|
-
t.boolean :failed, default: false
|
|
329
|
-
end
|
|
330
|
-
add_index :enqueued_jobs, [ :group_hash, :occurred_at ]
|
|
331
|
-
add_index :enqueued_jobs, [ :execution_id ]
|
|
332
|
-
add_index :enqueued_jobs, :job_id
|
|
333
|
-
|
|
334
|
-
create_table :transactions do |t|
|
|
335
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
336
|
-
# the history never calls a model that has since changed.
|
|
337
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
338
|
-
t.string :deploy, limit: 128
|
|
339
|
-
t.string :server, limit: 255
|
|
340
|
-
t.string :group_hash, limit: 32
|
|
341
|
-
t.string :trace_id, limit: 36
|
|
342
|
-
t.string :execution_source, limit: 20
|
|
343
|
-
t.string :execution_id, limit: 36
|
|
344
|
-
t.string :execution_preview, limit: 255
|
|
345
|
-
t.string :execution_stage, limit: 32
|
|
346
|
-
t.string :user_ref, limit: 255
|
|
347
|
-
t.string :tenant, limit: 255
|
|
348
|
-
t.integer :duration, null: false
|
|
349
|
-
t.string :outcome, limit: 20
|
|
350
|
-
t.string :connection, limit: 64
|
|
351
|
-
end
|
|
352
|
-
add_index :transactions, [ :execution_id ]
|
|
353
|
-
|
|
354
|
-
create_table :n_plus_ones do |t|
|
|
355
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
356
|
-
# the history never calls a model that has since changed.
|
|
357
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
358
|
-
t.string :deploy, limit: 128
|
|
359
|
-
t.string :server, limit: 255
|
|
360
|
-
t.string :group_hash, limit: 32
|
|
361
|
-
t.string :trace_id, limit: 36
|
|
362
|
-
t.string :execution_source, limit: 20
|
|
363
|
-
t.string :execution_id, limit: 36
|
|
364
|
-
t.string :execution_preview, limit: 255
|
|
365
|
-
t.string :execution_stage, limit: 32
|
|
366
|
-
t.string :user_ref, limit: 255
|
|
367
|
-
t.string :tenant, limit: 255
|
|
368
|
-
t.text :sql, null: false
|
|
369
|
-
t.integer :count, null: false
|
|
370
|
-
t.string :source, limit: 255
|
|
371
|
-
end
|
|
372
|
-
add_index :n_plus_ones, [ :group_hash, :occurred_at ]
|
|
373
|
-
|
|
374
|
-
create_table :deprecations do |t|
|
|
375
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
376
|
-
# the history never calls a model that has since changed.
|
|
377
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
378
|
-
t.string :deploy, limit: 128
|
|
379
|
-
t.string :server, limit: 255
|
|
380
|
-
t.string :group_hash, limit: 32
|
|
381
|
-
t.string :trace_id, limit: 36
|
|
382
|
-
t.string :execution_source, limit: 20
|
|
383
|
-
t.string :execution_id, limit: 36
|
|
384
|
-
t.string :execution_preview, limit: 255
|
|
385
|
-
t.string :execution_stage, limit: 32
|
|
386
|
-
t.string :user_ref, limit: 255
|
|
387
|
-
t.string :tenant, limit: 255
|
|
388
|
-
t.text :message, null: false
|
|
389
|
-
t.string :gem_name, limit: 128
|
|
390
|
-
t.string :horizon, limit: 32
|
|
391
|
-
t.string :source, limit: 255
|
|
392
|
-
end
|
|
393
|
-
add_index :deprecations, [ :group_hash, :occurred_at ]
|
|
394
|
-
|
|
395
|
-
create_table :visits do |t|
|
|
396
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
397
|
-
# the history never calls a model that has since changed.
|
|
398
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
399
|
-
t.string :deploy, limit: 128
|
|
400
|
-
t.string :server, limit: 255
|
|
401
|
-
t.string :group_hash, limit: 32
|
|
402
|
-
t.string :trace_id, limit: 36
|
|
403
|
-
t.string :execution_source, limit: 20
|
|
404
|
-
t.string :execution_id, limit: 36
|
|
405
|
-
t.string :execution_preview, limit: 255
|
|
406
|
-
t.string :execution_stage, limit: 32
|
|
407
|
-
t.string :user_ref, limit: 255
|
|
408
|
-
t.string :tenant, limit: 255
|
|
409
|
-
t.string :component, limit: 255
|
|
410
|
-
t.string :url, limit: 2048
|
|
411
|
-
t.string :method, limit: 10
|
|
412
|
-
t.integer :duration, null: false
|
|
413
|
-
t.string :status, limit: 20
|
|
414
|
-
t.boolean :partial, default: false
|
|
415
|
-
t.json :only, null: false, default: []
|
|
416
|
-
t.integer :props_bytes
|
|
417
|
-
t.string :user_agent, limit: 255
|
|
418
|
-
end
|
|
419
|
-
add_index :visits, [ :group_hash, :occurred_at ]
|
|
420
|
-
|
|
421
|
-
create_table :people do |t|
|
|
422
|
-
t.string :ref, null: false, limit: 255 # tenant:id or id
|
|
423
|
-
t.string :name, limit: 255
|
|
424
|
-
t.string :email, limit: 255
|
|
425
|
-
t.string :tenant, limit: 255
|
|
426
|
-
t.datetime :first_seen_at, precision: 6
|
|
427
|
-
t.datetime :last_seen_at, precision: 6
|
|
428
|
-
t.integer :requests_count, null: false, default: 0
|
|
429
|
-
t.integer :exceptions_count, null: false, default: 0
|
|
430
|
-
end
|
|
431
|
-
add_index :people, :ref, unique: true
|
|
432
|
-
add_index :people, :last_seen_at
|
|
433
|
-
|
|
434
|
-
create_table :processes do |t|
|
|
435
|
-
t.datetime :booted_at, null: false, precision: 6
|
|
436
|
-
t.integer :pid
|
|
437
|
-
t.string :role, limit: 20
|
|
438
|
-
t.string :server, limit: 255
|
|
439
|
-
t.string :deploy, limit: 128
|
|
440
|
-
t.string :ruby_version, limit: 16
|
|
441
|
-
t.string :rails_version, limit: 16
|
|
442
|
-
t.string :lantern_version, limit: 16
|
|
443
|
-
t.float :boot_seconds
|
|
444
|
-
t.json :detail, null: false, default: {}
|
|
445
|
-
end
|
|
446
|
-
add_index :processes, :booted_at
|
|
447
|
-
|
|
448
|
-
# Hourly aggregates per record type and group. Percentiles come from a
|
|
449
|
-
# t-digest blob so they merge across hours without the raw rows.
|
|
450
|
-
create_table :rollups do |t|
|
|
451
|
-
t.datetime :bucket, null: false # start of the hour, UTC
|
|
452
|
-
t.string :record_type, null: false, limit: 32 # request, job_attempt, query, ...
|
|
453
|
-
t.string :group_hash, null: false, limit: 32
|
|
454
|
-
t.string :name, null: false, limit: 255
|
|
455
|
-
t.bigint :count, null: false, default: 0
|
|
456
|
-
t.bigint :error_count, null: false, default: 0 # 5xx, failed, exceptions
|
|
457
|
-
t.bigint :client_error_count, null: false, default: 0
|
|
458
|
-
t.bigint :duration_sum, null: false, default: 0
|
|
459
|
-
t.integer :duration_max, null: false, default: 0
|
|
460
|
-
t.integer :p50, null: false, default: 0
|
|
461
|
-
t.integer :p95, null: false, default: 0
|
|
462
|
-
t.integer :p99, null: false, default: 0
|
|
463
|
-
t.binary :digest
|
|
464
|
-
t.json :extra, null: false, default: {}
|
|
465
|
-
end
|
|
466
|
-
add_index :rollups, [ :record_type, :group_hash, :bucket ], unique: true
|
|
467
|
-
add_index :rollups, [ :record_type, :bucket ]
|
|
468
|
-
|
|
469
|
-
create_table :ingest_batches do |t|
|
|
470
|
-
t.datetime :received_at, null: false, precision: 6
|
|
471
|
-
t.integer :accepted, null: false, default: 0
|
|
472
|
-
t.integer :rejected, null: false, default: 0
|
|
473
|
-
t.integer :dropped_by_client, null: false, default: 0
|
|
474
|
-
t.integer :bytes, null: false, default: 0
|
|
475
|
-
t.string :gem_version, limit: 16
|
|
476
|
-
t.json :counts_by_type, null: false, default: {}
|
|
477
|
-
t.json :rejections, null: false, default: []
|
|
478
|
-
end
|
|
479
|
-
add_index :ingest_batches, :received_at
|
|
480
|
-
end
|
|
481
|
-
end
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# activerecord-tenanted defines `#tenant` on every tenanted model (the DB the
|
|
4
|
-
# row lives in), which shadowed the wire record's own tenant column. The
|
|
5
|
-
# monitored app's tenant is a different thing, so it gets its own name.
|
|
6
|
-
class RenameTenantToAppTenant < ActiveRecord::Migration[8.1]
|
|
7
|
-
TABLES = %i[executions queries exceptions cache_events mails broadcasts notifications outgoing_requests
|
|
8
|
-
storage_ops view_renders logs enqueued_jobs transactions n_plus_ones deprecations visits].freeze
|
|
9
|
-
|
|
10
|
-
def change
|
|
11
|
-
TABLES.each { |t| rename_column t, :tenant, :app_tenant }
|
|
12
|
-
rename_column :people, :tenant, :app_tenant
|
|
13
|
-
end
|
|
14
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# The gem reports how many statements ran inside each transaction; the
|
|
4
|
-
# ingest mapper dropped it because the column never existed.
|
|
5
|
-
class AddStatementCountToTransactions < ActiveRecord::Migration[8.1]
|
|
6
|
-
def change
|
|
7
|
-
add_column :transactions, :statement_count, :integer
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Nightwatch parity: a query's multi-DB role (writing/reading) and a
|
|
4
|
-
# notification's channel (email/slack/...) alongside the delivery class.
|
|
5
|
-
class AddRoleAndChannel < ActiveRecord::Migration[8.1]
|
|
6
|
-
def change
|
|
7
|
-
add_column :queries, :role, :string, limit: 16
|
|
8
|
-
add_column :notifications, :channel, :string, limit: 64
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Redacted local variables at the raise site, when the gem is configured to
|
|
4
|
-
# capture them (NIGHTRAIL_CAPTURE_EXCEPTION_LOCALS).
|
|
5
|
-
class AddLocalsToExceptions < ActiveRecord::Migration[8.1]
|
|
6
|
-
def change
|
|
7
|
-
add_column :exceptions, :locals, :json
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Tier 1-3 telemetry: custom spans, process health samples, request queue
|
|
4
|
-
# time, web vitals on visits, and an FTS5 index over log messages.
|
|
5
|
-
class AddSpansHealthVitalsAndFts < ActiveRecord::Migration[8.1]
|
|
6
|
-
def up
|
|
7
|
-
create_table :spans do |t|
|
|
8
|
-
# The record envelope as it was when this migration shipped; inlined so
|
|
9
|
-
# the history never calls a model that has since changed.
|
|
10
|
-
t.datetime :occurred_at, null: false, precision: 6
|
|
11
|
-
t.string :deploy, limit: 128
|
|
12
|
-
t.string :server, limit: 255
|
|
13
|
-
t.string :group_hash, limit: 32
|
|
14
|
-
t.string :trace_id, limit: 36
|
|
15
|
-
t.string :execution_source, limit: 20
|
|
16
|
-
t.string :execution_id, limit: 36
|
|
17
|
-
t.string :execution_preview, limit: 255
|
|
18
|
-
t.string :execution_stage, limit: 32
|
|
19
|
-
t.string :user_ref, limit: 255
|
|
20
|
-
t.string :app_tenant, limit: 255
|
|
21
|
-
t.string :name, null: false, limit: 255
|
|
22
|
-
t.integer :duration, null: false # microseconds
|
|
23
|
-
t.json :attributes, null: false, default: {}
|
|
24
|
-
t.string :status, limit: 20 # ok, failed
|
|
25
|
-
end
|
|
26
|
-
add_index :spans, [ :group_hash, :occurred_at ]
|
|
27
|
-
add_index :spans, [ :execution_id, :occurred_at ]
|
|
28
|
-
|
|
29
|
-
# Periodic Puma / Solid Queue samples, one row per process per interval.
|
|
30
|
-
create_table :health_samples do |t|
|
|
31
|
-
t.datetime :sampled_at, null: false, precision: 6
|
|
32
|
-
t.integer :pid
|
|
33
|
-
t.string :role, limit: 20
|
|
34
|
-
t.string :server, limit: 255
|
|
35
|
-
t.string :deploy, limit: 128
|
|
36
|
-
t.integer :threads_max
|
|
37
|
-
t.integer :threads_busy
|
|
38
|
-
t.integer :backlog
|
|
39
|
-
t.integer :pool_size
|
|
40
|
-
t.integer :pool_busy
|
|
41
|
-
t.integer :pool_waiting
|
|
42
|
-
t.integer :queue_depth
|
|
43
|
-
t.integer :queue_latency # microseconds, oldest ready job
|
|
44
|
-
t.bigint :memory
|
|
45
|
-
t.json :detail, null: false, default: {}
|
|
46
|
-
end
|
|
47
|
-
add_index :health_samples, [ :server, :sampled_at ]
|
|
48
|
-
add_index :health_samples, :sampled_at
|
|
49
|
-
|
|
50
|
-
add_column :executions, :queue_time, :integer # microseconds, from X-Request-Start
|
|
51
|
-
add_column :executions, :parent_id, :string, limit: 36
|
|
52
|
-
add_index :executions, :parent_id
|
|
53
|
-
|
|
54
|
-
add_column :visits, :lcp, :integer # milliseconds
|
|
55
|
-
add_column :visits, :cls, :float
|
|
56
|
-
add_column :visits, :inp, :integer # milliseconds
|
|
57
|
-
add_column :visits, :ttfb, :integer # milliseconds
|
|
58
|
-
|
|
59
|
-
add_column :queries, :explain, :text # captured plan for slow queries (opt-in)
|
|
60
|
-
|
|
61
|
-
# External-content FTS5 index over log messages. Kept in sync explicitly
|
|
62
|
-
# by Ingest::Writer (insert) and PruneTelemetryJob (rebuild) rather than
|
|
63
|
-
# by triggers: the schema dumper carries create_virtual_table but not
|
|
64
|
-
# triggers, so a tenant created from telemetry_schema.rb would silently
|
|
65
|
-
# lose them.
|
|
66
|
-
execute "CREATE VIRTUAL TABLE logs_fts USING fts5(message, content='logs', content_rowid='id')"
|
|
67
|
-
execute "INSERT INTO logs_fts(rowid, message) SELECT id, message FROM logs"
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def down
|
|
71
|
-
execute "DROP TABLE IF EXISTS logs_fts"
|
|
72
|
-
remove_column :queries, :explain
|
|
73
|
-
remove_column :visits, :lcp
|
|
74
|
-
remove_column :visits, :cls
|
|
75
|
-
remove_column :visits, :inp
|
|
76
|
-
remove_column :visits, :ttfb
|
|
77
|
-
remove_column :executions, :queue_time
|
|
78
|
-
remove_column :executions, :parent_id
|
|
79
|
-
drop_table :health_samples
|
|
80
|
-
drop_table :spans
|
|
81
|
-
end
|
|
82
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# `attributes` is Active Record's own method; a column by that name raises
|
|
4
|
-
# DangerousAttributeError on first access. The wire key stays "attributes",
|
|
5
|
-
# Ingest::Mapper writes it to payload.
|
|
6
|
-
class RenameSpanAttributesToPayload < ActiveRecord::Migration[8.1]
|
|
7
|
-
def change
|
|
8
|
-
rename_column :spans, :attributes, :payload
|
|
9
|
-
end
|
|
10
|
-
end
|