@oneuptime/common 12.0.33 → 12.0.34
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.
- package/Models/AnalyticsModels/RumSession.ts +117 -1
- package/Models/AnalyticsModels/RumSessionChunk.ts +13 -0
- package/Models/DatabaseModels/AlertCustomField.ts +77 -3
- package/Models/DatabaseModels/ApiKeyPermission.ts +3 -27
- package/Models/DatabaseModels/IncidentCustomField.ts +77 -3
- package/Models/DatabaseModels/InventoryItemCustomField.ts +77 -3
- package/Models/DatabaseModels/MonitorCustomField.ts +77 -3
- package/Models/DatabaseModels/OnCallDutyPolicyCustomField.ts +77 -3
- package/Models/DatabaseModels/RumApplication.ts +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceCustomField.ts +77 -3
- package/Models/DatabaseModels/StatusPageCustomField.ts +77 -3
- package/Models/DatabaseModels/TeamCustomField.ts +77 -3
- package/Models/DatabaseModels/TeamMember.ts +0 -9
- package/Models/DatabaseModels/TeamMemberCustomField.ts +77 -3
- package/Models/DatabaseModels/TeamPermission.ts +3 -24
- package/Models/DatabaseModels/TelemetryIngestionKey.ts +260 -0
- package/Models/DatabaseModels/UserTelegram.ts +0 -4
- package/Scripts/benchmark-fanin-capacity.js +181 -0
- package/Server/API/TelemetryAPI.ts +1284 -164
- package/Server/API/UserNotificationSettingAPI.ts +55 -0
- package/Server/API/UserTelegramAPI.ts +48 -4
- package/Server/EnvironmentConfig.ts +35 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791300000000-AddTelemetryIngestionKeyType.ts +91 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791400000000-SessionReplayRecordEverySessionByDefault.ts +67 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791500000000-WidenCustomFieldDropdownOptions.ts +139 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791600000000-AddCustomFieldValueMapping.ts +121 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Infrastructure/QueueWorker.ts +20 -14
- package/Server/Infrastructure/Semaphore.ts +2 -0
- package/Server/Middleware/TelemetryIngest.ts +453 -7
- package/Server/Services/AccessTokenService.ts +1 -0
- package/Server/Services/AlertCustomFieldService.ts +98 -0
- package/Server/Services/AlertService.ts +37 -0
- package/Server/Services/ApiKeyPermissionService.ts +461 -29
- package/Server/Services/CustomFieldMappingService.ts +879 -0
- package/Server/Services/GlobalConfigService.ts +194 -0
- package/Server/Services/IncidentCustomFieldService.ts +98 -0
- package/Server/Services/IncidentService.ts +35 -0
- package/Server/Services/MetricService.ts +194 -0
- package/Server/Services/MonitorService.ts +32 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +78 -25
- package/Server/Services/ProjectService.ts +22 -0
- package/Server/Services/RoutineEmailSettingsService.ts +73 -0
- package/Server/Services/RumSessionReplayViewService.ts +104 -24
- package/Server/Services/ScheduledMaintenanceCustomFieldService.ts +98 -0
- package/Server/Services/ScheduledMaintenanceService.ts +32 -0
- package/Server/Services/TeamMemberService.ts +78 -0
- package/Server/Services/TeamPermissionService.ts +235 -3
- package/Server/Services/TelemetryIngestionKeyService.ts +722 -19
- package/Server/Services/UserNotificationSettingService.ts +34 -6
- package/Server/Services/UserTelegramService.ts +326 -5
- package/Server/Types/Database/QueryHelper.ts +2 -0
- package/Server/Utils/APIKey/AccessPermission.ts +5 -2
- package/Server/Utils/CustomField/CustomFieldDefinitionMappingHooks.ts +54 -0
- package/Server/Utils/CustomField/CustomFieldMappingRegistry.ts +415 -0
- package/Server/Utils/CustomField/CustomFieldMappingValidator.ts +335 -0
- package/Server/Utils/DataSource/EgressGuard.ts +177 -8
- package/Server/Utils/EmailRollup/EmailRollupConstants.ts +38 -5
- package/Server/Utils/EmailRollup/EmailRollupFlushRunner.ts +57 -4
- package/Server/Utils/FrontendEnvironment.ts +40 -0
- package/Server/Utils/LogRedaction.ts +20 -0
- package/Server/Utils/Logger.ts +11 -0
- package/Server/Utils/Monitor/Criteria/CompareCriteria.ts +338 -77
- package/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.ts +30 -4
- package/Server/Utils/Monitor/MonitorAlert.ts +29 -6
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +110 -15
- package/Server/Utils/Monitor/MonitorIncident.ts +22 -6
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +29 -0
- package/Server/Utils/Monitor/SeriesContextEnricher.ts +304 -0
- package/Server/Utils/SSRFProtection.ts +217 -10
- package/Server/Utils/SessionReplay/SessionReplayGateCache.ts +239 -138
- package/Server/Utils/SessionReplay/SessionReplayHealthCounters.ts +305 -0
- package/Server/Utils/SessionReplay/SessionReplayReadService.ts +1430 -289
- package/Server/Utils/StartServer.ts +2 -17
- package/Server/Utils/TelegramVerificationToken.ts +185 -0
- package/Server/Utils/Telemetry/PinServiceName.ts +197 -0
- package/Server/Utils/Telemetry/TelemetryFanInWriter.ts +38 -16
- package/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.ts +92 -0
- package/Server/Utils/Telemetry/TelemetryIngestionKeyRateLimiter.ts +217 -0
- package/Server/Utils/VM/VMAPI.ts +1 -0
- package/Server/Utils/VM/VMRunner.ts +975 -95
- package/Tests/App/AdminDashboard/AdminHeaderSmallScreens.test.tsx +202 -0
- package/Tests/App/Dashboard/DashboardHeaderSmallScreens.test.tsx +404 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +468 -0
- package/Tests/App/Dashboard/NotificationEmailPreferences.test.tsx +399 -0
- package/Tests/App/StatusPage/StatusPageLastUpdated.test.tsx +263 -0
- package/Tests/App/StatusPage/StatusPageOverviewLiveAndSearch.test.tsx +753 -0
- package/Tests/App/StatusPage/StatusPageResourceSearchBox.test.tsx +224 -0
- package/Tests/Models/AnalyticsModels/RumSessionReplayColumns.test.ts +262 -0
- package/Tests/Models/CustomFieldMappingColumns.test.ts +166 -0
- package/Tests/Models/DatabaseModels/SessionReplayModels.test.ts +20 -6
- package/Tests/ResponsiveVisibility.test.ts +115 -0
- package/Tests/ResponsiveVisibility.ts +183 -0
- package/Tests/Server/API/SessionReplayAPI.test.ts +1940 -216
- package/Tests/Server/API/UserNotificationSettingAPI.test.ts +186 -0
- package/Tests/Server/API/UserTelegramAPISecurity.test.ts +231 -0
- package/Tests/Server/EnvironmentConfigFrontendSecurity.test.ts +234 -0
- package/Tests/Server/Infrastructure/Postgres/CustomFieldValueMappingMigration.test.ts +202 -0
- package/Tests/Server/Infrastructure/Postgres/InventoryItemArchiveMigration.test.ts +41 -0
- package/Tests/Server/Infrastructure/Postgres/SessionReplayRecordEverySessionByDefaultMigration.test.ts +169 -0
- package/Tests/Server/Infrastructure/QueueWorkerTimeout.test.ts +210 -0
- package/Tests/Server/Infrastructure/TelemetryExporterDeploymentConfig.test.ts +130 -0
- package/Tests/Server/Middleware/ProjectAuthorizationApiKeyMiddleware.test.ts +4 -1
- package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +1163 -0
- package/Tests/Server/Middleware/TelemetryIngestTokenLog.test.ts +5 -3
- package/Tests/Server/Services/AddTelemetryIngestionKeyTypeMigration.test.ts +555 -0
- package/Tests/Server/Services/ApiKeyPermissionSecurity.test.ts +678 -0
- package/Tests/Server/Services/ApiKeyPermissionService.test.ts +276 -28
- package/Tests/Server/Services/CustomFieldDropdownOptionsColumnWidth.test.ts +431 -0
- package/Tests/Server/Services/CustomFieldMappingService.test.ts +850 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +32 -0
- package/Tests/Server/Services/GlobalConfigService.test.ts +414 -1
- package/Tests/Server/Services/MetricRawEntityKeyPrune.test.ts +592 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +226 -1
- package/Tests/Server/Services/RoutineEmailSettingsPostgres.test.ts +329 -0
- package/Tests/Server/Services/RumSessionReplayViewService.test.ts +267 -0
- package/Tests/Server/Services/TeamMemberAutoAcceptInvitation.test.ts +9 -0
- package/Tests/Server/Services/TeamMemberInviteRegistrationToken.test.ts +9 -0
- package/Tests/Server/Services/TeamPrivilegeEscalation.test.ts +834 -0
- package/Tests/Server/Services/TelemetryIngestionKeyPolicyResolution.test.ts +814 -0
- package/Tests/Server/Services/TelemetryIngestionKeyValidation.test.ts +998 -0
- package/Tests/Server/Services/UserNotificationSettingRollupRouting.test.ts +141 -0
- package/Tests/Server/Services/UserNotificationSettingWorkspaceChannels.test.ts +18 -10
- package/Tests/Server/Services/UserTelegramVerificationSecurity.test.ts +688 -0
- package/Tests/Server/Utils/AI/SRE/Insights/FixRouting.test.ts +497 -0
- package/Tests/Server/Utils/AI/Toolbox/Serializer.test.ts +383 -0
- package/Tests/Server/Utils/APIKey/AccessPermission.test.ts +7 -3
- package/Tests/Server/Utils/AnalyticsDatabase/ClusterConfig.test.ts +315 -0
- package/Tests/Server/Utils/CustomField/CustomFieldMappingValidator.test.ts +437 -0
- package/Tests/Server/Utils/DataSource/EgressGuard.test.ts +300 -11
- package/Tests/Server/Utils/EmailRollup/EmailRollupBurstWindow.test.ts +83 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerBehaviour.test.ts +1 -1
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerPreferences.test.ts +362 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupTestHarness.ts +77 -1
- package/Tests/Server/Utils/FrontendEnvironment.test.ts +190 -0
- package/Tests/Server/Utils/LogRedaction.test.ts +26 -0
- package/Tests/Server/Utils/LoggerCredentialLeak.test.ts +23 -9
- package/Tests/Server/Utils/Monitor/Criteria/CompareCriteriaAggregation.test.ts +584 -0
- package/Tests/Server/Utils/Monitor/Criteria/IncomingRequestHeaderCriteria.test.ts +236 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +437 -0
- package/Tests/Server/Utils/Monitor/MonitorTemplateUtilSeriesContext.test.ts +176 -0
- package/Tests/Server/Utils/Monitor/SeriesContextEnricher.test.ts +356 -0
- package/Tests/Server/Utils/SSRFProtectionCloudServiceAddresses.test.ts +595 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayGateCachePolicy.test.ts +198 -1
- package/Tests/Server/Utils/SessionReplay/SessionReplayHealthCounters.test.ts +453 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayReadServiceQueries.test.ts +1378 -0
- package/Tests/Server/Utils/SessionReplayOriginAllowListRefactor.test.ts +420 -0
- package/Tests/Server/Utils/TelegramVerificationToken.test.ts +253 -0
- package/Tests/Server/Utils/Telemetry/PinServiceName.test.ts +666 -0
- package/Tests/Server/Utils/Telemetry/TelemetryFanInWriterCapacity.test.ts +458 -0
- package/Tests/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.test.ts +424 -0
- package/Tests/Server/Utils/Telemetry/TelemetryIngestionKeyRateLimiter.test.ts +528 -0
- package/Tests/Server/Utils/TelemetryExporterEnvironment.test.ts +56 -0
- package/Tests/Server/Utils/VM/VMRunnerHostBridgeLatency.test.ts +74 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +100 -7
- package/Tests/Server/Utils/VM/VMRunnerSsrf.test.ts +1176 -6
- package/Tests/Types/CustomField/CustomFieldMappingCatalog.test.ts +220 -0
- package/Tests/Types/CustomField/CustomFieldValueMapping.test.ts +348 -0
- package/Tests/Types/JSONFunctions.test.ts +260 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +422 -53
- package/Tests/Types/Monitor/DockerAlertTemplates.test.ts +495 -15
- package/Tests/Types/Monitor/DockerSwarmAlertTemplates.test.ts +191 -45
- package/Tests/Types/Monitor/HostAlertTemplates.test.ts +370 -42
- package/Tests/Types/Monitor/IotAlertTemplates.test.ts +375 -20
- package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +636 -42
- package/Tests/Types/Monitor/KubernetesMetricCatalog.test.ts +189 -0
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +95 -14
- package/Tests/Types/Monitor/PodmanAlertTemplates.test.ts +190 -21
- package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +352 -22
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationAlertDebuggability.test.ts +363 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +93 -18
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.test.ts +259 -0
- package/Tests/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.test.ts +476 -0
- package/Tests/Types/Monitor/RumAlertTemplates.test.ts +136 -0
- package/Tests/Types/Monitor/SeriesContext/SeriesDebugHints.test.ts +661 -0
- package/Tests/Types/Monitor/SeriesContext/SeriesLabelDisplay.test.ts +507 -0
- package/Tests/Types/Monitor/ServiceAlertTemplates.test.ts +270 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +38 -10
- package/Tests/Types/Monitor/Utils/RecommendationCriteriaAssertions.ts +102 -0
- package/Tests/Types/NotificationSetting/RoutineEmailEvents.test.ts +47 -0
- package/Tests/Types/Rum/SessionReplayApiContracts.test.ts +608 -0
- package/Tests/Types/Rum/SessionReplayCustomEvents.test.ts +434 -0
- package/Tests/Types/WebsiteRequest.test.ts +285 -3
- package/Tests/UI/Components/Charts/ChartBucketIdentity.test.ts +16 -3
- package/Tests/UI/Components/Charts/ChartTrailingBucketGap.test.ts +691 -0
- package/Tests/UI/Components/ComponentsModal.test.tsx +12 -4
- package/Tests/UI/Components/ComponentsModalUsability.test.tsx +518 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetailMapping.test.tsx +324 -0
- package/Tests/UI/Components/CustomFields/MapFromCustomFieldInput.test.tsx +176 -0
- package/Tests/UI/Components/Graphs/DayUptimeGraph.test.tsx +484 -0
- package/Tests/UI/Components/HeaderRightRail.test.tsx +157 -0
- package/Tests/UI/Components/IconDropdownItem.test.tsx +102 -0
- package/Tests/UI/Components/JSONTablePrototypePollution.test.tsx +117 -0
- package/Tests/UI/Components/KeyboardShortcutsModal.test.tsx +214 -0
- package/Tests/UI/Components/ModelTable/ModelTableWrapContent.test.tsx +561 -0
- package/Tests/UI/Components/MonitorGraphs/UptimeBarDayModal.test.tsx +302 -0
- package/Tests/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.test.ts +28 -12
- package/Tests/UI/Components/ShortcutDialogGuard.test.tsx +74 -0
- package/Tests/UI/Components/StatusPage/ResourceGroupSectionAutoExpand.test.tsx +248 -0
- package/Tests/UI/Components/TableCellWrapping.test.tsx +625 -0
- package/Tests/UI/Components/TableLoadingStates.test.tsx +205 -0
- package/Tests/UI/Components/Workflow/NodePlacement.test.ts +148 -0
- package/Tests/UI/Components/Workflow/Workflow.test.tsx +981 -0
- package/Tests/UI/ConfigBrowserTelemetry.test.ts +70 -0
- package/Tests/UI/Rum/ChunkLoader.test.ts +1036 -2
- package/Tests/UI/Rum/FidelityNotices.test.ts +187 -0
- package/Tests/UI/Rum/InactivityMap.test.ts +341 -0
- package/Tests/UI/Rum/PrivacySummaryCard.test.tsx +259 -0
- package/Tests/UI/Rum/RecordingHealthCard.test.tsx +855 -0
- package/Tests/UI/Rum/RecordingHealthStrip.test.tsx +594 -0
- package/Tests/UI/Rum/ReplayCard.test.tsx +451 -0
- package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +536 -0
- package/Tests/UI/Rum/ReplayEngine.test.ts +2503 -0
- package/Tests/UI/Rum/ReplayEngineTypes.test.ts +171 -0
- package/Tests/UI/Rum/ReplayHeader.test.tsx +711 -0
- package/Tests/UI/Rum/ReplayLink.test.tsx +119 -0
- package/Tests/UI/Rum/ReplayPinControl.test.tsx +408 -0
- package/Tests/UI/Rum/ReplayPlaybackIntent.test.ts +152 -0
- package/Tests/UI/Rum/ReplayRail.test.tsx +1296 -0
- package/Tests/UI/Rum/ReplayRailDetail.test.tsx +900 -0
- package/Tests/UI/Rum/ReplayScrubber.test.tsx +763 -147
- package/Tests/UI/Rum/ReplaySignalTypes.test.ts +189 -0
- package/Tests/UI/Rum/ReplaySignals.test.ts +1579 -0
- package/Tests/UI/Rum/ReplayStage.test.tsx +396 -473
- package/Tests/UI/Rum/ReplayStageOverlays.test.tsx +918 -0
- package/Tests/UI/Rum/ReplayTimeline.test.tsx +696 -0
- package/Tests/UI/Rum/SessionReplayEmptyState.test.tsx +499 -0
- package/Tests/UI/Rum/SessionReplaySearchBar.test.tsx +346 -0
- package/Tests/UI/Rum/SessionReplaySetupGuide.test.tsx +545 -0
- package/Tests/UI/Rum/SessionReplayTable.test.tsx +991 -0
- package/Tests/UI/Rum/TargetedCapturePanel.test.tsx +254 -0
- package/Tests/UI/Telemetry/BrowserExporterIsolation.test.ts +71 -0
- package/Tests/UI/Utils/GlobalKeyboardShortcut.test.ts +344 -0
- package/Tests/Utils/API.test.ts +308 -0
- package/Tests/Utils/HTTPResponseBodyReader.test.ts +323 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveryScanStatus.test.ts +117 -0
- package/Tests/Utils/Rum/ChunkMath.test.ts +83 -0
- package/Tests/Utils/Rum/SessionReplayHealthDiagnosis.test.ts +993 -0
- package/Tests/Utils/Rum/SessionReplayStringMap.test.ts +245 -0
- package/Tests/Utils/StatusPage/ResourceSearch.test.ts +631 -0
- package/Tests/Utils/Telemetry/OriginAllowList.test.ts +633 -0
- package/Tests/Utils/Uptime/DayUptimeGraphUtil.test.ts +461 -0
- package/Tests/Utils/ValueFormatter.test.ts +148 -0
- package/Types/CustomField/CustomFieldMappingCatalog.ts +161 -0
- package/Types/CustomField/CustomFieldMappingSourceResource.ts +19 -0
- package/Types/CustomField/CustomFieldValueMapping.ts +288 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/JSONFunctions.ts +189 -43
- package/Types/Monitor/CephAlertTemplates.ts +157 -195
- package/Types/Monitor/DockerAlertTemplates.ts +338 -128
- package/Types/Monitor/DockerSwarmAlertTemplates.ts +95 -112
- package/Types/Monitor/HostAlertTemplates.ts +302 -130
- package/Types/Monitor/IotAlertTemplates.ts +112 -104
- package/Types/Monitor/KubernetesAlertTemplates.ts +415 -224
- package/Types/Monitor/KubernetesMetricCatalog.ts +23 -19
- package/Types/Monitor/PodmanAlertTemplates.ts +116 -163
- package/Types/Monitor/ProxmoxAlertTemplates.ts +217 -99
- package/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.ts +98 -6
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.ts +44 -7
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.ts +383 -0
- package/Types/Monitor/RumAlertTemplates.ts +46 -7
- package/Types/Monitor/SeriesContext/SeriesDebugHints.ts +596 -0
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.ts +554 -0
- package/Types/Monitor/ServiceAlertTemplates.ts +98 -11
- package/Types/Monitor/UptimeHistoryLabels.ts +56 -0
- package/Types/NotificationSetting/RoutineEmailEvents.ts +30 -0
- package/Types/Rum/SessionReplay.ts +209 -0
- package/Types/Rum/SessionReplayApi.ts +722 -0
- package/Types/Rum/SessionReplayCaptureTrigger.ts +21 -12
- package/Types/Rum/SessionReplayConsentMode.ts +11 -7
- package/Types/Rum/SessionReplayCustomEvents.ts +549 -0
- package/Types/Rum/SessionReplayHealth.ts +238 -0
- package/Types/Telemetry/TelemetryIngestSurface.ts +95 -0
- package/Types/Telemetry/TelemetryIngestionKeyPolicy.ts +75 -0
- package/Types/Telemetry/TelemetryIngestionKeyType.ts +29 -0
- package/Types/WebsiteRequest.ts +85 -3
- package/UI/Components/Charts/Area/AreaChart.tsx +13 -2
- package/UI/Components/Charts/Bar/BarChart.tsx +6 -2
- package/UI/Components/Charts/Line/LineChart.tsx +13 -2
- package/UI/Components/Charts/Types/XAxis/XAxis.ts +29 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +22 -3
- package/UI/Components/Charts/Utils/TimeAnnotation.ts +76 -9
- package/UI/Components/Charts/Utils/XAxis.ts +217 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +143 -25
- package/UI/Components/CustomFields/MapFromCustomFieldInput.tsx +216 -0
- package/UI/Components/Graphs/DayUptimeGraph.tsx +173 -8
- package/UI/Components/Graphs/UptimeBarTooltip.tsx +22 -278
- package/UI/Components/Graphs/UptimeDaySummary.tsx +327 -0
- package/UI/Components/Header/Header.tsx +25 -9
- package/UI/Components/Header/IconDropdown/IconDropdownItem.tsx +10 -1
- package/UI/Components/Header/IconDropdown/IconDropdownMenu.tsx +6 -1
- package/UI/Components/Header/ProjectPicker/ProjectPicker.tsx +6 -1
- package/UI/Components/HeaderAlert/NotificationBell/NotificationBellDropdown.tsx +6 -1
- package/UI/Components/Icon/Icon.tsx +11 -0
- package/UI/Components/JSONTable/JSONTable.tsx +2 -2
- package/UI/Components/KeyboardShortcut/KeyboardShortcutsModal.tsx +125 -0
- package/UI/Components/KeyboardShortcut/Screenshots/README.md +19 -0
- package/UI/Components/KeyboardShortcut/Screenshots/keyboard-shortcuts-command-palette.png +0 -0
- package/UI/Components/KeyboardShortcut/Screenshots/keyboard-shortcuts-dialog-dark.png +0 -0
- package/UI/Components/KeyboardShortcut/Screenshots/keyboard-shortcuts-dialog.png +0 -0
- package/UI/Components/KeyboardShortcut/Screenshots/keyboard-shortcuts-help-menu.png +0 -0
- package/UI/Components/KeyboardShortcut/Screenshots/keyboard-shortcuts-narrow.png +0 -0
- package/UI/Components/ModelTable/Column.ts +15 -0
- package/UI/Components/Monitor/SeriesDebugCommandsViewer.tsx +64 -0
- package/UI/Components/Monitor/SeriesLabelsViewer.tsx +93 -0
- package/UI/Components/MonitorGraphs/Uptime.tsx +14 -2
- package/UI/Components/MonitorGraphs/UptimeBarDayModal.tsx +63 -10
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +44 -0
- package/UI/Components/StatusPage/ResourceGroupSection.tsx +40 -0
- package/UI/Components/Table/CellClassName.ts +81 -0
- package/UI/Components/Table/TableRow.tsx +20 -14
- package/UI/Components/Table/TableSkeletonRows.tsx +9 -9
- package/UI/Components/Table/Types/Column.ts +36 -0
- package/UI/Components/Tooltip/Tooltip.tsx +11 -1
- package/UI/Components/Workflow/ComponentsModal.tsx +60 -39
- package/UI/Components/Workflow/NodePlacement.ts +57 -0
- package/UI/Components/Workflow/Workflow.tsx +47 -18
- package/UI/Config.ts +15 -33
- package/UI/Utils/GlobalKeyboardShortcut.ts +208 -0
- package/UI/Utils/Telemetry/BrowserTelemetryConfig.ts +28 -0
- package/UI/Utils/Telemetry/Telemetry.ts +10 -8
- package/Utils/API.ts +129 -3
- package/Utils/HTTPResponseBodyReader.ts +221 -0
- package/Utils/NetworkDiscovery/DiscoveryScanStatus.ts +77 -0
- package/Utils/Rum/ChunkMath.ts +106 -0
- package/Utils/Rum/SessionReplayHealth.ts +732 -0
- package/Utils/Rum/SessionReplayStringMap.ts +226 -0
- package/Utils/Schema/ModelSchema.ts +1 -0
- package/Utils/StatusPage/ResourceSearch.ts +290 -0
- package/Utils/Telemetry/OriginAllowList.ts +355 -0
- package/Utils/Uptime/DayUptimeGraphUtil.ts +205 -0
- package/Utils/ValueFormatter.ts +35 -1
- package/build/dist/Models/AnalyticsModels/RumSession.js +102 -19
- package/build/dist/Models/AnalyticsModels/RumSession.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/RumSessionChunk.js +11 -9
- package/build/dist/Models/AnalyticsModels/RumSessionChunk.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/AlertCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ApiKeyPermission.js +3 -27
- package/build/dist/Models/DatabaseModels/ApiKeyPermission.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/InventoryItemCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/InventoryItemCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/MonitorCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js +6 -6
- package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/StatusPageCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/TeamCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMember.js +0 -9
- package/build/dist/Models/DatabaseModels/TeamMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMemberCustomField.js +79 -3
- package/build/dist/Models/DatabaseModels/TeamMemberCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamPermission.js +3 -24
- package/build/dist/Models/DatabaseModels/TeamPermission.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js +267 -0
- package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTelegram.js +0 -4
- package/build/dist/Models/DatabaseModels/UserTelegram.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +769 -109
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserNotificationSettingAPI.js +35 -0
- package/build/dist/Server/API/UserNotificationSettingAPI.js.map +1 -0
- package/build/dist/Server/API/UserTelegramAPI.js +28 -6
- package/build/dist/Server/API/UserTelegramAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +29 -2
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791300000000-AddTelemetryIngestionKeyType.js +60 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791300000000-AddTelemetryIngestionKeyType.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791400000000-SessionReplayRecordEverySessionByDefault.js +53 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791400000000-SessionReplayRecordEverySessionByDefault.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791500000000-WidenCustomFieldDropdownOptions.js +82 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791500000000-WidenCustomFieldDropdownOptions.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791600000000-AddCustomFieldValueMapping.js +46 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791600000000-AddCustomFieldValueMapping.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/QueueWorker.js +19 -7
- package/build/dist/Server/Infrastructure/QueueWorker.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +1 -0
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +315 -8
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AccessTokenService.js +1 -0
- package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
- package/build/dist/Server/Services/AlertCustomFieldService.js +93 -0
- package/build/dist/Server/Services/AlertCustomFieldService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +34 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/ApiKeyPermissionService.js +331 -28
- package/build/dist/Server/Services/ApiKeyPermissionService.js.map +1 -1
- package/build/dist/Server/Services/CustomFieldMappingService.js +614 -0
- package/build/dist/Server/Services/CustomFieldMappingService.js.map +1 -0
- package/build/dist/Server/Services/GlobalConfigService.js +133 -0
- package/build/dist/Server/Services/GlobalConfigService.js.map +1 -1
- package/build/dist/Server/Services/IncidentCustomFieldService.js +93 -0
- package/build/dist/Server/Services/IncidentCustomFieldService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +32 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/MetricService.js +163 -0
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +29 -0
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +79 -27
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +22 -0
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/RoutineEmailSettingsService.js +69 -0
- package/build/dist/Server/Services/RoutineEmailSettingsService.js.map +1 -0
- package/build/dist/Server/Services/RumSessionReplayViewService.js +86 -24
- package/build/dist/Server/Services/RumSessionReplayViewService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceCustomFieldService.js +93 -0
- package/build/dist/Server/Services/ScheduledMaintenanceCustomFieldService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +29 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +62 -2
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/TeamPermissionService.js +166 -3
- package/build/dist/Server/Services/TeamPermissionService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryIngestionKeyService.js +562 -18
- package/build/dist/Server/Services/TelemetryIngestionKeyService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js +26 -6
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserTelegramService.js +257 -4
- package/build/dist/Server/Services/UserTelegramService.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/APIKey/AccessPermission.js +2 -2
- package/build/dist/Server/Utils/APIKey/AccessPermission.js.map +1 -1
- package/build/dist/Server/Utils/CustomField/CustomFieldDefinitionMappingHooks.js +27 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldDefinitionMappingHooks.js.map +1 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldMappingRegistry.js +226 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldMappingRegistry.js.map +1 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldMappingValidator.js +189 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldMappingValidator.js.map +1 -0
- package/build/dist/Server/Utils/DataSource/EgressGuard.js +121 -7
- package/build/dist/Server/Utils/DataSource/EgressGuard.js.map +1 -1
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js +38 -5
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js.map +1 -1
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js +44 -2
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js.map +1 -1
- package/build/dist/Server/Utils/FrontendEnvironment.js +33 -0
- package/build/dist/Server/Utils/FrontendEnvironment.js.map +1 -0
- package/build/dist/Server/Utils/LogRedaction.js +20 -0
- package/build/dist/Server/Utils/LogRedaction.js.map +1 -1
- package/build/dist/Server/Utils/Logger.js +10 -0
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js +287 -68
- package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js +20 -4
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +29 -6
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +88 -13
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +22 -6
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +22 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesContextEnricher.js +237 -0
- package/build/dist/Server/Utils/Monitor/SeriesContextEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SSRFProtection.js +136 -9
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js +174 -89
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayHealthCounters.js +223 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayHealthCounters.js.map +1 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js +945 -164
- package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +3 -14
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/TelegramVerificationToken.js +129 -0
- package/build/dist/Server/Utils/TelegramVerificationToken.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/PinServiceName.js +163 -0
- package/build/dist/Server/Utils/Telemetry/PinServiceName.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryFanInWriter.js +28 -15
- package/build/dist/Server/Utils/Telemetry/TelemetryFanInWriter.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.js +64 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyRateLimiter.js +171 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryIngestionKeyRateLimiter.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +780 -69
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Types/CustomField/CustomFieldMappingCatalog.js +60 -0
- package/build/dist/Types/CustomField/CustomFieldMappingCatalog.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldMappingSourceResource.js +20 -0
- package/build/dist/Types/CustomField/CustomFieldMappingSourceResource.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldValueMapping.js +141 -0
- package/build/dist/Types/CustomField/CustomFieldValueMapping.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/JSONFunctions.js +118 -37
- package/build/dist/Types/JSONFunctions.js.map +1 -1
- package/build/dist/Types/Monitor/CephAlertTemplates.js +130 -171
- package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +286 -121
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js +84 -105
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +250 -122
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/IotAlertTemplates.js +81 -81
- package/build/dist/Types/Monitor/IotAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +375 -215
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js +19 -19
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +104 -153
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +156 -91
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js +67 -6
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +38 -7
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +261 -0
- package/build/dist/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js.map +1 -0
- package/build/dist/Types/Monitor/RumAlertTemplates.js +46 -7
- package/build/dist/Types/Monitor/RumAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/SeriesContext/SeriesDebugHints.js +422 -0
- package/build/dist/Types/Monitor/SeriesContext/SeriesDebugHints.js.map +1 -0
- package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +441 -0
- package/build/dist/Types/Monitor/SeriesContext/SeriesLabelDisplay.js.map +1 -0
- package/build/dist/Types/Monitor/ServiceAlertTemplates.js +79 -15
- package/build/dist/Types/Monitor/ServiceAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/UptimeHistoryLabels.js +17 -0
- package/build/dist/Types/Monitor/UptimeHistoryLabels.js.map +1 -0
- package/build/dist/Types/NotificationSetting/RoutineEmailEvents.js +29 -0
- package/build/dist/Types/NotificationSetting/RoutineEmailEvents.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplay.js +117 -0
- package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplayApi.js +181 -0
- package/build/dist/Types/Rum/SessionReplayApi.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplayCaptureTrigger.js +21 -12
- package/build/dist/Types/Rum/SessionReplayCaptureTrigger.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplayConsentMode.js +11 -7
- package/build/dist/Types/Rum/SessionReplayConsentMode.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplayCustomEvents.js +172 -0
- package/build/dist/Types/Rum/SessionReplayCustomEvents.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplayHealth.js +37 -0
- package/build/dist/Types/Rum/SessionReplayHealth.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js +85 -0
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetryIngestionKeyPolicy.js +15 -0
- package/build/dist/Types/Telemetry/TelemetryIngestionKeyPolicy.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetryIngestionKeyType.js +30 -0
- package/build/dist/Types/Telemetry/TelemetryIngestionKeyType.js.map +1 -0
- package/build/dist/Types/WebsiteRequest.js +55 -3
- package/build/dist/Types/WebsiteRequest.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +13 -2
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +6 -2
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js +13 -2
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxis.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +15 -3
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +40 -9
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +186 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +80 -6
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/MapFromCustomFieldInput.js +118 -0
- package/build/dist/UI/Components/CustomFields/MapFromCustomFieldInput.js.map +1 -0
- package/build/dist/UI/Components/Graphs/DayUptimeGraph.js +112 -7
- package/build/dist/UI/Components/Graphs/DayUptimeGraph.js.map +1 -1
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js +5 -162
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js.map +1 -1
- package/build/dist/UI/Components/Graphs/UptimeDaySummary.js +181 -0
- package/build/dist/UI/Components/Graphs/UptimeDaySummary.js.map +1 -0
- package/build/dist/UI/Components/Header/Header.js +2 -3
- package/build/dist/UI/Components/Header/Header.js.map +1 -1
- package/build/dist/UI/Components/Header/IconDropdown/IconDropdownItem.js +2 -1
- package/build/dist/UI/Components/Header/IconDropdown/IconDropdownItem.js.map +1 -1
- package/build/dist/UI/Components/Header/IconDropdown/IconDropdownMenu.js +7 -1
- package/build/dist/UI/Components/Header/IconDropdown/IconDropdownMenu.js.map +1 -1
- package/build/dist/UI/Components/Header/ProjectPicker/ProjectPicker.js +7 -1
- package/build/dist/UI/Components/Header/ProjectPicker/ProjectPicker.js.map +1 -1
- package/build/dist/UI/Components/HeaderAlert/NotificationBell/NotificationBellDropdown.js +7 -1
- package/build/dist/UI/Components/HeaderAlert/NotificationBell/NotificationBellDropdown.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +5 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/JSONTable/JSONTable.js +2 -2
- package/build/dist/UI/Components/JSONTable/JSONTable.js.map +1 -1
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardShortcutsModal.js +35 -0
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardShortcutsModal.js.map +1 -0
- package/build/dist/UI/Components/Monitor/SeriesDebugCommandsViewer.js +34 -0
- package/build/dist/UI/Components/Monitor/SeriesDebugCommandsViewer.js.map +1 -0
- package/build/dist/UI/Components/Monitor/SeriesLabelsViewer.js +49 -0
- package/build/dist/UI/Components/Monitor/SeriesLabelsViewer.js.map +1 -0
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js +1 -1
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js.map +1 -1
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js +32 -6
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +38 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js +22 -1
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js.map +1 -1
- package/build/dist/UI/Components/Table/CellClassName.js +55 -0
- package/build/dist/UI/Components/Table/CellClassName.js.map +1 -0
- package/build/dist/UI/Components/Table/TableRow.js +16 -13
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/Table/TableSkeletonRows.js +9 -8
- package/build/dist/UI/Components/Table/TableSkeletonRows.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js +25 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +47 -30
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/NodePlacement.js +37 -0
- package/build/dist/UI/Components/Workflow/NodePlacement.js.map +1 -0
- package/build/dist/UI/Components/Workflow/Workflow.js +35 -18
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Config.js +10 -20
- package/build/dist/UI/Config.js.map +1 -1
- package/build/dist/UI/Utils/GlobalKeyboardShortcut.js +138 -0
- package/build/dist/UI/Utils/GlobalKeyboardShortcut.js.map +1 -0
- package/build/dist/UI/Utils/Telemetry/BrowserTelemetryConfig.js +14 -0
- package/build/dist/UI/Utils/Telemetry/BrowserTelemetryConfig.js.map +1 -0
- package/build/dist/UI/Utils/Telemetry/Telemetry.js +7 -5
- package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Utils/API.js +67 -5
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/HTTPResponseBodyReader.js +157 -0
- package/build/dist/Utils/HTTPResponseBodyReader.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveryScanStatus.js +69 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveryScanStatus.js.map +1 -0
- package/build/dist/Utils/Rum/ChunkMath.js +76 -0
- package/build/dist/Utils/Rum/ChunkMath.js.map +1 -1
- package/build/dist/Utils/Rum/SessionReplayHealth.js +534 -0
- package/build/dist/Utils/Rum/SessionReplayHealth.js.map +1 -0
- package/build/dist/Utils/Rum/SessionReplayStringMap.js +165 -0
- package/build/dist/Utils/Rum/SessionReplayStringMap.js.map +1 -0
- package/build/dist/Utils/Schema/ModelSchema.js +1 -0
- package/build/dist/Utils/Schema/ModelSchema.js.map +1 -1
- package/build/dist/Utils/StatusPage/ResourceSearch.js +200 -0
- package/build/dist/Utils/StatusPage/ResourceSearch.js.map +1 -0
- package/build/dist/Utils/Telemetry/OriginAllowList.js +299 -0
- package/build/dist/Utils/Telemetry/OriginAllowList.js.map +1 -0
- package/build/dist/Utils/Uptime/DayUptimeGraphUtil.js +147 -0
- package/build/dist/Utils/Uptime/DayUptimeGraphUtil.js.map +1 -0
- package/build/dist/Utils/ValueFormatter.js +32 -1
- package/build/dist/Utils/ValueFormatter.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import { fireEvent, render, screen, within } from "@testing-library/react";
|
|
3
|
+
/*
|
|
4
|
+
* See ReplayRail.test.tsx: react is pinned to Common's copy for every
|
|
5
|
+
* importer so Dashboard components render with the same React instance.
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { MemoryRouter } from "react-router-dom";
|
|
9
|
+
import { describe, expect, it } from "@jest/globals";
|
|
10
|
+
import Route from "../../../Types/API/Route";
|
|
11
|
+
import ReplayRailDetail, {
|
|
12
|
+
ReplayRailDetailProps,
|
|
13
|
+
ReplayRailLinks,
|
|
14
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Components/SessionReplay/Rail/ReplayRailDetail";
|
|
15
|
+
import {
|
|
16
|
+
ReplayBackendSignalsSlot,
|
|
17
|
+
ReplaySignal,
|
|
18
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Components/SessionReplay/Rail/ReplaySignalTypes";
|
|
19
|
+
import {
|
|
20
|
+
ReplayNetworkSignalDetail,
|
|
21
|
+
ReplaySpanSignalDetail,
|
|
22
|
+
ReplayTraceWaterfallSpan,
|
|
23
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Components/SessionReplay/Rail/ReplaySignals";
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The inline detail per row kind. Pinned: the "Backend for this request"
|
|
27
|
+
* block appears only when a loaded trace shares the request's traceId; the
|
|
28
|
+
* waterfall keeps span order and indents by depth and seeks on click; the
|
|
29
|
+
* log detail links to the explorer at the moment; the error detail links
|
|
30
|
+
* to the exception group; the click detail hands x,y to the stage.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const START_UNIX_MS: number = 1_725_000_000_000;
|
|
34
|
+
const TRACE_ID: string = "4bf92f3577b34da6a3ce929d0e0e4736";
|
|
35
|
+
|
|
36
|
+
function networkDetail(
|
|
37
|
+
overrides?: Partial<ReplayNetworkSignalDetail>,
|
|
38
|
+
): ReplayNetworkSignalDetail {
|
|
39
|
+
return {
|
|
40
|
+
method: "POST",
|
|
41
|
+
url: "https://api.example.com/api/orders",
|
|
42
|
+
origin: "https://api.example.com",
|
|
43
|
+
path: "/api/orders",
|
|
44
|
+
status: 500,
|
|
45
|
+
durationMs: 220,
|
|
46
|
+
responseBytes: 1229,
|
|
47
|
+
requestBytes: null,
|
|
48
|
+
initiator: "fetch",
|
|
49
|
+
traceId: TRACE_ID,
|
|
50
|
+
isError: true,
|
|
51
|
+
failedBeforeResponse: false,
|
|
52
|
+
aborted: false,
|
|
53
|
+
isCapMarker: false,
|
|
54
|
+
isSlow: false,
|
|
55
|
+
atUnixMs: null,
|
|
56
|
+
...overrides,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function networkSignal(
|
|
61
|
+
overrides?: Partial<ReplayNetworkSignalDetail>,
|
|
62
|
+
): ReplaySignal {
|
|
63
|
+
const detail: ReplayNetworkSignalDetail = networkDetail(overrides);
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
id: "rec:0:1",
|
|
67
|
+
kind: "network",
|
|
68
|
+
source: "recording",
|
|
69
|
+
offsetMs: 9000,
|
|
70
|
+
severity: "error",
|
|
71
|
+
title: "POST 500 /api/orders",
|
|
72
|
+
links: detail.traceId ? { traceId: detail.traceId } : {},
|
|
73
|
+
detail: detail,
|
|
74
|
+
alignment: "exact",
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function waterfallSpan(
|
|
79
|
+
overrides: Partial<ReplayTraceWaterfallSpan> & { spanId: string },
|
|
80
|
+
): ReplayTraceWaterfallSpan {
|
|
81
|
+
return {
|
|
82
|
+
parentSpanId: null,
|
|
83
|
+
name: `span ${overrides.spanId}`,
|
|
84
|
+
serviceName: "payment-svc",
|
|
85
|
+
depth: 0,
|
|
86
|
+
startOffsetMs: 0,
|
|
87
|
+
durationMs: 100,
|
|
88
|
+
hasError: false,
|
|
89
|
+
sessionOffsetMs: 9200,
|
|
90
|
+
...overrides,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function traceSignal(spans?: Array<ReplayTraceWaterfallSpan>): ReplaySignal {
|
|
95
|
+
const waterfall: Array<ReplayTraceWaterfallSpan> = spans || [
|
|
96
|
+
waterfallSpan({
|
|
97
|
+
spanId: "root",
|
|
98
|
+
name: "POST /api/orders",
|
|
99
|
+
durationMs: 300,
|
|
100
|
+
}),
|
|
101
|
+
waterfallSpan({
|
|
102
|
+
spanId: "child-a",
|
|
103
|
+
parentSpanId: "root",
|
|
104
|
+
name: "SELECT orders",
|
|
105
|
+
depth: 1,
|
|
106
|
+
startOffsetMs: 20,
|
|
107
|
+
durationMs: 60,
|
|
108
|
+
sessionOffsetMs: 9220,
|
|
109
|
+
}),
|
|
110
|
+
waterfallSpan({
|
|
111
|
+
spanId: "child-b",
|
|
112
|
+
parentSpanId: "child-a",
|
|
113
|
+
name: "charge card",
|
|
114
|
+
depth: 2,
|
|
115
|
+
startOffsetMs: 100,
|
|
116
|
+
durationMs: 150,
|
|
117
|
+
hasError: true,
|
|
118
|
+
sessionOffsetMs: 9300,
|
|
119
|
+
}),
|
|
120
|
+
];
|
|
121
|
+
const detail: ReplaySpanSignalDetail = {
|
|
122
|
+
traceId: TRACE_ID,
|
|
123
|
+
rootSpanId: "root",
|
|
124
|
+
rootName: "POST /api/orders",
|
|
125
|
+
serviceId: null,
|
|
126
|
+
serviceName: "payment-svc",
|
|
127
|
+
durationMs: 300,
|
|
128
|
+
spanCount: waterfall.length,
|
|
129
|
+
errorSpanCount: 1,
|
|
130
|
+
hasError: true,
|
|
131
|
+
startUnixMs: START_UNIX_MS + 9200,
|
|
132
|
+
baselineOffsetMs: 9200,
|
|
133
|
+
spans: waterfall,
|
|
134
|
+
isWaterfallTruncated: false,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
id: "span:root",
|
|
139
|
+
kind: "span",
|
|
140
|
+
source: "telemetry",
|
|
141
|
+
offsetMs: 9200,
|
|
142
|
+
endOffsetMs: 9500,
|
|
143
|
+
severity: "error",
|
|
144
|
+
title: "POST /api/orders",
|
|
145
|
+
subtitle: "payment-svc",
|
|
146
|
+
links: { traceId: TRACE_ID, spanId: "root" },
|
|
147
|
+
detail: detail,
|
|
148
|
+
alignment: "unanchored",
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function logSignal(overrides?: Partial<ReplaySignal>): ReplaySignal {
|
|
153
|
+
return {
|
|
154
|
+
id: "log:aaaaaaaaaaaaaaaaaaaaaaaa",
|
|
155
|
+
kind: "log",
|
|
156
|
+
source: "telemetry",
|
|
157
|
+
offsetMs: 9400,
|
|
158
|
+
severity: "error",
|
|
159
|
+
title: "[ERROR] charge failed: card_declined",
|
|
160
|
+
subtitle: "payment-svc",
|
|
161
|
+
links: { traceId: TRACE_ID, spanId: "child-b", logId: "aaaa" },
|
|
162
|
+
detail: {
|
|
163
|
+
body: "charge failed: card_declined",
|
|
164
|
+
level: "ERROR",
|
|
165
|
+
severityText: "Error",
|
|
166
|
+
severityNumber: 17,
|
|
167
|
+
serviceId: null,
|
|
168
|
+
serviceName: "payment-svc",
|
|
169
|
+
traceId: TRACE_ID,
|
|
170
|
+
spanId: "child-b",
|
|
171
|
+
timeUnixMs: START_UNIX_MS + 9400,
|
|
172
|
+
baselineOffsetMs: 9400,
|
|
173
|
+
},
|
|
174
|
+
alignment: "unanchored",
|
|
175
|
+
...overrides,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function clientErrorSignal(overrides?: Partial<ReplaySignal>): ReplaySignal {
|
|
180
|
+
return {
|
|
181
|
+
id: "rec:0:7",
|
|
182
|
+
kind: "client-error",
|
|
183
|
+
source: "recording",
|
|
184
|
+
offsetMs: 9500,
|
|
185
|
+
severity: "error",
|
|
186
|
+
title: "TypeError: cannot read total",
|
|
187
|
+
links: {},
|
|
188
|
+
detail: {
|
|
189
|
+
kind: "error",
|
|
190
|
+
message: "TypeError: cannot read total",
|
|
191
|
+
source: "https://app.example.com/app.js",
|
|
192
|
+
lineNumber: 12,
|
|
193
|
+
columnNumber: 5,
|
|
194
|
+
stack: "TypeError: cannot read total\n at render (app.js:12:5)",
|
|
195
|
+
location: "app.js:12:5",
|
|
196
|
+
atUnixMs: null,
|
|
197
|
+
},
|
|
198
|
+
alignment: "exact",
|
|
199
|
+
...overrides,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function serverErrorSignal(overrides?: Partial<ReplaySignal>): ReplaySignal {
|
|
204
|
+
return {
|
|
205
|
+
id: "exc:bbbbbbbbbbbbbbbbbbbbbbbb",
|
|
206
|
+
kind: "server-error",
|
|
207
|
+
source: "telemetry",
|
|
208
|
+
offsetMs: 9800,
|
|
209
|
+
severity: "error",
|
|
210
|
+
title: "ValueError: TypeError: cannot read total",
|
|
211
|
+
links: { traceId: TRACE_ID, exceptionFingerprint: "fp-123" },
|
|
212
|
+
detail: {
|
|
213
|
+
message: "TypeError: cannot read total",
|
|
214
|
+
exceptionType: null,
|
|
215
|
+
stackTrace: "Traceback...",
|
|
216
|
+
fingerprint: "fp-123",
|
|
217
|
+
serviceId: null,
|
|
218
|
+
serviceName: "payment-svc",
|
|
219
|
+
traceId: TRACE_ID,
|
|
220
|
+
spanId: null,
|
|
221
|
+
spanName: null,
|
|
222
|
+
timeUnixMs: START_UNIX_MS + 9800,
|
|
223
|
+
baselineOffsetMs: 9800,
|
|
224
|
+
},
|
|
225
|
+
alignment: "unanchored",
|
|
226
|
+
...overrides,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function clickSignal(): ReplaySignal {
|
|
231
|
+
return {
|
|
232
|
+
id: "rec:0:5",
|
|
233
|
+
kind: "interaction",
|
|
234
|
+
source: "recording",
|
|
235
|
+
offsetMs: 9100,
|
|
236
|
+
severity: "info",
|
|
237
|
+
title: 'click "Pay now"',
|
|
238
|
+
links: {},
|
|
239
|
+
detail: {
|
|
240
|
+
selector: "button.pay",
|
|
241
|
+
text: "Pay now",
|
|
242
|
+
x: 640,
|
|
243
|
+
y: 480,
|
|
244
|
+
isCoordinateOnly: false,
|
|
245
|
+
atUnixMs: null,
|
|
246
|
+
},
|
|
247
|
+
alignment: "exact",
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function navigationSignal(viewport: [number, number] | null): ReplaySignal {
|
|
252
|
+
return {
|
|
253
|
+
id: "rec:0:9",
|
|
254
|
+
kind: "navigation",
|
|
255
|
+
source: "recording",
|
|
256
|
+
offsetMs: 100,
|
|
257
|
+
severity: "info",
|
|
258
|
+
title: "/cart → /checkout",
|
|
259
|
+
links: {},
|
|
260
|
+
detail: {
|
|
261
|
+
from: "/cart",
|
|
262
|
+
to: "/checkout",
|
|
263
|
+
kind: viewport ? "full-load" : "pushState",
|
|
264
|
+
viewportWidth: viewport ? viewport[0] : null,
|
|
265
|
+
viewportHeight: viewport ? viewport[1] : null,
|
|
266
|
+
atUnixMs: null,
|
|
267
|
+
},
|
|
268
|
+
alignment: "exact",
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const links: ReplayRailLinks = {
|
|
273
|
+
traceView: (traceId: string): Route | null => {
|
|
274
|
+
return new Route(`/dashboard/p/traces/view/${traceId}`);
|
|
275
|
+
},
|
|
276
|
+
spanView: (traceId: string, spanId: string): Route | null => {
|
|
277
|
+
return new Route(`/dashboard/p/traces/view/${traceId}?spanId=${spanId}`);
|
|
278
|
+
},
|
|
279
|
+
exceptionGroup: (fingerprint: string): Route | null => {
|
|
280
|
+
return new Route(
|
|
281
|
+
`/dashboard/p/exceptions/unresolved?search=%40fingerprint%3A${fingerprint}`,
|
|
282
|
+
);
|
|
283
|
+
},
|
|
284
|
+
logsAtMoment: (offsetMs: number): Route | null => {
|
|
285
|
+
return new Route(`/dashboard/p/logs?at=${START_UNIX_MS + offsetMs}`);
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
interface RenderResult {
|
|
290
|
+
seeks: Array<number>;
|
|
291
|
+
selections: Array<string>;
|
|
292
|
+
stage: Array<[number, number]>;
|
|
293
|
+
traceFilters: Array<string>;
|
|
294
|
+
loads: Array<string>;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function renderDetail(
|
|
298
|
+
signal: ReplaySignal,
|
|
299
|
+
options?: {
|
|
300
|
+
signals?: Array<ReplaySignal>;
|
|
301
|
+
spanSlot?: ReplayBackendSignalsSlot | null;
|
|
302
|
+
withShowOnStage?: boolean;
|
|
303
|
+
linksOverride?: ReplayRailLinks;
|
|
304
|
+
},
|
|
305
|
+
): RenderResult {
|
|
306
|
+
const result: RenderResult = {
|
|
307
|
+
seeks: [],
|
|
308
|
+
selections: [],
|
|
309
|
+
stage: [],
|
|
310
|
+
traceFilters: [],
|
|
311
|
+
loads: [],
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
const props: ReplayRailDetailProps = {
|
|
315
|
+
signal: signal,
|
|
316
|
+
signals: options?.signals || [signal],
|
|
317
|
+
links: options?.linksOverride || links,
|
|
318
|
+
spanSlot: options?.spanSlot,
|
|
319
|
+
onLoadBackend: (kind: string): void => {
|
|
320
|
+
result.loads.push(kind);
|
|
321
|
+
},
|
|
322
|
+
onSeek: (offsetMs: number): void => {
|
|
323
|
+
result.seeks.push(offsetMs);
|
|
324
|
+
},
|
|
325
|
+
onSelectSignal: (id: string): void => {
|
|
326
|
+
result.selections.push(id);
|
|
327
|
+
},
|
|
328
|
+
onShowOnStage:
|
|
329
|
+
options?.withShowOnStage === false
|
|
330
|
+
? undefined
|
|
331
|
+
: (x: number, y: number): void => {
|
|
332
|
+
result.stage.push([x, y]);
|
|
333
|
+
},
|
|
334
|
+
onFilterLogsByTrace: (traceId: string): void => {
|
|
335
|
+
result.traceFilters.push(traceId);
|
|
336
|
+
},
|
|
337
|
+
onClose: (): void => {
|
|
338
|
+
return;
|
|
339
|
+
},
|
|
340
|
+
startTimeUnixMs: START_UNIX_MS,
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
render(
|
|
344
|
+
<MemoryRouter>
|
|
345
|
+
<ReplayRailDetail {...props} />
|
|
346
|
+
</MemoryRouter>,
|
|
347
|
+
);
|
|
348
|
+
|
|
349
|
+
return result;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function hrefOf(element: HTMLElement): string {
|
|
353
|
+
return (element.closest("a") as HTMLAnchorElement).getAttribute("href") || "";
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
describe("ReplayRailDetail network", () => {
|
|
357
|
+
it("renders the backend block only when a loaded trace shares the traceId", () => {
|
|
358
|
+
const request: ReplaySignal = networkSignal();
|
|
359
|
+
|
|
360
|
+
renderDetail(request, {
|
|
361
|
+
signals: [request, traceSignal(), logSignal()],
|
|
362
|
+
spanSlot: {
|
|
363
|
+
status: "ready",
|
|
364
|
+
rowCount: 3,
|
|
365
|
+
isTruncated: false,
|
|
366
|
+
fetchedAtUnixMs: START_UNIX_MS,
|
|
367
|
+
},
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
const block: HTMLElement = screen.getByTestId("rail-backend-block");
|
|
371
|
+
|
|
372
|
+
expect(block).toHaveTextContent("POST /api/orders");
|
|
373
|
+
expect(block).toHaveTextContent("payment-svc");
|
|
374
|
+
expect(block).toHaveTextContent("300ms");
|
|
375
|
+
expect(block).toHaveTextContent("error in 1 of 3 spans");
|
|
376
|
+
/* The error log on that trace is listed and jumps to its row. */
|
|
377
|
+
expect(block).toHaveTextContent("charge failed: card_declined");
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
it("says the trace is not loaded and offers to load it when the slot is idle", () => {
|
|
381
|
+
const request: ReplaySignal = networkSignal();
|
|
382
|
+
const result: RenderResult = renderDetail(request, {
|
|
383
|
+
signals: [request],
|
|
384
|
+
spanSlot: {
|
|
385
|
+
status: "idle",
|
|
386
|
+
rowCount: null,
|
|
387
|
+
isTruncated: false,
|
|
388
|
+
fetchedAtUnixMs: null,
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
expect(screen.queryByTestId("rail-backend-block")).not.toBeInTheDocument();
|
|
393
|
+
expect(
|
|
394
|
+
screen.getByText("Backend traces are not loaded yet."),
|
|
395
|
+
).toBeInTheDocument();
|
|
396
|
+
|
|
397
|
+
fireEvent.click(screen.getByTestId("rail-load-traces"));
|
|
398
|
+
|
|
399
|
+
expect(result.loads).toEqual(["span"]);
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
it("explains a loaded trace set that does not carry the request's trace id", () => {
|
|
403
|
+
const request: ReplaySignal = networkSignal();
|
|
404
|
+
|
|
405
|
+
renderDetail(request, {
|
|
406
|
+
signals: [request],
|
|
407
|
+
spanSlot: {
|
|
408
|
+
status: "ready",
|
|
409
|
+
rowCount: 0,
|
|
410
|
+
isTruncated: false,
|
|
411
|
+
fetchedAtUnixMs: START_UNIX_MS,
|
|
412
|
+
},
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
expect(screen.queryByTestId("rail-backend-block")).not.toBeInTheDocument();
|
|
416
|
+
expect(
|
|
417
|
+
screen.getByText(/No span in the loaded traces carries trace/),
|
|
418
|
+
).toBeInTheDocument();
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
it("renders no backend block at all for a request without a trace id", () => {
|
|
422
|
+
renderDetail(networkSignal({ traceId: null }));
|
|
423
|
+
|
|
424
|
+
expect(
|
|
425
|
+
screen.queryByText("Backend for this request"),
|
|
426
|
+
).not.toBeInTheDocument();
|
|
427
|
+
expect(screen.queryByTestId("rail-link-trace")).not.toBeInTheDocument();
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
it("shows the request facts, explains a status 0, and says what is never recorded", () => {
|
|
431
|
+
renderDetail(
|
|
432
|
+
networkSignal({
|
|
433
|
+
status: 0,
|
|
434
|
+
failedBeforeResponse: true,
|
|
435
|
+
durationMs: null,
|
|
436
|
+
responseBytes: null,
|
|
437
|
+
traceId: null,
|
|
438
|
+
}),
|
|
439
|
+
);
|
|
440
|
+
|
|
441
|
+
expect(
|
|
442
|
+
screen.getByText(
|
|
443
|
+
/failed before a response \(offline, DNS or blocked by CORS\)/,
|
|
444
|
+
),
|
|
445
|
+
).toBeInTheDocument();
|
|
446
|
+
expect(screen.getByText("not measured")).toBeInTheDocument();
|
|
447
|
+
expect(screen.getByText(/response size not measured/)).toBeInTheDocument();
|
|
448
|
+
expect(
|
|
449
|
+
screen.getByText("Bodies and headers are never recorded."),
|
|
450
|
+
).toBeInTheDocument();
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
it("links to the trace view", () => {
|
|
454
|
+
renderDetail(networkSignal());
|
|
455
|
+
|
|
456
|
+
expect(hrefOf(screen.getByTestId("rail-link-trace"))).toContain(
|
|
457
|
+
`/traces/view/${TRACE_ID}`,
|
|
458
|
+
);
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
describe("ReplayRailDetail trace waterfall", () => {
|
|
463
|
+
it("keeps span order, indents by depth and seeks to a span on click", () => {
|
|
464
|
+
const result: RenderResult = renderDetail(traceSignal());
|
|
465
|
+
|
|
466
|
+
const spans: Array<HTMLElement> = screen.getAllByTestId(
|
|
467
|
+
"rail-waterfall-span",
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
expect(spans).toHaveLength(3);
|
|
471
|
+
expect(spans[0]).toHaveTextContent("POST /api/orders");
|
|
472
|
+
expect(spans[1]).toHaveTextContent("SELECT orders");
|
|
473
|
+
expect(spans[2]).toHaveTextContent("charge card");
|
|
474
|
+
expect(spans[0]).toHaveStyle({ paddingLeft: "0px" });
|
|
475
|
+
expect(spans[1]).toHaveStyle({ paddingLeft: "10px" });
|
|
476
|
+
expect(spans[2]).toHaveStyle({ paddingLeft: "20px" });
|
|
477
|
+
|
|
478
|
+
fireEvent.click(within(spans[2] as HTMLElement).getByRole("button"));
|
|
479
|
+
|
|
480
|
+
expect(result.seeks).toEqual([9300]);
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
it("offers Logs for this trace and the trace link", () => {
|
|
484
|
+
const result: RenderResult = renderDetail(traceSignal());
|
|
485
|
+
|
|
486
|
+
fireEvent.click(screen.getByTestId("rail-logs-for-trace"));
|
|
487
|
+
|
|
488
|
+
expect(result.traceFilters).toEqual([TRACE_ID]);
|
|
489
|
+
expect(hrefOf(screen.getByTestId("rail-link-trace"))).toContain(TRACE_ID);
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
it("says when the waterfall is cut off", () => {
|
|
493
|
+
const signal: ReplaySignal = traceSignal();
|
|
494
|
+
|
|
495
|
+
(signal.detail as ReplaySpanSignalDetail).isWaterfallTruncated = true;
|
|
496
|
+
(signal.detail as ReplaySpanSignalDetail).spanCount = 80;
|
|
497
|
+
|
|
498
|
+
renderDetail(signal);
|
|
499
|
+
|
|
500
|
+
expect(
|
|
501
|
+
screen.getByText(/Showing the first 3 of 80 spans/),
|
|
502
|
+
).toBeInTheDocument();
|
|
503
|
+
});
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
describe("ReplayRailDetail log", () => {
|
|
507
|
+
it("links to the logs explorer at this moment and to the trace and span", () => {
|
|
508
|
+
renderDetail(logSignal());
|
|
509
|
+
|
|
510
|
+
expect(hrefOf(screen.getByTestId("rail-link-logs-at-moment"))).toContain(
|
|
511
|
+
`at=${START_UNIX_MS + 9400}`,
|
|
512
|
+
);
|
|
513
|
+
expect(hrefOf(screen.getByTestId("rail-link-trace"))).toContain(TRACE_ID);
|
|
514
|
+
expect(hrefOf(screen.getByTestId("rail-link-span"))).toContain(
|
|
515
|
+
"spanId=child-b",
|
|
516
|
+
);
|
|
517
|
+
expect(
|
|
518
|
+
screen.getByText("charge failed: card_declined"),
|
|
519
|
+
).toBeInTheDocument();
|
|
520
|
+
expect(screen.getByText("payment-svc")).toBeInTheDocument();
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
it("omits the explorer link when the builder has no moment to offer", () => {
|
|
524
|
+
renderDetail(logSignal(), {
|
|
525
|
+
linksOverride: {
|
|
526
|
+
...links,
|
|
527
|
+
logsAtMoment: (): Route | null => {
|
|
528
|
+
return null;
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
expect(
|
|
534
|
+
screen.queryByTestId("rail-link-logs-at-moment"),
|
|
535
|
+
).not.toBeInTheDocument();
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
it("labels server-stamped placement honestly", () => {
|
|
539
|
+
renderDetail(logSignal());
|
|
540
|
+
|
|
541
|
+
expect(screen.getByTestId("rail-detail")).toHaveTextContent(
|
|
542
|
+
"server-stamped, unanchored",
|
|
543
|
+
);
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
describe("ReplayRailDetail errors", () => {
|
|
548
|
+
it("shows the stack, the location and the exception group link for a server error", () => {
|
|
549
|
+
renderDetail(serverErrorSignal());
|
|
550
|
+
|
|
551
|
+
expect(hrefOf(screen.getByTestId("rail-link-exception-group"))).toContain(
|
|
552
|
+
"fingerprint%3Afp-123",
|
|
553
|
+
);
|
|
554
|
+
expect(hrefOf(screen.getByTestId("rail-link-trace"))).toContain(TRACE_ID);
|
|
555
|
+
expect(screen.getByText("Traceback...")).toBeInTheDocument();
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
it("gives a client error its location and stack, and no group link of its own", () => {
|
|
559
|
+
renderDetail(clientErrorSignal());
|
|
560
|
+
|
|
561
|
+
expect(screen.getByText("app.js:12:5")).toBeInTheDocument();
|
|
562
|
+
expect(screen.getByText(/at render \(app.js:12:5\)/)).toBeInTheDocument();
|
|
563
|
+
expect(
|
|
564
|
+
screen.queryByTestId("rail-link-exception-group"),
|
|
565
|
+
).not.toBeInTheDocument();
|
|
566
|
+
expect(screen.getByText("uncaught error")).toBeInTheDocument();
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
it("links a client error to its server counterpart and borrows the group link", () => {
|
|
570
|
+
const client: ReplaySignal = clientErrorSignal();
|
|
571
|
+
const server: ReplaySignal = serverErrorSignal();
|
|
572
|
+
const result: RenderResult = renderDetail(client, {
|
|
573
|
+
signals: [client, server],
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
const counterpart: HTMLElement = screen.getByTestId(
|
|
577
|
+
"rail-error-counterpart",
|
|
578
|
+
);
|
|
579
|
+
|
|
580
|
+
expect(counterpart).toHaveTextContent(
|
|
581
|
+
"also reported server-side at 0:09.8",
|
|
582
|
+
);
|
|
583
|
+
expect(hrefOf(screen.getByTestId("rail-link-exception-group"))).toContain(
|
|
584
|
+
"fp-123",
|
|
585
|
+
);
|
|
586
|
+
|
|
587
|
+
fireEvent.click(counterpart);
|
|
588
|
+
|
|
589
|
+
expect(result.selections).toEqual([server.id]);
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
it("says when no stack reached the recorder rather than showing an empty block", () => {
|
|
593
|
+
renderDetail(
|
|
594
|
+
clientErrorSignal({
|
|
595
|
+
detail: {
|
|
596
|
+
kind: "error",
|
|
597
|
+
message: "Script error.",
|
|
598
|
+
source: null,
|
|
599
|
+
lineNumber: null,
|
|
600
|
+
columnNumber: null,
|
|
601
|
+
stack: null,
|
|
602
|
+
location: null,
|
|
603
|
+
atUnixMs: null,
|
|
604
|
+
},
|
|
605
|
+
}),
|
|
606
|
+
);
|
|
607
|
+
|
|
608
|
+
expect(
|
|
609
|
+
screen.getByText(/No stack trace reached the recorder/),
|
|
610
|
+
).toBeInTheDocument();
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
describe("ReplayRailDetail interactions", () => {
|
|
615
|
+
it("hands the click's coordinates to the stage", () => {
|
|
616
|
+
const result: RenderResult = renderDetail(clickSignal());
|
|
617
|
+
|
|
618
|
+
expect(screen.getByText("button.pay")).toBeInTheDocument();
|
|
619
|
+
expect(screen.getByText("Pay now")).toBeInTheDocument();
|
|
620
|
+
expect(screen.getByText("640, 480")).toBeInTheDocument();
|
|
621
|
+
|
|
622
|
+
fireEvent.click(screen.getByTestId("rail-show-on-stage"));
|
|
623
|
+
|
|
624
|
+
expect(result.stage).toEqual([[640, 480]]);
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
it("hides Show on stage when the stage cannot flash a ring", () => {
|
|
628
|
+
renderDetail(clickSignal(), { withShowOnStage: false });
|
|
629
|
+
|
|
630
|
+
expect(screen.queryByTestId("rail-show-on-stage")).not.toBeInTheDocument();
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
it("cross-references the error that followed the click", () => {
|
|
634
|
+
const click: ReplaySignal = clickSignal();
|
|
635
|
+
const error: ReplaySignal = clientErrorSignal();
|
|
636
|
+
const result: RenderResult = renderDetail(click, {
|
|
637
|
+
signals: [click, error],
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
const link: HTMLElement = screen.getByTestId("rail-error-after-click");
|
|
641
|
+
|
|
642
|
+
expect(link).toHaveTextContent("error 400ms after this click");
|
|
643
|
+
|
|
644
|
+
fireEvent.click(link);
|
|
645
|
+
|
|
646
|
+
expect(result.selections).toEqual([error.id]);
|
|
647
|
+
});
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
describe("ReplayRailDetail navigation", () => {
|
|
651
|
+
it("renders the viewport for a full load and nothing for a history route", () => {
|
|
652
|
+
const { unmount } = render(
|
|
653
|
+
<MemoryRouter>
|
|
654
|
+
<ReplayRailDetail
|
|
655
|
+
signal={navigationSignal([1440, 900])}
|
|
656
|
+
signals={[navigationSignal([1440, 900])]}
|
|
657
|
+
links={links}
|
|
658
|
+
onSeek={(): void => {
|
|
659
|
+
return;
|
|
660
|
+
}}
|
|
661
|
+
onSelectSignal={(): void => {
|
|
662
|
+
return;
|
|
663
|
+
}}
|
|
664
|
+
onClose={(): void => {
|
|
665
|
+
return;
|
|
666
|
+
}}
|
|
667
|
+
startTimeUnixMs={START_UNIX_MS}
|
|
668
|
+
/>
|
|
669
|
+
</MemoryRouter>,
|
|
670
|
+
);
|
|
671
|
+
|
|
672
|
+
expect(screen.getByText("Viewport")).toBeInTheDocument();
|
|
673
|
+
expect(screen.getByText("1440x900")).toBeInTheDocument();
|
|
674
|
+
expect(screen.getByText("full page load")).toBeInTheDocument();
|
|
675
|
+
|
|
676
|
+
unmount();
|
|
677
|
+
|
|
678
|
+
renderDetail(navigationSignal(null));
|
|
679
|
+
|
|
680
|
+
expect(screen.queryByText("Viewport")).not.toBeInTheDocument();
|
|
681
|
+
expect(screen.getByText("history pushState")).toBeInTheDocument();
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
it("joins the page's vitals by time", () => {
|
|
685
|
+
const navigation: ReplaySignal = navigationSignal(null);
|
|
686
|
+
const vital: ReplaySignal = {
|
|
687
|
+
id: "rec:0:20",
|
|
688
|
+
kind: "performance",
|
|
689
|
+
source: "recording",
|
|
690
|
+
offsetMs: 4800,
|
|
691
|
+
severity: "warn",
|
|
692
|
+
title: "LCP 4.8s",
|
|
693
|
+
subtitle: "poor",
|
|
694
|
+
links: {},
|
|
695
|
+
detail: {},
|
|
696
|
+
alignment: "exact",
|
|
697
|
+
};
|
|
698
|
+
const later: ReplaySignal = {
|
|
699
|
+
...navigationSignal(null),
|
|
700
|
+
id: "rec:1:1",
|
|
701
|
+
offsetMs: 20_000,
|
|
702
|
+
};
|
|
703
|
+
const afterLater: ReplaySignal = {
|
|
704
|
+
...vital,
|
|
705
|
+
id: "rec:1:2",
|
|
706
|
+
offsetMs: 25_000,
|
|
707
|
+
title: "INP 320ms",
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
renderDetail(navigation, {
|
|
711
|
+
signals: [navigation, vital, later, afterLater],
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
expect(screen.getByText(/LCP 4.8s/)).toBeInTheDocument();
|
|
715
|
+
expect(screen.queryByText(/INP 320ms/)).not.toBeInTheDocument();
|
|
716
|
+
});
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
/*
|
|
720
|
+
* Recorder notices in the detail. None of these is a failure, and the
|
|
721
|
+
* detail used to render all of them as one: a cancelled request as
|
|
722
|
+
* "failed before a response", the network cap marker as a request with no
|
|
723
|
+
* url, a resource failure as an ordinary uncaught error, and the raw word
|
|
724
|
+
* "resource" as its kind (ux-05, ux-06).
|
|
725
|
+
*/
|
|
726
|
+
describe("ReplayRailDetail recorder notices", () => {
|
|
727
|
+
it("calls a cancelled request cancelled, not failed", () => {
|
|
728
|
+
renderDetail(
|
|
729
|
+
networkSignal({
|
|
730
|
+
status: 0,
|
|
731
|
+
aborted: true,
|
|
732
|
+
isError: false,
|
|
733
|
+
failedBeforeResponse: false,
|
|
734
|
+
durationMs: 40,
|
|
735
|
+
}),
|
|
736
|
+
);
|
|
737
|
+
|
|
738
|
+
expect(screen.getByText(/cancelled by the page/)).toBeInTheDocument();
|
|
739
|
+
expect(screen.queryByText(/failed before a response/)).toBeNull();
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
it("explains the network cap marker instead of drawing an empty request", () => {
|
|
743
|
+
renderDetail(
|
|
744
|
+
networkSignal({
|
|
745
|
+
method: "",
|
|
746
|
+
url: "",
|
|
747
|
+
origin: "",
|
|
748
|
+
path: "",
|
|
749
|
+
status: 0,
|
|
750
|
+
isError: false,
|
|
751
|
+
isCapMarker: true,
|
|
752
|
+
durationMs: null,
|
|
753
|
+
responseBytes: null,
|
|
754
|
+
traceId: null,
|
|
755
|
+
}),
|
|
756
|
+
);
|
|
757
|
+
|
|
758
|
+
expect(
|
|
759
|
+
screen.getByText(/records at most 500 requests per session/),
|
|
760
|
+
).toBeInTheDocument();
|
|
761
|
+
expect(screen.queryByText(/HTTP 0/)).toBeNull();
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
it("names a resource failure in words and says it is not counted as an error", () => {
|
|
765
|
+
renderDetail(
|
|
766
|
+
clientErrorSignal({
|
|
767
|
+
severity: "warn",
|
|
768
|
+
title: "Resource failed to load: <img> /logo.png",
|
|
769
|
+
detail: {
|
|
770
|
+
kind: "resource",
|
|
771
|
+
message: "Resource failed to load: <img>",
|
|
772
|
+
source: "https://cdn.example.com/logo.png",
|
|
773
|
+
lineNumber: null,
|
|
774
|
+
columnNumber: null,
|
|
775
|
+
stack: null,
|
|
776
|
+
location: null,
|
|
777
|
+
tagName: "img",
|
|
778
|
+
isRepeat: false,
|
|
779
|
+
occurrences: null,
|
|
780
|
+
isCapMarker: false,
|
|
781
|
+
atUnixMs: null,
|
|
782
|
+
},
|
|
783
|
+
}),
|
|
784
|
+
);
|
|
785
|
+
|
|
786
|
+
expect(screen.getByText("resource failed to load")).toBeInTheDocument();
|
|
787
|
+
expect(screen.getAllByText(/<img>/).length).toBeGreaterThan(0);
|
|
788
|
+
expect(screen.getByText(/Next error steps past it/)).toBeInTheDocument();
|
|
789
|
+
/* Never the wrong explanation for a missing stack. */
|
|
790
|
+
expect(screen.queryByText(/cross-origin scripts hide theirs/)).toBeNull();
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
it("quantifies a repeated error", () => {
|
|
794
|
+
renderDetail(
|
|
795
|
+
clientErrorSignal({
|
|
796
|
+
detail: {
|
|
797
|
+
kind: "error",
|
|
798
|
+
message: "TypeError: cannot read total",
|
|
799
|
+
source: null,
|
|
800
|
+
lineNumber: null,
|
|
801
|
+
columnNumber: null,
|
|
802
|
+
stack: null,
|
|
803
|
+
location: null,
|
|
804
|
+
tagName: null,
|
|
805
|
+
isRepeat: true,
|
|
806
|
+
occurrences: 2400,
|
|
807
|
+
isCapMarker: false,
|
|
808
|
+
atUnixMs: null,
|
|
809
|
+
},
|
|
810
|
+
}),
|
|
811
|
+
);
|
|
812
|
+
|
|
813
|
+
expect(
|
|
814
|
+
screen.getByText("seen 2400 times so far this session"),
|
|
815
|
+
).toBeInTheDocument();
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
it("says where error capture stopped", () => {
|
|
819
|
+
renderDetail(
|
|
820
|
+
clientErrorSignal({
|
|
821
|
+
severity: "warn",
|
|
822
|
+
detail: {
|
|
823
|
+
kind: "error",
|
|
824
|
+
message: "Error capture stopped after 100 distinct errors",
|
|
825
|
+
source: null,
|
|
826
|
+
lineNumber: null,
|
|
827
|
+
columnNumber: null,
|
|
828
|
+
stack: null,
|
|
829
|
+
location: null,
|
|
830
|
+
tagName: null,
|
|
831
|
+
isRepeat: false,
|
|
832
|
+
occurrences: null,
|
|
833
|
+
isCapMarker: true,
|
|
834
|
+
atUnixMs: null,
|
|
835
|
+
},
|
|
836
|
+
}),
|
|
837
|
+
);
|
|
838
|
+
|
|
839
|
+
expect(screen.getByText("recorder notice")).toBeInTheDocument();
|
|
840
|
+
expect(
|
|
841
|
+
screen.getByText(/errors after this point are missing/i),
|
|
842
|
+
).toBeInTheDocument();
|
|
843
|
+
});
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
/* ux-17: the detail spells out measures and ratings. */
|
|
847
|
+
describe("ReplayRailDetail performance wording", () => {
|
|
848
|
+
function performanceSignal(detail: Record<string, unknown>): ReplaySignal {
|
|
849
|
+
return {
|
|
850
|
+
id: "rec:0:9",
|
|
851
|
+
kind: "performance",
|
|
852
|
+
source: "recording",
|
|
853
|
+
offsetMs: 4800,
|
|
854
|
+
severity: "warn",
|
|
855
|
+
title: "LCP 4.8s needs improvement",
|
|
856
|
+
links: {},
|
|
857
|
+
detail: detail,
|
|
858
|
+
alignment: "exact",
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
it("renders the rating in words", () => {
|
|
863
|
+
renderDetail(
|
|
864
|
+
performanceSignal({
|
|
865
|
+
kind: "web-vital",
|
|
866
|
+
durationMs: null,
|
|
867
|
+
budgetMs: null,
|
|
868
|
+
isOverBudget: true,
|
|
869
|
+
metric: "LCP",
|
|
870
|
+
value: 4800,
|
|
871
|
+
rating: "needs-improvement",
|
|
872
|
+
url: null,
|
|
873
|
+
atUnixMs: null,
|
|
874
|
+
}),
|
|
875
|
+
);
|
|
876
|
+
|
|
877
|
+
expect(screen.getByText("needs improvement")).toBeInTheDocument();
|
|
878
|
+
expect(screen.queryByText("needs-improvement")).toBeNull();
|
|
879
|
+
expect(screen.getByText("LCP")).toBeInTheDocument();
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
it("names a budget kind in words rather than its enum value", () => {
|
|
883
|
+
renderDetail(
|
|
884
|
+
performanceSignal({
|
|
885
|
+
kind: "long-task",
|
|
886
|
+
durationMs: 320,
|
|
887
|
+
budgetMs: 200,
|
|
888
|
+
isOverBudget: true,
|
|
889
|
+
metric: null,
|
|
890
|
+
value: null,
|
|
891
|
+
rating: null,
|
|
892
|
+
url: null,
|
|
893
|
+
atUnixMs: null,
|
|
894
|
+
}),
|
|
895
|
+
);
|
|
896
|
+
|
|
897
|
+
expect(screen.getByText("Long task")).toBeInTheDocument();
|
|
898
|
+
expect(screen.queryByText("long-task")).toBeNull();
|
|
899
|
+
});
|
|
900
|
+
});
|