railwatch 0.9.4 → 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 +50 -0
- data/README.md +51 -60
- data/config/routes.rb +0 -59
- data/docs/ai-and-mcp.md +9 -8
- data/docs/configuration.md +35 -66
- 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/configuration.rb +21 -151
- data/lib/railwatch/engine.rb +9 -118
- data/lib/railwatch/patches.rb +0 -11
- data/lib/railwatch/reporter.rb +3 -19
- data/lib/railwatch/subscribers/process_info.rb +1 -2
- data/lib/railwatch/version.rb +1 -1
- data/lib/railwatch.rb +4 -62
- 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,381 +0,0 @@
|
|
|
1
|
-
import { Link, router, usePage } from "@inertiajs/react"
|
|
2
|
-
import { Workflow } from "lucide-react"
|
|
3
|
-
|
|
4
|
-
import { ChartHoverProvider } from "@/components/railwatch/chart-hover"
|
|
5
|
-
import { VolumePanel } from "@/components/railwatch/chart-panel"
|
|
6
|
-
import { CursorLoadMore } from "@/components/railwatch/cursor-load-more"
|
|
7
|
-
import { DataTable } from "@/components/railwatch/data-table"
|
|
8
|
-
import { EmptyState } from "@/components/railwatch/empty-state"
|
|
9
|
-
import { FilterBar } from "@/components/railwatch/filter-bar"
|
|
10
|
-
import {
|
|
11
|
-
OriginIdentity,
|
|
12
|
-
type OriginIdentityData,
|
|
13
|
-
} from "@/components/railwatch/origin-identity"
|
|
14
|
-
import { PageHeader } from "@/components/railwatch/page-header"
|
|
15
|
-
import { PercentilePicker } from "@/components/railwatch/percentile-picker"
|
|
16
|
-
import { SavedViewsMenu } from "@/components/railwatch/saved-views"
|
|
17
|
-
import { SparklineCell } from "@/components/railwatch/sparkline-cell"
|
|
18
|
-
import { StatusBadge } from "@/components/railwatch/status-badge"
|
|
19
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
20
|
-
import { usePercentile } from "@/hooks/use-percentile"
|
|
21
|
-
import EnvLayout from "@/layouts/env-layout"
|
|
22
|
-
import { count, ms, pct, when } from "@/lib/format"
|
|
23
|
-
import * as R from "@/routes"
|
|
24
|
-
import type {
|
|
25
|
-
CursorMeta,
|
|
26
|
-
DeployMarker,
|
|
27
|
-
GroupRow,
|
|
28
|
-
SeriesPoint,
|
|
29
|
-
SharedProps,
|
|
30
|
-
} from "@/types"
|
|
31
|
-
|
|
32
|
-
interface JobRow extends OriginIdentityData {
|
|
33
|
-
execution_id: string
|
|
34
|
-
name: string
|
|
35
|
-
outcome: string
|
|
36
|
-
queue: string
|
|
37
|
-
attempt: number
|
|
38
|
-
duration: number
|
|
39
|
-
queue_latency: number | null
|
|
40
|
-
occurred_at: string
|
|
41
|
-
exception_preview: string | null
|
|
42
|
-
}
|
|
43
|
-
interface Props {
|
|
44
|
-
classes: GroupRow[]
|
|
45
|
-
series: SeriesPoint[]
|
|
46
|
-
queues: {
|
|
47
|
-
queue: string
|
|
48
|
-
count: number
|
|
49
|
-
avg_latency: number
|
|
50
|
-
failed: number
|
|
51
|
-
}[]
|
|
52
|
-
recent: JobRow[]
|
|
53
|
-
pagination: CursorMeta
|
|
54
|
-
deploys: DeployMarker[]
|
|
55
|
-
q: string
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export default function Jobs(p: Props) {
|
|
59
|
-
const { environment, window, range } = usePage<SharedProps>().props
|
|
60
|
-
const { percentile } = usePercentile()
|
|
61
|
-
const a = environment!.application_id
|
|
62
|
-
const e = environment!.id
|
|
63
|
-
const timeParams =
|
|
64
|
-
window === "custom"
|
|
65
|
-
? { from: range?.from, to: range?.to }
|
|
66
|
-
: { window: window }
|
|
67
|
-
const cursorTimeParams = range
|
|
68
|
-
? { from: range.from, to: range.to }
|
|
69
|
-
: timeParams
|
|
70
|
-
const recentPath = (cursor?: string) =>
|
|
71
|
-
R.applicationEnvironmentJobsPath(a, e, {
|
|
72
|
-
...cursorTimeParams,
|
|
73
|
-
q: p.q || undefined,
|
|
74
|
-
cursor,
|
|
75
|
-
limit: p.pagination.limit,
|
|
76
|
-
})
|
|
77
|
-
const jobHref = (j: JobRow) =>
|
|
78
|
-
R.applicationEnvironmentJobPath(a, e, j.execution_id)
|
|
79
|
-
const classHref = (x: GroupRow) =>
|
|
80
|
-
R.klassApplicationEnvironmentJobsPath(a, e, x.group_hash, {
|
|
81
|
-
...timeParams,
|
|
82
|
-
q: p.q || undefined,
|
|
83
|
-
})
|
|
84
|
-
return (
|
|
85
|
-
<EnvLayout title="Jobs">
|
|
86
|
-
<ChartHoverProvider>
|
|
87
|
-
<PageHeader
|
|
88
|
-
title="Jobs"
|
|
89
|
-
description="Active Job attempts by class and queue, with queue latency and failures."
|
|
90
|
-
actions={
|
|
91
|
-
<>
|
|
92
|
-
<SavedViewsMenu page="jobs" />
|
|
93
|
-
<PercentilePicker />
|
|
94
|
-
</>
|
|
95
|
-
}
|
|
96
|
-
/>
|
|
97
|
-
<VolumePanel
|
|
98
|
-
legend="job"
|
|
99
|
-
label="Job attempts"
|
|
100
|
-
seriesLabel="Attempts"
|
|
101
|
-
data={p.series}
|
|
102
|
-
deploys={p.deploys}
|
|
103
|
-
/>
|
|
104
|
-
<div className="grid gap-4 lg:grid-cols-3">
|
|
105
|
-
<Card className="lg:col-span-1">
|
|
106
|
-
<CardHeader>
|
|
107
|
-
<CardTitle>Queues</CardTitle>
|
|
108
|
-
</CardHeader>
|
|
109
|
-
<CardContent>
|
|
110
|
-
<DataTable
|
|
111
|
-
rows={p.queues}
|
|
112
|
-
rowKey={(q) => q.queue ?? "-"}
|
|
113
|
-
columns={[
|
|
114
|
-
{
|
|
115
|
-
key: "q",
|
|
116
|
-
header: "Queue",
|
|
117
|
-
cell: (q) => (
|
|
118
|
-
<span className="font-mono text-xs">{q.queue}</span>
|
|
119
|
-
),
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
key: "n",
|
|
123
|
-
header: "Attempts",
|
|
124
|
-
align: "right",
|
|
125
|
-
cell: (q) => count(q.count),
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
key: "lat",
|
|
129
|
-
hideOnMobile: true,
|
|
130
|
-
header: "Avg wait",
|
|
131
|
-
align: "right",
|
|
132
|
-
cell: (q) => ms(q.avg_latency),
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
key: "f",
|
|
136
|
-
header: "Failed",
|
|
137
|
-
align: "right",
|
|
138
|
-
cell: (q) => q.failed,
|
|
139
|
-
},
|
|
140
|
-
]}
|
|
141
|
-
/>
|
|
142
|
-
</CardContent>
|
|
143
|
-
</Card>
|
|
144
|
-
<Card className="lg:col-span-2">
|
|
145
|
-
<CardHeader>
|
|
146
|
-
<CardTitle>Recent runs</CardTitle>
|
|
147
|
-
</CardHeader>
|
|
148
|
-
<CardContent className="space-y-3">
|
|
149
|
-
<FilterBar
|
|
150
|
-
value={p.q}
|
|
151
|
-
fields={[
|
|
152
|
-
{ key: "after", label: "After" },
|
|
153
|
-
{ key: "before", label: "Before" },
|
|
154
|
-
{ key: "user", label: "User" },
|
|
155
|
-
{ key: "tenant", label: "Tenant" },
|
|
156
|
-
{ key: "deploy", label: "Deploy" },
|
|
157
|
-
{
|
|
158
|
-
key: "kind",
|
|
159
|
-
label: "Execution kind",
|
|
160
|
-
options: ["job"],
|
|
161
|
-
},
|
|
162
|
-
{ key: "queue", label: "Queue" },
|
|
163
|
-
{ key: "class", label: "Job class" },
|
|
164
|
-
{ key: "job_id", label: "Job ID" },
|
|
165
|
-
{
|
|
166
|
-
key: "outcome",
|
|
167
|
-
label: "Outcome",
|
|
168
|
-
options: ["processed", "failed"],
|
|
169
|
-
},
|
|
170
|
-
]}
|
|
171
|
-
onChange={(q) =>
|
|
172
|
-
router.visit(
|
|
173
|
-
R.applicationEnvironmentJobsPath(a, e, {
|
|
174
|
-
...timeParams,
|
|
175
|
-
q: q || undefined,
|
|
176
|
-
}),
|
|
177
|
-
{
|
|
178
|
-
only: ["recent", "pagination", "q"],
|
|
179
|
-
preserveState: true,
|
|
180
|
-
reset: ["recent"],
|
|
181
|
-
},
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
placeholder="queue:default outcome:failed"
|
|
185
|
-
/>
|
|
186
|
-
<DataTable
|
|
187
|
-
rows={p.recent}
|
|
188
|
-
rowKey={(j) => j.execution_id}
|
|
189
|
-
empty={
|
|
190
|
-
<EmptyState
|
|
191
|
-
icon={Workflow}
|
|
192
|
-
title="No job runs in this window"
|
|
193
|
-
description="Job classes appear here once Active Job executions are reported."
|
|
194
|
-
/>
|
|
195
|
-
}
|
|
196
|
-
onRowClick={(j) => router.visit(jobHref(j))}
|
|
197
|
-
keyboardNav={{
|
|
198
|
-
onOpen: (j, opts) =>
|
|
199
|
-
opts?.newTab
|
|
200
|
-
? globalThis.window.open(jobHref(j), "_blank")
|
|
201
|
-
: router.visit(jobHref(j)),
|
|
202
|
-
}}
|
|
203
|
-
columns={[
|
|
204
|
-
{
|
|
205
|
-
key: "when",
|
|
206
|
-
header: "When",
|
|
207
|
-
cell: (j) => (
|
|
208
|
-
<span className="text-xs">{when(j.occurred_at)}</span>
|
|
209
|
-
),
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
key: "name",
|
|
213
|
-
header: "Job",
|
|
214
|
-
grow: true,
|
|
215
|
-
cell: (j) => (
|
|
216
|
-
<span className="font-mono text-xs">{j.name}</span>
|
|
217
|
-
),
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
key: "st",
|
|
221
|
-
header: "Outcome",
|
|
222
|
-
cell: (j) => <StatusBadge outcome={j.outcome} />,
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
key: "att",
|
|
226
|
-
hideOnMobile: true,
|
|
227
|
-
header: "Attempt",
|
|
228
|
-
align: "right",
|
|
229
|
-
cell: (j) => j.attempt,
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
key: "user",
|
|
233
|
-
// The card is two thirds of the page; below 2xl the job
|
|
234
|
-
// name needs this width more. The job class page shows it.
|
|
235
|
-
className: "hidden 2xl:table-cell",
|
|
236
|
-
header: "Origin user",
|
|
237
|
-
cell: (j) => (
|
|
238
|
-
<OriginIdentity
|
|
239
|
-
{...j}
|
|
240
|
-
applicationId={a}
|
|
241
|
-
environmentId={e}
|
|
242
|
-
kind="user"
|
|
243
|
-
range={range}
|
|
244
|
-
window={window}
|
|
245
|
-
/>
|
|
246
|
-
),
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
key: "tenant",
|
|
250
|
-
// The card is two thirds of the page; below 2xl the job
|
|
251
|
-
// name needs this width more. The job class page shows it.
|
|
252
|
-
className: "hidden 2xl:table-cell",
|
|
253
|
-
header: "Origin tenant",
|
|
254
|
-
cell: (j) => (
|
|
255
|
-
<OriginIdentity
|
|
256
|
-
{...j}
|
|
257
|
-
applicationId={a}
|
|
258
|
-
environmentId={e}
|
|
259
|
-
kind="tenant"
|
|
260
|
-
range={range}
|
|
261
|
-
window={window}
|
|
262
|
-
/>
|
|
263
|
-
),
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
key: "ex",
|
|
267
|
-
hideOnMobile: true,
|
|
268
|
-
header: "Exception",
|
|
269
|
-
// Capped so a long message truncates instead of
|
|
270
|
-
// squeezing the job name out of a one-third-width card.
|
|
271
|
-
className: "max-w-48",
|
|
272
|
-
cell: (j) => (
|
|
273
|
-
<span className="text-destructive block truncate text-xs">
|
|
274
|
-
{j.exception_preview}
|
|
275
|
-
</span>
|
|
276
|
-
),
|
|
277
|
-
},
|
|
278
|
-
]}
|
|
279
|
-
/>
|
|
280
|
-
<CursorLoadMore
|
|
281
|
-
meta={p.pagination}
|
|
282
|
-
href={recentPath}
|
|
283
|
-
only={["recent", "pagination"]}
|
|
284
|
-
/>
|
|
285
|
-
</CardContent>
|
|
286
|
-
</Card>
|
|
287
|
-
</div>
|
|
288
|
-
<DataTable
|
|
289
|
-
rows={p.classes}
|
|
290
|
-
rowKey={(x) => x.group_hash}
|
|
291
|
-
empty={
|
|
292
|
-
<EmptyState
|
|
293
|
-
icon={Workflow}
|
|
294
|
-
title="No job attempts in this window"
|
|
295
|
-
description="Individual job executions appear here as they run."
|
|
296
|
-
/>
|
|
297
|
-
}
|
|
298
|
-
hoverKey={(x) => x.group_hash}
|
|
299
|
-
keyboardNav={{
|
|
300
|
-
onOpen: (x, opts) =>
|
|
301
|
-
opts?.newTab
|
|
302
|
-
? globalThis.window.open(classHref(x), "_blank")
|
|
303
|
-
: router.visit(classHref(x)),
|
|
304
|
-
}}
|
|
305
|
-
columns={[
|
|
306
|
-
{
|
|
307
|
-
key: "name",
|
|
308
|
-
header: "Job",
|
|
309
|
-
grow: true,
|
|
310
|
-
cell: (x) => (
|
|
311
|
-
<Link
|
|
312
|
-
className="font-mono text-xs hover:underline"
|
|
313
|
-
href={classHref(x)}
|
|
314
|
-
>
|
|
315
|
-
{x.name}
|
|
316
|
-
</Link>
|
|
317
|
-
),
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
key: "trend",
|
|
321
|
-
hideOnMobile: true,
|
|
322
|
-
header: "Trend",
|
|
323
|
-
cell: (x) => (
|
|
324
|
-
<SparklineCell data={x.sparkline} hoverKey={x.group_hash} />
|
|
325
|
-
),
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
key: "n",
|
|
329
|
-
header: "Attempts",
|
|
330
|
-
align: "right",
|
|
331
|
-
cell: (x) => count(x.count),
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
key: "f",
|
|
335
|
-
header: "Failed",
|
|
336
|
-
align: "right",
|
|
337
|
-
cell: (x) => (
|
|
338
|
-
<span className={x.errors ? "text-destructive" : ""}>
|
|
339
|
-
{x.errors}
|
|
340
|
-
</span>
|
|
341
|
-
),
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
key: "fr",
|
|
345
|
-
hideOnMobile: true,
|
|
346
|
-
header: "Failure %",
|
|
347
|
-
align: "right",
|
|
348
|
-
cell: (x) => pct(x.errors, x.count),
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
key: "avg",
|
|
352
|
-
hideOnMobile: true,
|
|
353
|
-
header: "Avg",
|
|
354
|
-
align: "right",
|
|
355
|
-
cell: (x) => ms(x.avg),
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
key: percentile,
|
|
359
|
-
header: percentile,
|
|
360
|
-
align: "right",
|
|
361
|
-
cell: (x) => (
|
|
362
|
-
<span className="font-semibold">{ms(x[percentile])}</span>
|
|
363
|
-
),
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
key: "max",
|
|
367
|
-
hideOnMobile: true,
|
|
368
|
-
header: "Max",
|
|
369
|
-
align: "right",
|
|
370
|
-
cell: (x) => ms(x.max),
|
|
371
|
-
},
|
|
372
|
-
]}
|
|
373
|
-
/>
|
|
374
|
-
<p className="text-muted-foreground text-xs">
|
|
375
|
-
<StatusBadge outcome="processed" /> processed ·{" "}
|
|
376
|
-
<StatusBadge outcome="failed" /> failed
|
|
377
|
-
</p>
|
|
378
|
-
</ChartHoverProvider>
|
|
379
|
-
</EnvLayout>
|
|
380
|
-
)
|
|
381
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { router, usePage } from "@inertiajs/react"
|
|
2
|
-
|
|
3
|
-
import { DurationPanel, VolumePanel } from "@/components/railwatch/chart-panel"
|
|
4
|
-
import { DataTable } from "@/components/railwatch/data-table"
|
|
5
|
-
import { FilterBar } from "@/components/railwatch/filter-bar"
|
|
6
|
-
import {
|
|
7
|
-
OriginIdentity,
|
|
8
|
-
type OriginIdentityData,
|
|
9
|
-
} from "@/components/railwatch/origin-identity"
|
|
10
|
-
import { PageHeader } from "@/components/railwatch/page-header"
|
|
11
|
-
import { Stat, StatStrip } from "@/components/railwatch/stat"
|
|
12
|
-
import { StatusBadge } from "@/components/railwatch/status-badge"
|
|
13
|
-
import { useWindow } from "@/hooks/use-window"
|
|
14
|
-
import EnvLayout from "@/layouts/env-layout"
|
|
15
|
-
import { count, ms, pct, when } from "@/lib/format"
|
|
16
|
-
import * as R from "@/routes"
|
|
17
|
-
import type {
|
|
18
|
-
DeployMarker,
|
|
19
|
-
SeriesPoint,
|
|
20
|
-
SharedProps,
|
|
21
|
-
SummaryWithDelta,
|
|
22
|
-
} from "@/types"
|
|
23
|
-
|
|
24
|
-
interface Attempt extends OriginIdentityData {
|
|
25
|
-
execution_id: string
|
|
26
|
-
name: string
|
|
27
|
-
outcome: string
|
|
28
|
-
queue: string
|
|
29
|
-
attempt: number
|
|
30
|
-
duration: number
|
|
31
|
-
queue_latency: number | null
|
|
32
|
-
occurred_at: string
|
|
33
|
-
exception_preview: string | null
|
|
34
|
-
job_id: string
|
|
35
|
-
}
|
|
36
|
-
interface Props {
|
|
37
|
-
name: string
|
|
38
|
-
group_hash: string
|
|
39
|
-
summary: SummaryWithDelta
|
|
40
|
-
series: SeriesPoint[]
|
|
41
|
-
attempts: Attempt[]
|
|
42
|
-
deploys: DeployMarker[]
|
|
43
|
-
q: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default function JobClass(p: Props) {
|
|
47
|
-
const { environment, window, range } = usePage<SharedProps>().props
|
|
48
|
-
const { window: currentWindow, label: windowLabel } = useWindow()
|
|
49
|
-
const a = environment!.application_id
|
|
50
|
-
const e = environment!.id
|
|
51
|
-
const timeParams =
|
|
52
|
-
window === "custom"
|
|
53
|
-
? { from: range?.from, to: range?.to }
|
|
54
|
-
: { window: window }
|
|
55
|
-
const s = p.summary.current
|
|
56
|
-
const prev = p.summary.previous
|
|
57
|
-
const deltaCaption =
|
|
58
|
-
currentWindow === "custom"
|
|
59
|
-
? "vs previous period"
|
|
60
|
-
: `vs previous ${windowLabel}`
|
|
61
|
-
return (
|
|
62
|
-
<EnvLayout
|
|
63
|
-
title={p.name}
|
|
64
|
-
crumbs={[
|
|
65
|
-
{
|
|
66
|
-
title: "Jobs",
|
|
67
|
-
href: R.applicationEnvironmentJobsPath(a, e, { window }),
|
|
68
|
-
},
|
|
69
|
-
{ title: p.name, href: "#" },
|
|
70
|
-
]}
|
|
71
|
-
>
|
|
72
|
-
<PageHeader title={<span className="font-mono">{p.name}</span>} />
|
|
73
|
-
<StatStrip>
|
|
74
|
-
<Stat label="Attempts" value={count(s.count)} />
|
|
75
|
-
<Stat
|
|
76
|
-
label="Failed"
|
|
77
|
-
value={pct(s.errors, s.count)}
|
|
78
|
-
tone={s.errors ? "destructive" : "success"}
|
|
79
|
-
delta={{
|
|
80
|
-
current: s.count ? (s.errors / s.count) * 100 : 0,
|
|
81
|
-
previous: prev.count ? (prev.errors / prev.count) * 100 : 0,
|
|
82
|
-
goodDirection: "down",
|
|
83
|
-
}}
|
|
84
|
-
deltaCaption={deltaCaption}
|
|
85
|
-
/>
|
|
86
|
-
<Stat
|
|
87
|
-
label="p50 / p95"
|
|
88
|
-
value={ms(s.p50 / 1000)}
|
|
89
|
-
hint={`p95 ${ms(s.p95 / 1000)}`}
|
|
90
|
-
delta={{ current: s.p95, previous: prev.p95, goodDirection: "down" }}
|
|
91
|
-
deltaCaption={deltaCaption}
|
|
92
|
-
/>
|
|
93
|
-
<Stat label="Max" value={ms(s.max / 1000)} />
|
|
94
|
-
</StatStrip>
|
|
95
|
-
<div className="grid gap-4 lg:grid-cols-2">
|
|
96
|
-
<VolumePanel
|
|
97
|
-
legend="job"
|
|
98
|
-
label="Attempts"
|
|
99
|
-
seriesLabel="Attempts"
|
|
100
|
-
data={p.series}
|
|
101
|
-
deploys={p.deploys}
|
|
102
|
-
/>
|
|
103
|
-
<DurationPanel label="Duration" data={p.series} deploys={p.deploys} />
|
|
104
|
-
</div>
|
|
105
|
-
<FilterBar
|
|
106
|
-
value={p.q}
|
|
107
|
-
fields={[
|
|
108
|
-
{ key: "user", label: "Origin user" },
|
|
109
|
-
{ key: "tenant", label: "Origin tenant" },
|
|
110
|
-
{ key: "queue", label: "Queue" },
|
|
111
|
-
{ key: "job_id", label: "Job ID" },
|
|
112
|
-
{
|
|
113
|
-
key: "outcome",
|
|
114
|
-
label: "Outcome",
|
|
115
|
-
options: ["processed", "failed"],
|
|
116
|
-
},
|
|
117
|
-
]}
|
|
118
|
-
onChange={(q) =>
|
|
119
|
-
router.visit(
|
|
120
|
-
R.klassApplicationEnvironmentJobsPath(a, e, p.group_hash, {
|
|
121
|
-
...timeParams,
|
|
122
|
-
q: q || undefined,
|
|
123
|
-
}),
|
|
124
|
-
{ preserveState: true },
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
placeholder="Filter attempts by origin, queue, or outcome"
|
|
128
|
-
/>
|
|
129
|
-
<DataTable
|
|
130
|
-
rows={p.attempts}
|
|
131
|
-
rowKey={(x) => x.execution_id}
|
|
132
|
-
onRowClick={(x) =>
|
|
133
|
-
router.visit(R.applicationEnvironmentJobPath(a, e, x.execution_id))
|
|
134
|
-
}
|
|
135
|
-
columns={[
|
|
136
|
-
{
|
|
137
|
-
key: "when",
|
|
138
|
-
header: "When",
|
|
139
|
-
cell: (x) => <span className="text-xs">{when(x.occurred_at)}</span>,
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
key: "st",
|
|
143
|
-
header: "Outcome",
|
|
144
|
-
cell: (x) => <StatusBadge outcome={x.outcome} />,
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: "att",
|
|
148
|
-
hideOnMobile: true,
|
|
149
|
-
header: "Attempt",
|
|
150
|
-
align: "right",
|
|
151
|
-
cell: (x) => x.attempt,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
key: "q",
|
|
155
|
-
hideOnMobile: true,
|
|
156
|
-
header: "Queue",
|
|
157
|
-
cell: (x) => x.queue,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
key: "user",
|
|
161
|
-
hideOnMobile: true,
|
|
162
|
-
header: "Origin user",
|
|
163
|
-
cell: (x) => (
|
|
164
|
-
<OriginIdentity
|
|
165
|
-
{...x}
|
|
166
|
-
applicationId={a}
|
|
167
|
-
environmentId={e}
|
|
168
|
-
kind="user"
|
|
169
|
-
range={range}
|
|
170
|
-
window={window}
|
|
171
|
-
/>
|
|
172
|
-
),
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
key: "tenant",
|
|
176
|
-
hideOnMobile: true,
|
|
177
|
-
header: "Origin tenant",
|
|
178
|
-
cell: (x) => (
|
|
179
|
-
<OriginIdentity
|
|
180
|
-
{...x}
|
|
181
|
-
applicationId={a}
|
|
182
|
-
environmentId={e}
|
|
183
|
-
kind="tenant"
|
|
184
|
-
range={range}
|
|
185
|
-
window={window}
|
|
186
|
-
/>
|
|
187
|
-
),
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
key: "wait",
|
|
191
|
-
hideOnMobile: true,
|
|
192
|
-
header: "Waited",
|
|
193
|
-
align: "right",
|
|
194
|
-
cell: (x) => ms(x.queue_latency),
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
key: "dur",
|
|
198
|
-
header: "Duration",
|
|
199
|
-
align: "right",
|
|
200
|
-
cell: (x) => ms(x.duration),
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
key: "ex",
|
|
204
|
-
header: "Exception",
|
|
205
|
-
cell: (x) => (
|
|
206
|
-
<span className="text-destructive line-clamp-1 text-xs">
|
|
207
|
-
{x.exception_preview ?? ""}
|
|
208
|
-
</span>
|
|
209
|
-
),
|
|
210
|
-
},
|
|
211
|
-
]}
|
|
212
|
-
/>
|
|
213
|
-
</EnvLayout>
|
|
214
|
-
)
|
|
215
|
-
}
|