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
data/docs/replacing-sentry.md
CHANGED
|
@@ -8,10 +8,9 @@ depends on a conditional row.
|
|
|
8
8
|
|
|
9
9
|
Install Railwatch first ([`getting-started.md`](getting-started.md)); you
|
|
10
10
|
can run both for a day if you want to compare, since neither knows about
|
|
11
|
-
the other. The
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from embedded.
|
|
11
|
+
the other. The token steps below apply to Railwatch Cloud and to a
|
|
12
|
+
self-hosted railwatch-rs; with the `railwatch-server` gem the token is
|
|
13
|
+
set for you.
|
|
15
14
|
|
|
16
15
|
## Decide whether Railwatch covers your workload
|
|
17
16
|
|
|
@@ -33,7 +32,7 @@ Railwatch does not claim those broader capabilities.
|
|
|
33
32
|
| Ruby profiling | Conditional | Requires `vernier` or `stackprof`; there is no profiler bundled into the SDK. |
|
|
34
33
|
| Browser monitoring | Partial | The optional Inertia client reports visits, Web Vitals, browser errors, and breadcrumbs. Session Replay, native/mobile SDKs, and Sentry's full browser/source-map workflow are outside the currently released Rails-server replacement. |
|
|
35
34
|
| Runtime compatibility | Narrow today | The currently proved pair is Ruby 3.4 + Rails 8.1. A maintained compatibility matrix and any safe lowering of requirements are tracked by [#26](https://github.com/Rebulk/railwatch/issues/26). |
|
|
36
|
-
| Managed integrations and operations | Partial | Railwatch Cloud
|
|
35
|
+
| Managed integrations and operations | Partial | Railwatch Cloud and railwatch-rs deliver alerts to email, Slack, webhooks and Linear. It does not promise Sentry's broader integration catalog. |
|
|
37
36
|
| SQL value privacy | Supported by default | Query records carry normalized SQL shapes without literal values, and Active Record binds are never sent. Raw SQL and query plans are separate opt-ins; either can contain values. |
|
|
38
37
|
|
|
39
38
|
For a Rails 8.1 application whose work enters through Rack and Active Job,
|
|
@@ -73,11 +72,10 @@ deploy config once the app boots without it.
|
|
|
73
72
|
`config/initializers/railwatch.rb` (written by the install generator) is
|
|
74
73
|
where every option from `Sentry.init` lands. The mapping:
|
|
75
74
|
|
|
76
|
-
- **`dsn:`**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
switch: with it blank, Railwatch installs nothing.
|
|
75
|
+
- **`dsn:`** becomes `RAILWATCH_TOKEN`, one token per environment,
|
|
76
|
+
created in Railwatch Cloud or your own server. Self-hosting adds
|
|
77
|
+
`RAILWATCH_INGEST_URL`. The token is also the on/off switch: with it
|
|
78
|
+
blank, Railwatch installs nothing.
|
|
81
79
|
- **`environment:`** becomes `c.environment`, which defaults to
|
|
82
80
|
`Rails.env` — set it only to report under a different name.
|
|
83
81
|
- **`release:`** becomes `c.deploy`, which auto-detects the release from
|
|
@@ -116,9 +114,7 @@ where every option from `Sentry.init` lands. The mapping:
|
|
|
116
114
|
- **Rack `X-Request-Start` queue time** needs no setting: it is parsed
|
|
117
115
|
into `queue_time` on every `request` record.
|
|
118
116
|
|
|
119
|
-
A worked initializer
|
|
120
|
-
block turns into (an embedded install has `c.transport = :local` instead
|
|
121
|
-
of the token):
|
|
117
|
+
A worked initializer, roughly what a `Sentry.init` block turns into:
|
|
122
118
|
|
|
123
119
|
```ruby
|
|
124
120
|
# config/initializers/railwatch.rb
|
|
@@ -424,7 +420,7 @@ startRailwatch({
|
|
|
424
420
|
|---|---|
|
|
425
421
|
| `Sentry.init({ dsn })` | `startRailwatch()`. There is no DSN: the beacon posts to the app's own origin and the *server* decides whether to record it (`c.beacon_enabled`, and whether Railwatch is enabled). The gate you already have on whether `startRailwatch()` runs at all is the only gate. |
|
|
426
422
|
| `release` | Automatic. The record is stamped with `c.deploy`, the same release the server records carry, so a browser issue and a server issue from one deploy line up without a matching pair of settings to get wrong. |
|
|
427
|
-
| `environment` | Automatic — the
|
|
423
|
+
| `environment` | Automatic — the ingest token identifies the environment. |
|
|
428
424
|
| `ignoreErrors` | `startRailwatch({ ignoreErrors })`. Strings match anywhere in the message; regexes are tested against it. Both `ResizeObserver` messages are ignored by default. |
|
|
429
425
|
| `denyUrls` | `startRailwatch({ denyUrls })`, matched against the top stack frame's URL. `/extensions\//i`, `/^chrome:\/\//i`, and `/^moz-extension:\/\//i` are denied by default, **and** any frame from an origin that isn't the app's own is dropped — extensions, injected widgets, tag managers. |
|
|
430
426
|
| `Sentry.setUser` | Server-side. The beacon is a same-origin POST carrying the session cookie, so the server resolves the user the same way it does for a request (`Railwatch.user`) when `Current.user` or Warden is set by middleware; an app that authenticates in a `before_action` gives Railwatch the same lookup with `c.beacon_user { \|request\| ... }`. Nothing the browser sends names the user, so it cannot be forged. |
|
|
@@ -568,10 +564,10 @@ hook matching `rails runner …` previews, or `sentry_runner_noise.rb` under
|
|
|
568
564
|
| Inertia visit timing | Real browser page-visit duration, prop byte size, partial reloads, SSR time, and Core Web Vitals, from a client the generator installs. |
|
|
569
565
|
| Spec matchers as a CI gate | `have_railwatch_queries`, `have_railwatch_n_plus_one`, `have_railwatch_outgoing_requests` fail the pull request that regresses a hot path. |
|
|
570
566
|
| Zero app-DB writes | The gem holds records in memory and ships them from a background thread; a bench gate asserts no `INSERT`/`UPDATE`/`DELETE` ever originates in `lib/railwatch`. This is why it is safe on single-writer SQLite. |
|
|
571
|
-
| A dashboard inside the app | The
|
|
567
|
+
| A dashboard inside the app | The `railwatch-server` gem runs the server next to Puma and serves the whole dashboard at `/railwatch`, with no hosted service at all ([Getting started](getting-started.md#embedded-railwatch-server)). |
|
|
572
568
|
| One SQLite database per environment | Railwatch Cloud stores each monitored environment's telemetry in its own database file, which makes retention pruning, backup, and restore per-environment operations. |
|
|
573
569
|
| LLM calls | RubyLLM calls are recorded with tokens, cost, finish reason, tool calls and workflows, in the request or job that made them ([`records.md`](records.md#llm_call)). |
|
|
574
|
-
| An MCP server |
|
|
570
|
+
| An MCP server | AI assistants can ask what broke after the last deploy, list slow routes, read an execution's timeline, and search logs ([`ai-and-mcp.md`](ai-and-mcp.md)). |
|
|
575
571
|
|
|
576
572
|
## See also
|
|
577
573
|
|
data/docs/security.md
CHANGED
|
@@ -3,25 +3,20 @@
|
|
|
3
3
|
This review covers the open-source gem that runs in a customer's Rails
|
|
4
4
|
application. Railwatch Cloud is a separate service and is outside this review.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
recorded
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
authorizes them. See [Embedded mode](embedded.md#authentication).
|
|
18
|
-
|
|
19
|
-
The writer socket that web workers hand batches to is created with a 0700
|
|
20
|
-
directory and a 0600 socket, so only the app's own user can connect.
|
|
6
|
+
## Dashboard gate (railwatch-server)
|
|
7
|
+
|
|
8
|
+
The gem serves no dashboard. With the separate `railwatch-server` gem
|
|
9
|
+
installed, a dashboard showing every query, log line and exception the app
|
|
10
|
+
recorded is proxied at `/railwatch`, and its gate is this gem's settings.
|
|
11
|
+
HTTP Basic authentication is on by default. With no credentials configured,
|
|
12
|
+
every dashboard request is 401 in every environment except development,
|
|
13
|
+
where it is open. Credentials, once set, apply in development too. An app
|
|
14
|
+
that turns Basic off gates the dashboard with its own `base_controller_class`,
|
|
15
|
+
which railwatch-server's proxy controller inherits from. See
|
|
16
|
+
[Configuration](configuration.md#dashboard-gate-railwatch-server).
|
|
21
17
|
|
|
22
18
|
## Transport
|
|
23
19
|
|
|
24
|
-
This applies to a cloud install and to export from an embedded install.
|
|
25
20
|
`Railwatch::Transport::Http` sends gzip NDJSON with `Net::HTTP`. HTTPS explicitly
|
|
26
21
|
sets OpenSSL's `VERIFY_PEER`; a spec pins that setting. The transport does not
|
|
27
22
|
implement redirect handling, so a redirect response is treated as a permanent
|
|
@@ -52,8 +47,7 @@ configuration and record specs:
|
|
|
52
47
|
filtered. `Locals.inspect_value` rescues an `inspect` implementation that
|
|
53
48
|
raises; this behavior is covered by an exception-record spec.
|
|
54
49
|
- `capture_exception_source` is true. Source lines surrounding in-application
|
|
55
|
-
backtrace frames are recorded
|
|
56
|
-
reports or exports there. Disable it if source context is outside the
|
|
50
|
+
backtrace frames are recorded and sent to the configured server. Disable it if source context is outside the
|
|
57
51
|
application's telemetry policy.
|
|
58
52
|
|
|
59
53
|
Log record messages are sent exactly as supplied to `Rails.logger`. Railwatch
|
|
@@ -107,8 +101,8 @@ application/deployment secret and must not be committed.
|
|
|
107
101
|
application-specific credentials and personal data.
|
|
108
102
|
- Keep secrets out of exception messages, log text, source files, tenant ids,
|
|
109
103
|
user resolvers, and custom context.
|
|
110
|
-
-
|
|
111
|
-
deploying; see [
|
|
104
|
+
- With railwatch-server, set dashboard credentials (or your own gate) before
|
|
105
|
+
deploying; see [Configuration](configuration.md#dashboard-gate-railwatch-server).
|
|
112
106
|
- Use HTTPS in production and keep TLS verification enabled.
|
|
113
107
|
- Put a request-body limit at the reverse proxy when the public beacon is
|
|
114
108
|
enabled, and choose a shared cache if rate limits must span processes.
|
data/docs/self-hosting.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# Self-hosting
|
|
2
2
|
|
|
3
|
-
This page is for sending telemetry to a Railwatch
|
|
4
|
-
yourself
|
|
5
|
-
your app and needs none of it.
|
|
3
|
+
This page is for sending telemetry to a Railwatch server you run
|
|
4
|
+
yourself instead of Railwatch Cloud.
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
same.
|
|
6
|
+
The self-hosted server is [railwatch-rs](https://github.com/Rebulk/railwatch-rs)
|
|
7
|
+
(AGPL-3.0): one static binary on SQLite that serves many apps, with the
|
|
8
|
+
same dashboard, alerts, MCP server and JSON API as Railwatch Cloud. Its
|
|
9
|
+
install, configuration, backups and upgrades are documented in its
|
|
10
|
+
[SELF-HOST.md](https://github.com/Rebulk/railwatch-rs/blob/main/docs/SELF-HOST.md).
|
|
11
|
+
The gem doesn't care which server it talks to — point it at yours and
|
|
12
|
+
everything works the same.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
For a single app, the [`railwatch-server`](https://github.com/Rebulk/railwatch-server)
|
|
15
|
+
gem runs that same server next to Puma and wires this gem to it, with no
|
|
16
|
+
host to set up; see [Getting started](getting-started.md#embedded-railwatch-server).
|
|
17
|
+
The rest of this page is for a server on its own host.
|
|
18
|
+
|
|
19
|
+
## Point the gem at your server
|
|
12
20
|
|
|
13
21
|
```ruby
|
|
14
22
|
# config/initializers/railwatch.rb
|
|
@@ -21,22 +29,22 @@ end
|
|
|
21
29
|
`ingest_url` defaults to `https://railwatch.rebulk.com`, so this is the one
|
|
22
30
|
setting a self-hosted install always needs; everything the gem sends —
|
|
23
31
|
records, ping, deploys — hangs off that host. Pass `--url=` to the
|
|
24
|
-
installer to have it written for you
|
|
32
|
+
installer to have it written for you:
|
|
25
33
|
|
|
26
34
|
```sh
|
|
27
35
|
bin/rails generate railwatch:install --url=https://telemetry.example.com
|
|
28
36
|
```
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
`
|
|
32
|
-
[export](embedded.md#three-ways-to-run-it) instead.
|
|
38
|
+
The railwatch-rs installer prints both values (`RAILWATCH_INGEST_URL`,
|
|
39
|
+
`RAILWATCH_TOKEN`) when it finishes.
|
|
33
40
|
|
|
34
41
|
## Getting a token
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
token
|
|
39
|
-
is
|
|
43
|
+
railwatch-rs prints the first environment's token once, at the end of
|
|
44
|
+
its install. Each further environment (`production`, `staging` — one
|
|
45
|
+
token each) gets its own, created from the dashboard or with
|
|
46
|
+
`sudo railwatch env create <name>`. A token is shown once; a lost one is
|
|
47
|
+
replaced, not recovered.
|
|
40
48
|
|
|
41
49
|
```sh
|
|
42
50
|
bin/rails railwatch:token # prints the URL to create/copy a token
|
|
@@ -55,14 +63,8 @@ so it works as a post-deploy smoke test.
|
|
|
55
63
|
|
|
56
64
|
## MCP
|
|
57
65
|
|
|
58
|
-
Your
|
|
66
|
+
Your server serves its own MCP endpoint at `<ingest host>/mcp` —
|
|
59
67
|
`https://telemetry.example.com/mcp` for the example above. It authenticates
|
|
60
68
|
with a per-user API token generated from Settings → Profile, the same
|
|
61
69
|
token the public JSON API at `/api/v1` uses. See
|
|
62
70
|
[`ai-and-mcp.md`](ai-and-mcp.md) for every client's configuration block.
|
|
63
|
-
|
|
64
|
-
## Running the platform
|
|
65
|
-
|
|
66
|
-
Railwatch Cloud's backend is not part of this gem repository. Licensed
|
|
67
|
-
self-hosted customers receive separate platform deployment, backup, retention,
|
|
68
|
-
quota, and restore documentation from Rebulk.
|
data/docs/testing.md
CHANGED
|
@@ -27,20 +27,12 @@ require "railwatch/minitest"
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Railwatch must be *enabled* in the test environment or every block would look
|
|
30
|
-
empty
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
An embedded install adds its two databases to the `test` environment too, and
|
|
37
|
-
Rails' schema check refuses to run the suite while their migrations are
|
|
38
|
-
pending. `bin/rails db:test:prepare` does not create them, because they keep no
|
|
39
|
-
schema file; run this once locally and as a CI setup step:
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
RAILS_ENV=test bin/rails db:prepare
|
|
43
|
-
```
|
|
30
|
+
empty, and it is enabled only with a token present: set any non-blank
|
|
31
|
+
`RAILWATCH_TOKEN` for the test env. railwatch-server is off under
|
|
32
|
+
`Rails.env.test` and does not set one for you. Records go to an
|
|
33
|
+
in-memory transport, never over the network, and there is no database to
|
|
34
|
+
prepare. If Railwatch is disabled, the matchers raise
|
|
35
|
+
`Railwatch::SpecHelper::Disabled` rather than quietly passing.
|
|
44
36
|
|
|
45
37
|
Sampling is forced on for the block, so a fractional `c.sample` in the app's
|
|
46
38
|
test config can't turn an assertion into one that never fires either.
|
data/docs/troubleshooting.md
CHANGED
|
@@ -8,29 +8,9 @@ below are keyed to those lines.
|
|
|
8
8
|
bin/rails railwatch:doctor
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
below. Everything else is informational: a `✗` there means a feature
|
|
15
|
-
isn't wired, not that the install is broken.
|
|
16
|
-
|
|
17
|
-
Embedded (`transport = :local`):
|
|
18
|
-
|
|
19
|
-
| Doctor line | What a `✗` means |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `export` | Only shown with `export_enabled` on. Export is on and cannot work: no token, no URL, a plain-HTTP URL, or an unsupported policy. Fatal. |
|
|
22
|
-
| `export destination` | The export queue is blocked or deferred; the line gives the reason. `bin/rails railwatch:export:rebind` clears a credential block. |
|
|
23
|
-
| `railwatch database`, `railwatch_telemetry database` | The database is missing from `config/database.yml` for this environment. Fatal. Re-run the install generator. |
|
|
24
|
-
| `railwatch migrations`, `railwatch_telemetry migrations` | Migrations are pending. Fatal. Run `bin/rails db:prepare`. |
|
|
25
|
-
| `telemetry disk` | The telemetry database is not in incremental auto-vacuum, so pruning never shrinks the file. See [Embedded mode](embedded.md#giving-the-disk-back). |
|
|
26
|
-
| `maintenance` | No maintenance tick in the last ten minutes. Expected when the app is stopped: the clock runs in the app's processes, not in rake. |
|
|
27
|
-
| `writer process` | The writer socket is not answering, `plugin :railwatch` is missing from `config/puma.rb`, or the socket path is over Linux's 108-byte limit. Expected when the app is stopped. |
|
|
28
|
-
| `last write` | Shown when the writer answers: nothing written in five minutes. With the app serving traffic, the writer is stuck or workers are not reaching it. |
|
|
29
|
-
| `dashboard access` | HTTP Basic is on with no credentials outside development, so every page is 401; or Basic is off and nothing else is declared. Run `bin/rails railwatch:authentication:configure`, or see [Embedded mode](embedded.md#authentication). |
|
|
30
|
-
| `json compatibility` | The installed `json` gem cannot decode on this Rails; see [below](#binjobs-dies-in-a-loop-with-wrong-number-of-arguments-given-2-expected-1). |
|
|
31
|
-
| `recurring.yml` | `config/recurring.yml` still lists `Railwatch::*` jobs from a pre-release. Remove them. |
|
|
32
|
-
|
|
33
|
-
Cloud (`transport = :http`):
|
|
11
|
+
The task exits non-zero only on the lines marked fatal below. Everything
|
|
12
|
+
else is informational: a `✗` there means a feature isn't wired, not that
|
|
13
|
+
the install is broken.
|
|
34
14
|
|
|
35
15
|
| Doctor line | What a `✗` means |
|
|
36
16
|
|---|---|
|
|
@@ -39,11 +19,6 @@ Cloud (`transport = :http`):
|
|
|
39
19
|
| `ingest url` | `ingest_url` isn't a parseable HTTP(S) URL. |
|
|
40
20
|
| `ingest transport security` | The ingest URL is plain HTTP on a non-loopback host without `RAILWATCH_ALLOW_HTTP=true`. |
|
|
41
21
|
| `ingest reachable` | `GET {ingest_url}/ingest/ping` didn't return success. Fatal. The ping carries the token, so a missing or wrong token fails this line too; fix `token` first. |
|
|
42
|
-
|
|
43
|
-
Both:
|
|
44
|
-
|
|
45
|
-
| Doctor line | What a `✗` means |
|
|
46
|
-
|---|---|
|
|
47
22
|
| `request middleware` | `Railwatch::Middleware::Request` isn't in the stack, so requests aren't executions. |
|
|
48
23
|
| `engine mounted` | `mount Railwatch::Engine, at: "/railwatch"` is missing from `config/routes.rb`; the browser beacon has nowhere to post. |
|
|
49
24
|
| `deploy` | `config.deploy` is unset — records ship, charts get no deploy markers. |
|
|
@@ -64,32 +39,29 @@ app takes.
|
|
|
64
39
|
Work down this list. Most of it is the same root cause seen from
|
|
65
40
|
different angles: Railwatch decided not to record.
|
|
66
41
|
|
|
67
|
-
**
|
|
68
|
-
app serving traffic. `writer process` and `last write` say whether the
|
|
69
|
-
writer is up and when it last wrote; the migrations lines catch a
|
|
70
|
-
database that was never prepared.
|
|
71
|
-
|
|
72
|
-
**Cloud: the token is missing or blank.** With `transport = :http`,
|
|
42
|
+
**The token is missing or blank.**
|
|
73
43
|
`Railwatch.enabled?` is `config.enabled && token.present?`. With no token
|
|
74
44
|
the engine's `railwatch.subscribe` initializer returns early, so no
|
|
75
45
|
subscribers and no patches are installed at all. Fix: set
|
|
76
46
|
`RAILWATCH_TOKEN`, restart, and re-run `railwatch:doctor`. The `token`
|
|
77
47
|
line prints the first 6 characters and the length, which is enough to
|
|
78
|
-
spot a truncated or quoted value.
|
|
48
|
+
spot a truncated or quoted value. With railwatch-server installed, the
|
|
49
|
+
token is set when the server's data directory is provisioned; its boot
|
|
50
|
+
log line says whether the agent was wired.
|
|
79
51
|
|
|
80
|
-
**
|
|
52
|
+
**The token is wrong.** A 401 from the ingest marks the transport
|
|
81
53
|
permanently unauthorized: no further flush is attempted for the lifetime
|
|
82
54
|
of that process. Fixing the env var isn't enough. Restart the process.
|
|
83
55
|
`railwatch:doctor`'s `ingest reachable` line catches this before you
|
|
84
56
|
deploy.
|
|
85
57
|
|
|
86
|
-
|
|
58
|
+
**`RAILWATCH_INGEST_URL` points somewhere else.** Records go where
|
|
87
59
|
you sent them. `railwatch:status` prints the URL it is actually using.
|
|
88
|
-
Compare it against the
|
|
60
|
+
Compare it against the server you're looking at. Self-hosting: see
|
|
89
61
|
[`self-hosting.md`](self-hosting.md).
|
|
90
62
|
|
|
91
63
|
**`config.enabled` is false.** `RAILWATCH_ENABLED=0` (or `false`/`no`/`off`)
|
|
92
|
-
turns everything off
|
|
64
|
+
turns everything off.
|
|
93
65
|
|
|
94
66
|
**Sample rates are at zero.** `c.sample = { requests: 0.0 }` means no
|
|
95
67
|
request records. So does the per-route `railwatch_never_sample` macro on
|
|
@@ -329,13 +301,7 @@ hook below.
|
|
|
329
301
|
|
|
330
302
|
**Cause and fix**, in the order the hook itself checks:
|
|
331
303
|
|
|
332
|
-
-
|
|
333
|
-
The hook reads the deployer's environment, not your initializer. With
|
|
334
|
-
that variable set it runs `bin/rails railwatch:deploy[$KAMAL_VERSION]`
|
|
335
|
-
in the primary container, which writes the marker to the embedded
|
|
336
|
-
database. Without it, the hook treats the install as a cloud one and
|
|
337
|
-
exits at the next check, since an embedded install has no token.
|
|
338
|
-
- **Cloud: `RAILWATCH_TOKEN` isn't exported to the hook.** The next thing
|
|
304
|
+
- **`RAILWATCH_TOKEN` isn't exported to the hook.** The first thing
|
|
339
305
|
`.kamal/hooks/post-deploy` does is `[ -z "$RAILWATCH_TOKEN" ] && exit 0`.
|
|
340
306
|
The hook runs on the deployer machine, in your shell, not in a
|
|
341
307
|
container. So a token that only exists in `.kamal/secrets` for the
|