@oneuptime/common 13.0.4 → 13.0.6
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/AuditLog.ts +81 -1
- package/Models/AnalyticsModels/SecurityEvent.ts +4 -4
- package/Models/DatabaseModels/Alert.ts +62 -0
- package/Models/DatabaseModels/GlobalConfig.ts +1 -1
- package/Models/DatabaseModels/Incident.ts +66 -0
- package/Models/DatabaseModels/IncidentEpisodePublicNote.ts +74 -0
- package/Models/DatabaseModels/IncidentPublicNote.ts +74 -0
- package/Models/DatabaseModels/Index.ts +10 -4
- package/Models/DatabaseModels/NetworkDevice.ts +67 -0
- package/Models/DatabaseModels/NetworkDeviceDiagnostic.ts +746 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +151 -0
- package/Models/DatabaseModels/NetworkSiteAssignmentRule.ts +1 -1
- package/Models/DatabaseModels/Project.ts +41 -0
- package/Models/DatabaseModels/RumApplication.ts +1 -1
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.ts +74 -0
- package/Models/DatabaseModels/{GoogleSecOpsConnection.ts → SecurityEventConnection.ts} +61 -51
- package/Models/DatabaseModels/{GoogleSecOpsConnectionRun.ts → SecurityEventConnectionRun.ts} +24 -24
- package/Models/DatabaseModels/ServiceLevelObjective.ts +185 -8
- package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.ts +746 -43
- package/Models/DatabaseModels/ServiceLevelObjectiveFeed.ts +575 -0
- package/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.ts +582 -0
- package/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.ts +16 -0
- package/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.ts +16 -0
- package/Models/DatabaseModels/StatusPageAnnouncement.ts +75 -0
- package/Models/DatabaseModels/TelemetryIngestionKey.ts +2 -2
- package/Models/DatabaseModels/ThreatIntelFeed.ts +1 -1
- package/Server/API/AIInvestigationAPI.ts +484 -24
- package/Server/API/BaseAPI.ts +17 -0
- package/Server/API/BillingInvoiceAPI.ts +343 -30
- package/Server/API/BillingPaymentMethodAPI.ts +126 -5
- package/Server/API/DashboardAPI.ts +96 -2
- package/Server/API/SecurityEventConnectionAPI.ts +380 -0
- package/Server/API/StatusPageAPI.ts +308 -199
- package/Server/API/TelemetryAPI.ts +402 -265
- package/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.ts +99 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.ts +83 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.ts +36 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.ts +516 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.ts +98 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.ts +27 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Middleware/TelemetryIngest.ts +101 -6
- package/Server/Services/AlertEpisodeLabelRuleEngineService.ts +138 -67
- package/Server/Services/AlertEpisodeOwnerRuleEngineService.ts +213 -84
- package/Server/Services/AlertEpisodePrivacyRuleEngineService.ts +112 -35
- package/Server/Services/AlertLabelRuleEngineService.ts +299 -217
- package/Server/Services/AlertOwnerRuleEngineService.ts +572 -396
- package/Server/Services/AlertPrivacyRuleEngineService.ts +116 -40
- package/Server/Services/AlertService.ts +111 -4
- package/Server/Services/AuditLogService.ts +612 -59
- package/Server/Services/BillingInvoiceService.ts +112 -102
- package/Server/Services/BillingService.ts +539 -11
- package/Server/Services/CephClusterLabelRuleEngineService.ts +170 -109
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +233 -115
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +163 -100
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +236 -115
- package/Server/Services/DashboardLabelRuleEngineService.ts +145 -84
- package/Server/Services/DashboardOwnerRuleEngineService.ts +213 -95
- package/Server/Services/DatabaseService.ts +171 -21
- package/Server/Services/DockerHostLabelRuleEngineService.ts +171 -110
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +233 -115
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +181 -112
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +243 -118
- package/Server/Services/ExceptionAggregationService.ts +7 -16
- package/Server/Services/HostLabelRuleEngineService.ts +167 -106
- package/Server/Services/HostOwnerRuleEngineService.ts +229 -111
- package/Server/Services/IncidentEpisodeLabelRuleEngineService.ts +141 -67
- package/Server/Services/IncidentEpisodeOwnerRuleEngineService.ts +272 -72
- package/Server/Services/IncidentEpisodePrivacyRuleEngineService.ts +112 -35
- package/Server/Services/IncidentEpisodePublicNoteService.ts +24 -0
- package/Server/Services/IncidentLabelRuleEngineService.ts +279 -204
- package/Server/Services/IncidentOwnerRuleEngineService.ts +595 -425
- package/Server/Services/IncidentPrivacyRuleEngineService.ts +117 -44
- package/Server/Services/IncidentPublicNoteService.ts +24 -0
- package/Server/Services/IncidentService.ts +114 -3
- package/Server/Services/IncomingCallPolicyLabelRuleEngineService.ts +147 -83
- package/Server/Services/IncomingCallPolicyOwnerRuleEngineService.ts +221 -100
- package/Server/Services/Index.ts +10 -4
- package/Server/Services/InventoryItemService.ts +28 -0
- package/Server/Services/IoTFleetLabelRuleEngineService.ts +145 -84
- package/Server/Services/IoTFleetOwnerRuleEngineService.ts +213 -95
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +181 -112
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +243 -118
- package/Server/Services/LabelService.ts +23 -28
- package/Server/Services/LogAggregationService.ts +17 -23
- package/Server/Services/MetricAggregationService.ts +4 -14
- package/Server/Services/MonitorLabelRuleEngineService.ts +152 -92
- package/Server/Services/MonitorOwnerRuleEngineService.ts +220 -104
- package/Server/Services/MonitorProbeService.ts +20 -2
- package/Server/Services/MonitorService.ts +11 -9
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +376 -5
- package/Server/Services/NetworkDeviceDiagnosticService.ts +417 -0
- package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +147 -83
- package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +218 -97
- package/Server/Services/NetworkDeviceService.ts +39 -2
- package/Server/Services/OnCallDutyPolicyLabelRuleEngineService.ts +151 -80
- package/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.ts +222 -97
- package/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.ts +154 -83
- package/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.ts +225 -100
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +171 -110
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +235 -115
- package/Server/Services/ProjectService.ts +111 -10
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +174 -110
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +239 -116
- package/Server/Services/RumApplicationLabelRuleEngineService.ts +137 -73
- package/Server/Services/RumApplicationOwnerRuleEngineService.ts +200 -83
- package/Server/Services/RunbookLabelRuleEngineService.ts +146 -84
- package/Server/Services/RunbookOwnerRuleEngineService.ts +216 -95
- package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +324 -230
- package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +613 -428
- package/Server/Services/ScheduledMaintenancePublicNoteService.ts +24 -0
- package/Server/Services/ScheduledMaintenanceService.ts +43 -14
- package/Server/Services/{GoogleSecOpsConnectionRunService.ts → SecurityEventConnectionRunService.ts} +1 -1
- package/Server/Services/SecurityEventConnectionService.ts +590 -0
- package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +143 -74
- package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +206 -85
- package/Server/Services/ServiceLabelRuleEngineService.ts +172 -110
- package/Server/Services/ServiceLevelObjectiveBurnRateRuleService.ts +1057 -18
- package/Server/Services/ServiceLevelObjectiveFeedService.ts +108 -0
- package/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.ts +793 -97
- package/Server/Services/ServiceLevelObjectiveMonitorRuleService.ts +1069 -0
- package/Server/Services/ServiceLevelObjectiveOwnerTeamService.ts +240 -1
- package/Server/Services/ServiceLevelObjectiveOwnerUserService.ts +257 -1
- package/Server/Services/ServiceLevelObjectiveService.ts +1356 -56
- package/Server/Services/ServiceOwnerRuleEngineService.ts +238 -116
- package/Server/Services/StatusPageAnnouncementService.ts +13 -0
- package/Server/Services/StatusPageLabelRuleEngineService.ts +146 -85
- package/Server/Services/StatusPageOwnerRuleEngineService.ts +210 -99
- package/Server/Services/StatusPageSubscriberNotificationTemplateService.ts +28 -232
- package/Server/Services/StatusPageSubscriberService.ts +6 -0
- package/Server/Services/TelemetryUsageBillingService.ts +38 -7
- package/Server/Services/ThreatIntelFeedService.ts +1 -1
- package/Server/Services/TraceAggregationService.ts +77 -28
- package/Server/Services/VMwareVCenterLabelRuleEngineService.ts +173 -110
- package/Server/Services/VMwareVCenterOwnerRuleEngineService.ts +238 -116
- package/Server/Services/WorkflowLabelRuleEngineService.ts +145 -84
- package/Server/Services/WorkflowOwnerRuleEngineService.ts +215 -95
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -0
- package/Server/Types/Database/UpdateByID.ts +3 -0
- package/Server/Types/Database/UpdateOneBy.ts +7 -0
- package/Server/Utils/AI/AlertAIContextBuilder.ts +19 -0
- package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +13 -1
- package/Server/Utils/AI/IncidentAIContextBuilder.ts +39 -0
- package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +15 -1
- package/Server/Utils/AI/SRE/InvestigationEvidence.ts +658 -0
- package/Server/Utils/AI/SRE/InvestigationReferences.ts +324 -0
- package/Server/Utils/AI/Toolbox/AlertTools.ts +37 -1
- package/Server/Utils/AI/Toolbox/IncidentTools.ts +22 -1
- package/Server/Utils/AI/Toolbox/Index.ts +38 -0
- package/Server/Utils/AI/Toolbox/SloTools.ts +416 -51
- package/Server/Utils/AI/Toolbox/TimelineTools.ts +9 -2
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +80 -0
- package/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.ts +151 -13
- package/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.ts +17 -4
- package/Server/Utils/Dashboard/PublicDashboardSloWidget.ts +155 -8
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +16 -0
- package/Server/Utils/Database/RelationValueUtil.ts +106 -0
- package/Server/Utils/Monitor/Criteria/CompareCriteria.ts +6 -1
- package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +22 -27
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +5 -3
- package/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.ts +3 -1
- package/Server/Utils/Monitor/MonitorStepsProjectValidator.ts +50 -20
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +13 -1
- package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +6 -11
- package/Server/Utils/Rules/MonitorRulePatternValidator.ts +51 -0
- package/Server/Utils/Rules/OwnerRuleAssignment.ts +110 -0
- package/Server/Utils/Rules/RuleRun/RuleApplication.ts +81 -0
- package/Server/Utils/Rules/RuleRun/RuleRunPermission.ts +188 -0
- package/Server/Utils/Rules/RuleRun/RuleRunRegistry.ts +803 -0
- package/Server/Utils/Rules/RuleRun/RuleRunner.ts +341 -0
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +3 -2
- package/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.ts +1108 -0
- package/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.ts +732 -0
- package/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.ts +497 -0
- package/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.ts +689 -0
- package/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.ts +767 -0
- package/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.ts +571 -0
- package/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.ts +827 -0
- package/Server/Utils/SecurityEvent/{GoogleSecOps → Connectors/GoogleSecOps}/GoogleSecOpsClient.ts +609 -74
- package/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.ts +2101 -0
- package/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.ts +610 -0
- package/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.ts +549 -0
- package/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.ts +830 -0
- package/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.ts +684 -0
- package/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.ts +487 -0
- package/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.ts +778 -0
- package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.ts +1182 -0
- package/Server/Utils/SecurityEvent/{GoogleSecOps/GoogleSecOpsRunExecutor.ts → Connectors/SecurityEventConnectionRunExecutor.ts} +165 -76
- package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.ts +306 -0
- package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.ts +55 -0
- package/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.ts +709 -0
- package/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.ts +596 -0
- package/Server/Utils/SecurityEvent/Connectors/Types.ts +431 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +1 -1
- package/Server/Utils/SecurityEvent/SecurityEventDedupe.ts +81 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +2 -2
- package/Server/Utils/SessionReplay/SessionReplayReadService.ts +902 -40
- package/Server/Utils/Slo/SloFeedUtil.ts +200 -0
- package/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.ts +173 -0
- package/Server/Utils/Slo/SloMetricUtil.ts +327 -0
- package/Server/Utils/Slo/SloOwnerReferenceValidator.ts +208 -0
- package/Server/Utils/Slo/SloRecordReferenceValidator.ts +169 -0
- package/Server/Utils/StartServer.ts +10 -0
- package/Server/Utils/StatusPage/MonitorRulePatternValidator.ts +6 -43
- package/Server/Utils/StatusPageResource.ts +50 -5
- package/Server/Utils/Telemetry/EntityRegistry.ts +8 -0
- package/Server/Utils/Telemetry/KubernetesResourceAttributes.ts +108 -0
- package/Server/Utils/Telemetry/ResourceEntityFilter.ts +174 -93
- package/Server/Utils/Telemetry/ResourceFacetPlanner.ts +251 -0
- package/Server/Utils/Telemetry/ResourceFacetResolver.ts +248 -413
- package/Server/Utils/Telemetry/ServiceDependencyDiscovery.ts +668 -0
- package/Server/Utils/Telemetry/TraceContextPropagation.ts +348 -0
- package/Server/Utils/Telemetry.ts +18 -0
- package/Tests/App/Dashboard/AIInvestigationHeaderStatus.test.tsx +1063 -1
- package/Tests/App/Dashboard/AIRootCauseFeedItem.test.tsx +285 -0
- package/Tests/App/Dashboard/AddWidgetModal.test.tsx +4 -1
- package/Tests/App/Dashboard/AffectedResourcesDisplay.test.tsx +242 -0
- package/Tests/App/Dashboard/AffectedResourcesSlo.test.tsx +307 -0
- package/Tests/App/Dashboard/AlertEpisodeViewFields.test.tsx +601 -15
- package/Tests/App/Dashboard/ArchiveResourceCard.test.tsx +289 -0
- package/Tests/App/Dashboard/AuditLogsTable.test.tsx +598 -0
- package/Tests/App/Dashboard/BillingDefaultPaymentMethod.test.tsx +1046 -0
- package/Tests/App/Dashboard/BillingPaidUsageFlow.test.tsx +3 -0
- package/Tests/App/Dashboard/BillingPaymentMethodForm.test.tsx +201 -7
- package/Tests/App/Dashboard/BooleanSeriesCriteriaFilterText.test.ts +82 -0
- package/Tests/App/Dashboard/BreadcrumbCoverage.test.tsx +16 -1
- package/Tests/App/Dashboard/ChangeAlertStateAIHeader.test.tsx +943 -0
- package/Tests/App/Dashboard/ChatActivityFeed.test.tsx +168 -1
- package/Tests/App/Dashboard/CloudResourceTelemetryScope.test.ts +41 -0
- package/Tests/App/Dashboard/ConnectionTestModal.test.tsx +604 -0
- package/Tests/App/Dashboard/ConnectorTestReportView.test.tsx +755 -0
- package/Tests/App/Dashboard/CorrelateFilterBuilder.test.tsx +1095 -1
- package/Tests/App/Dashboard/CorrelateFilterChips.test.tsx +910 -0
- package/Tests/App/Dashboard/CorrelateGraph.test.tsx +3747 -25
- package/Tests/App/Dashboard/CorrelateGraphHelpers.test.ts +1085 -0
- package/Tests/App/Dashboard/CorrelateInspector.test.tsx +1534 -0
- package/Tests/App/Dashboard/CorrelateNodeCard.test.tsx +965 -0
- package/Tests/App/Dashboard/CorrelateResultSummary.test.tsx +1525 -0
- package/Tests/App/Dashboard/CorrelationGraph.test.ts +1030 -0
- package/Tests/App/Dashboard/CorrelationGraphLayout.test.ts +526 -0
- package/Tests/App/Dashboard/DashboardLazyPages.test.tsx +153 -6
- package/Tests/App/Dashboard/DeviceDiagnostics.test.tsx +787 -0
- package/Tests/App/Dashboard/DeviceLatencyTrend.test.tsx +278 -0
- package/Tests/App/Dashboard/DiscoveryReviewInventoryRefresh.test.tsx +279 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +87 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +443 -8
- package/Tests/App/Dashboard/EntityDetailPanel.test.tsx +165 -0
- package/Tests/App/Dashboard/EntityFilterDropdownArchivedSlos.test.tsx +340 -0
- package/Tests/App/Dashboard/EpisodeChangeState.test.tsx +1069 -0
- package/Tests/App/Dashboard/EpisodeMembersCard.test.tsx +772 -0
- package/Tests/App/Dashboard/EventOverviewPages.test.tsx +2450 -0
- package/Tests/App/Dashboard/EventOverviewSkeleton.test.tsx +210 -0
- package/Tests/App/Dashboard/EventStatBar.test.tsx +392 -0
- package/Tests/App/Dashboard/EventStatusPanel.test.tsx +247 -0
- package/Tests/App/Dashboard/ExceptionAIAssistance.test.tsx +606 -0
- package/Tests/App/Dashboard/ExceptionBreadcrumbTimeline.test.tsx +273 -0
- package/Tests/App/Dashboard/ExceptionDetailSideMenu.test.tsx +176 -0
- package/Tests/App/Dashboard/ExceptionOverviewCards.test.tsx +366 -0
- package/Tests/App/Dashboard/ExceptionSegmentedControl.test.tsx +1020 -0
- package/Tests/App/Dashboard/ExceptionSignalPages.test.tsx +371 -0
- package/Tests/App/Dashboard/ExceptionStackFrameViewer.test.tsx +440 -0
- package/Tests/App/Dashboard/ExceptionSummary.test.tsx +381 -0
- package/Tests/App/Dashboard/ExceptionTriage.test.tsx +306 -0
- package/Tests/App/Dashboard/ExceptionsResourceFacets.test.tsx +604 -0
- package/Tests/App/Dashboard/ExceptionsViewerEntityChips.test.tsx +706 -0
- package/Tests/App/Dashboard/FeedOrdering.test.ts +32 -0
- package/Tests/App/Dashboard/IncidentEpisodeViewFields.test.tsx +618 -13
- package/Tests/App/Dashboard/InfrastructureExplorer.test.tsx +254 -207
- package/Tests/App/Dashboard/InfrastructureGraph.test.tsx +303 -135
- package/Tests/App/Dashboard/InvestigationEvidenceList.test.tsx +1472 -0
- package/Tests/App/Dashboard/InvestigationFeedRefresh.test.tsx +303 -0
- package/Tests/App/Dashboard/InvestigationPanel.test.tsx +1931 -25
- package/Tests/App/Dashboard/InvestigationPanelStatus.test.tsx +159 -2
- package/Tests/App/Dashboard/InvestigationReferenceLink.test.tsx +177 -0
- package/Tests/App/Dashboard/InvestigationReportView.test.tsx +1398 -0
- package/Tests/App/Dashboard/InvestigationRunDetails.test.tsx +1166 -0
- package/Tests/App/Dashboard/InvoicesPayInvoice.test.tsx +437 -0
- package/Tests/App/Dashboard/KubernetesImageReferenceView.test.tsx +114 -0
- package/Tests/App/Dashboard/KubernetesLogsTabChips.test.tsx +285 -0
- package/Tests/App/Dashboard/LogsEntityChipNames.test.tsx +316 -0
- package/Tests/App/Dashboard/LogsResourceFacetChips.test.tsx +361 -0
- package/Tests/App/Dashboard/NetworkDeviceBulkDelete.test.tsx +65 -0
- package/Tests/App/Dashboard/NetworkTopologyLiveView.test.tsx +5 -0
- package/Tests/App/Dashboard/ProfileTableEntityNames.test.tsx +432 -0
- package/Tests/App/Dashboard/ProfileViewEntityName.test.tsx +250 -0
- package/Tests/App/Dashboard/ResourceArchiveSettings.test.tsx +10 -0
- package/Tests/App/Dashboard/ResourceAuditLogsSideMenus.test.tsx +74 -0
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +125 -5
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +8 -1
- package/Tests/App/Dashboard/ResourceLogsTabsBareLayout.test.tsx +700 -0
- package/Tests/App/Dashboard/ResourcePageEntityNameProps.test.tsx +803 -0
- package/Tests/App/Dashboard/RumSessionReplaySideMenu.test.tsx +11 -1
- package/Tests/App/Dashboard/ScheduledMaintenanceChangeState.test.tsx +1026 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceFeedRefresh.test.tsx +436 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceOverviewPage.test.tsx +1195 -0
- package/Tests/App/Dashboard/SecurityEventConnectionDiagnostics.test.tsx +1764 -0
- package/Tests/App/Dashboard/SecurityEventConnectionFormModal.test.tsx +1958 -0
- package/Tests/App/Dashboard/SecurityEventConnectionsEmptyState.test.tsx +448 -0
- package/Tests/App/Dashboard/SecurityEventConnectionsTable.test.tsx +1455 -0
- package/Tests/App/Dashboard/SecurityEventSeverityPill.test.tsx +233 -0
- package/Tests/App/Dashboard/SecurityEventsEmptyState.test.tsx +282 -0
- package/Tests/App/Dashboard/SecurityEventsSideMenu.test.tsx +247 -0
- package/Tests/App/Dashboard/ServiceMapGraph.test.tsx +375 -274
- package/Tests/App/Dashboard/SessionReplayAuditTable.test.tsx +410 -0
- package/Tests/App/Dashboard/SloActiveBurnEventsCard.test.tsx +538 -0
- package/Tests/App/Dashboard/SloBulkActionsArchive.test.tsx +252 -0
- package/Tests/App/Dashboard/SloDashboardTemplateWidgets.test.tsx +322 -518
- package/Tests/App/Dashboard/SloElement.test.tsx +194 -0
- package/Tests/App/Dashboard/SloFeed.test.tsx +289 -0
- package/Tests/App/Dashboard/SloHistoryCharts.test.tsx +471 -0
- package/Tests/App/Dashboard/SloHistorySeries.test.tsx +607 -0
- package/Tests/App/Dashboard/SloListWidget.test.tsx +783 -0
- package/Tests/App/Dashboard/SloMetricsPage.test.tsx +346 -0
- package/Tests/App/Dashboard/SloMonitorsPage.test.tsx +661 -0
- package/Tests/App/Dashboard/SloMonitorsSummaryCard.test.tsx +489 -0
- package/Tests/App/Dashboard/SloNavigationWiring.test.tsx +437 -0
- package/Tests/App/Dashboard/SloNoticeBanner.test.tsx +305 -0
- package/Tests/App/Dashboard/SloOverviewData.test.tsx +563 -0
- package/Tests/App/Dashboard/SloOverviewHero.test.tsx +311 -0
- package/Tests/App/Dashboard/SloOverviewKpiStrip.test.tsx +426 -0
- package/Tests/App/Dashboard/SloOverviewSidebarCards.test.tsx +493 -0
- package/Tests/App/Dashboard/SloSettings.test.tsx +633 -0
- package/Tests/App/Dashboard/SloStatusSummaryCards.test.tsx +403 -0
- package/Tests/App/Dashboard/SloViewSideMenuCounts.test.tsx +373 -0
- package/Tests/App/Dashboard/SloWidgetVariableBinding.test.tsx +689 -0
- package/Tests/App/Dashboard/TelemetryResourceRetentionSettings.test.tsx +774 -0
- package/Tests/App/Dashboard/TopErrorsPanelResourceNames.test.tsx +316 -0
- package/Tests/App/Dashboard/TopologyConnectivitySection.test.tsx +206 -0
- package/Tests/App/Dashboard/TopologyDataLoading.test.tsx +30 -0
- package/Tests/App/Dashboard/TopologyPageNavigation.test.tsx +88 -24
- package/Tests/App/Dashboard/TraceExplorer.test.tsx +1590 -0
- package/Tests/App/Dashboard/TraceWaterfall.test.tsx +488 -0
- package/Tests/App/Dashboard/TracesAnalyticsSeriesLabels.test.tsx +367 -0
- package/Tests/App/Dashboard/TracesEntityNames.test.tsx +617 -0
- package/Tests/App/Dashboard/TracesResourceFacets.test.tsx +613 -0
- package/Tests/App/Dashboard/UseBulkShortenDeviceNames.test.tsx +1312 -0
- package/Tests/App/Dashboard/UseServiceNames.test.tsx +359 -0
- package/Tests/App/Dashboard/WidgetCatalog.test.ts +9 -1
- package/Tests/Models/AnalyticsModels/RumSessionReplayColumns.test.ts +14 -16
- package/Tests/Models/DatabaseModels/AuditLogModelConfiguration.test.ts +442 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +13 -7
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +48 -1
- package/Tests/Models/DatabaseModels/SloOverhaulModels.test.ts +835 -0
- package/Tests/Models/DatabaseModels/StaticRuleCriteriaInheritance.test.ts +3 -2
- package/Tests/Models/DiscoveryScanNetbiosLookupColumn.test.ts +328 -0
- package/Tests/Models/DiscoveryScanShortDeviceNamesColumn.test.ts +335 -0
- package/Tests/Models/InventoryItemNaming.test.ts +132 -16
- package/Tests/Models/NetworkDeviceDiagnosticContract.test.ts +194 -0
- package/Tests/Models/NetworkDeviceDnsNameColumn.test.ts +321 -0
- package/Tests/Models/ProjectDataResidencyColumn.test.ts +154 -0
- package/Tests/Models/SecurityDomainAccessControl.test.ts +197 -22
- package/Tests/Server/API/AIInvestigationAPI.test.ts +611 -2
- package/Tests/Server/API/AIInvestigationEvidenceAPI.test.ts +1098 -0
- package/Tests/Server/API/BaseAPI.test.ts +6 -0
- package/Tests/Server/API/BaseAPIUpdateMiscDataProps.test.ts +217 -0
- package/Tests/Server/API/BillingInvoiceAPI.test.ts +7 -0
- package/Tests/Server/API/BillingInvoiceAPIPaymentStates.test.ts +990 -0
- package/Tests/Server/API/BillingPaymentMethodAPI.test.ts +498 -0
- package/Tests/Server/API/DashboardPublicSloAPI.test.ts +405 -0
- package/Tests/Server/API/SecurityEventConnectionAPI.test.ts +1750 -0
- package/Tests/Server/API/SessionReplayAPI.test.ts +644 -1
- package/Tests/Server/API/StatusPageManageSubscriptionRecipient.test.ts +857 -0
- package/Tests/Server/API/StatusPageManageSubscriptionTemplateVariables.test.ts +1084 -0
- package/Tests/Server/API/TelemetryFacetsAPI.test.ts +810 -0
- package/Tests/Server/Infrastructure/E2EClickHouseFixtureAccess.test.ts +240 -0
- package/Tests/Server/Infrastructure/Postgres/AddConfigurableRuleCriteriaMigration.test.ts +33 -3
- package/Tests/Server/Infrastructure/Postgres/AddDataResidencyToProjectMigration.test.ts +202 -0
- package/Tests/Server/Infrastructure/Postgres/AddNetbiosLookupToNetworkDeviceDiscoveryScanMigration.test.ts +330 -0
- package/Tests/Server/Infrastructure/Postgres/AddNetworkDeviceDnsNameAndShortDeviceNamesMigration.test.ts +340 -0
- package/Tests/Server/Infrastructure/Postgres/BackfillSloMonitorRulesAndAffectedResourcesMigration.test.ts +343 -0
- package/Tests/Server/Infrastructure/Postgres/SloProductOverhaulMigration.test.ts +801 -0
- package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +229 -0
- package/Tests/Server/Services/AddSubscriberUpdateNotificationStatusMigration.test.ts +307 -0
- package/Tests/Server/Services/AuditLogService.test.ts +1124 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +200 -1
- package/Tests/Server/Services/BillingInvoiceServiceMutexRelease.test.ts +254 -0
- package/Tests/Server/Services/BillingService.test.ts +70 -0
- package/Tests/Server/Services/BillingServicePayInvoiceStates.test.ts +723 -0
- package/Tests/Server/Services/BillingServicePaymentMethodReads.test.ts +14 -2
- package/Tests/Server/Services/BillingServiceSubscriptionPaymentMethodSync.test.ts +1634 -0
- package/Tests/Server/Services/DatabaseServiceAuditRelationDiff.test.ts +492 -0
- package/Tests/Server/Services/DatabaseServicePasswordFieldSecrets.test.ts +629 -0
- package/Tests/Server/Services/IncidentAlertSloLinkSurvivesEdit.test.ts +431 -0
- package/Tests/Server/Services/IncidentAlertSloReferenceGuard.test.ts +358 -0
- package/Tests/Server/Services/InventoryItemDisplayName.test.ts +66 -0
- package/Tests/Server/Services/MonitorProbeServicePastDueMonitoring.test.ts +362 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +1460 -1
- package/Tests/Server/Services/NetworkDeviceDiagnosticService.test.ts +962 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +106 -0
- package/Tests/Server/Services/NetworkDeviceRuleEngines.test.ts +10 -1
- package/Tests/Server/Services/NetworkDeviceServicePastDueMonitoring.test.ts +335 -0
- package/Tests/Server/Services/NetworkDeviceSiteRuleDnsName.test.ts +568 -0
- package/Tests/Server/Services/OpenTelemetryResourceRetentionMemo.test.ts +28 -1
- package/Tests/Server/Services/ProjectDataResidencyPostgres.test.ts +344 -0
- package/Tests/Server/Services/ProjectServiceAuditLogSettingsCache.test.ts +187 -0
- package/Tests/Server/Services/ProjectServiceDataResidency.test.ts +369 -0
- package/Tests/Server/Services/ProjectServiceDataResidencySelfHosted.test.ts +176 -0
- package/Tests/Server/Services/ProjectServicePastDueMonitoring.test.ts +289 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +24 -8
- package/Tests/Server/Services/RuleRun/IncidentAlertMaintenanceRuleEnginesRun.test.ts +1396 -0
- package/Tests/Server/Services/RuleRun/LabelRuleEnginesGroupARun.test.ts +917 -0
- package/Tests/Server/Services/RuleRun/LabelRuleEnginesGroupBRun.test.ts +1262 -0
- package/Tests/Server/Services/RuleRun/OwnerRuleEnginesGroupARun.test.ts +902 -0
- package/Tests/Server/Services/RuleRun/OwnerRuleEnginesGroupBRun.test.ts +1163 -0
- package/Tests/Server/Services/RuleRun/PrivacyRuleEnginesRun.test.ts +843 -0
- package/Tests/Server/Services/ScheduledMaintenanceSubscriberTemplateFormats.test.ts +465 -0
- package/Tests/Server/Services/SecurityEventConnectionService.test.ts +1754 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +77 -23
- package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleFeedWrites.test.ts +777 -0
- package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleOptions.test.ts +1399 -0
- package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleService.test.ts +67 -74
- package/Tests/Server/Services/ServiceLevelObjectiveChildRowTenancy.test.ts +906 -0
- package/Tests/Server/Services/ServiceLevelObjectiveDeleteTenancy.test.ts +1029 -0
- package/Tests/Server/Services/ServiceLevelObjectiveFeedService.test.ts +313 -0
- package/Tests/Server/Services/ServiceLevelObjectiveFeedWrites.test.ts +1214 -0
- package/Tests/Server/Services/ServiceLevelObjectiveMarkdownLink.test.ts +289 -0
- package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.test.ts +1455 -430
- package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleLegacyLabelAdoption.test.ts +634 -0
- package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleService.test.ts +1193 -0
- package/Tests/Server/Services/{SloMonitorLabelRuleHooks.test.ts → ServiceLevelObjectiveMonitorRuleTriggers.test.ts} +135 -41
- package/Tests/Server/Services/ServiceLevelObjectiveOwnerFeedWrites.test.ts +671 -0
- package/Tests/Server/Services/ServiceLevelObjectiveService.test.ts +180 -85
- package/Tests/Server/Services/ServiceLevelObjectiveServiceArchive.test.ts +537 -0
- package/Tests/Server/Services/ServiceLevelObjectiveServiceLegacyMonitorLabelWrite.test.ts +870 -0
- package/Tests/Server/Services/ServiceLevelObjectiveServiceMonitorRuleGuard.test.ts +343 -0
- package/Tests/Server/Services/ServiceLevelObjectiveServiceReEvaluation.test.ts +246 -0
- package/Tests/Server/Services/SloAffectedResourceCreatedFeed.test.ts +501 -0
- package/Tests/Server/Services/SloAffectedResourceLinkContract.test.ts +86 -0
- package/Tests/Server/Services/SloAffectedResourceMetricAttributes.test.ts +547 -0
- package/Tests/Server/Services/StaticRuleCriteriaRuntimeCoverage.test.ts +10 -4
- package/Tests/Server/Services/StatusPageMonitorRuleHooks.test.ts +7 -2
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateCompile.test.ts +174 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateServiceVariables.test.ts +40 -0
- package/Tests/Server/Services/SubscriberUpdateNotificationHooks.test.ts +541 -0
- package/Tests/Server/Services/TelemetryIngestionKeyValidation.test.ts +53 -0
- package/Tests/Server/Services/TelemetryResourceFacetCounting.test.ts +218 -0
- package/Tests/Server/Services/TelemetryResourceFacetFilters.test.ts +155 -1
- package/Tests/Server/Services/TelemetryUsageBillingSloExclusion.test.ts +288 -0
- package/Tests/Server/Services/TraceAggregationExceptionScope.test.ts +142 -0
- package/Tests/Server/Services/TraceAnalyticsResourceDisplayNames.test.ts +85 -24
- package/Tests/Server/TestingUtils/PastDueMonitoringClaimSql.ts +177 -0
- package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +51 -10
- package/Tests/Server/TestingUtils/__mocks__/Stripe.mock.ts +16 -1
- package/Tests/Server/Types/Database/Permissions/ProjectDataResidencyColumn.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SecurityRoleAccess.test.ts +34 -11
- package/Tests/Server/Utils/AI/InvestigationEvidence.test.ts +1395 -0
- package/Tests/Server/Utils/AI/InvestigationReferences.test.ts +616 -0
- package/Tests/Server/Utils/AI/SloAffectedResourceAIContext.test.ts +445 -0
- package/Tests/Server/Utils/AI/SloTools.test.ts +423 -1
- package/Tests/Server/Utils/AI/SloToolsArchive.test.ts +294 -0
- package/Tests/Server/Utils/AI/SloToolsRuleReadPermissions.test.ts +297 -0
- package/Tests/Server/Utils/AI/TimelineTools.test.ts +119 -0
- package/Tests/Server/Utils/AI/Toolbox/AIToolbox.test.ts +151 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +65 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorExceptionScope.test.ts +224 -0
- package/Tests/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.test.ts +255 -10
- package/Tests/Server/Utils/Dashboard/SloTemplatePublicDashboard.test.ts +404 -750
- package/Tests/Server/Utils/Database/ProjectScopedReferenceValidator.test.ts +45 -0
- package/Tests/Server/Utils/Database/RelationValueUtil.test.ts +157 -0
- package/Tests/Server/Utils/Monitor/Criteria/BooleanSeriesEvaluateOverTime.test.ts +260 -0
- package/Tests/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.test.ts +181 -0
- package/Tests/Server/Utils/Monitor/Criteria/EvaluateOverTime.test.ts +147 -30
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +55 -2
- package/Tests/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.test.ts +17 -0
- package/Tests/Server/Utils/Monitor/MonitorStepsProjectValidator.test.ts +136 -0
- package/Tests/Server/Utils/Monitor/MonitorStepsProjectValidatorLoadOrder.test.ts +472 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceHydrationUtil.test.ts +48 -2
- package/Tests/Server/Utils/Monitor/SloTemplateMetricEmitterContract.test.ts +435 -475
- package/Tests/Server/Utils/Rules/MonitorRulePatternValidator.test.ts +77 -0
- package/Tests/Server/Utils/Rules/OwnerRuleAssignment.test.ts +177 -0
- package/Tests/Server/Utils/Rules/RuleRun/RuleRunPermission.test.ts +365 -0
- package/Tests/Server/Utils/Rules/RuleRun/RuleRunRegistry.test.ts +173 -0
- package/Tests/Server/Utils/Rules/RuleRun/RuleRunner.test.ts +675 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +8 -8
- package/Tests/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.test.ts +1240 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.test.ts +1853 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/ConnectorFetchSummary.test.ts +261 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.test.ts +1184 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.test.ts +1066 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.test.ts +1568 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.test.ts +930 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.test.ts +1409 -0
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsAuth.test.ts → Connectors/GoogleSecOps/GoogleSecOpsAuth.test.ts} +5 -5
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsClient.test.ts → Connectors/GoogleSecOps/GoogleSecOpsClient.test.ts} +9 -5
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.test.ts +483 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorCuratedAndLateAlerts.test.ts +676 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorFetchEvents.test.ts +1994 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorFixtures.ts +332 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorHttpIntegration.test.ts +680 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorRequestContract.test.ts +1206 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorTestConnection.test.ts +1136 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsCuratedRuleCounts.test.ts +407 -0
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsErrorHandling.test.ts → Connectors/GoogleSecOps/GoogleSecOpsErrorHandling.test.ts} +5 -5
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingAdaptiveCatchUp.test.ts +730 -0
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsClickhouseIntegration.test.ts → Connectors/GoogleSecOps/GoogleSecOpsPollingClickhouseIntegration.test.ts} +130 -35
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingFailureTaxonomy.test.ts +772 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingFixtures.ts +648 -0
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsHttpIntegration.test.ts → Connectors/GoogleSecOps/GoogleSecOpsPollingHttpIntegration.test.ts} +249 -222
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingIntegration.test.ts +1390 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingLoop.test.ts +981 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingNothingImportedRegression.test.ts +290 -0
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsRequestContract.test.ts → Connectors/GoogleSecOps/GoogleSecOpsRequestContract.test.ts} +2 -2
- package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsResponseParsing.test.ts → Connectors/GoogleSecOps/GoogleSecOpsResponseParsing.test.ts} +5 -5
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsSearchDetections.test.ts +763 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsTesterIntegration.test.ts +421 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.test.ts +763 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.test.ts +1296 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.test.ts +1102 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.test.ts +1174 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.test.ts +1032 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.test.ts +1558 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.test.ts +4483 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionRunExecutor.test.ts +1178 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.test.ts +1215 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.test.ts +1068 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.test.ts +1004 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayOriginAllowlist.test.ts +41 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayReadServiceQueries.test.ts +1966 -179
- package/Tests/Server/Utils/Slo/SloFeedUtil.test.ts +326 -0
- package/Tests/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.test.ts +260 -0
- package/Tests/Server/Utils/Slo/SloMetricUtil.test.ts +592 -0
- package/Tests/Server/Utils/Slo/SloRecordReferenceValidator.test.ts +311 -0
- package/Tests/Server/Utils/StatusPageResource.test.ts +91 -3
- package/Tests/Server/Utils/Telemetry/KubernetesResourceAttributes.test.ts +162 -0
- package/Tests/Server/Utils/Telemetry/ResourceEntityFilter.test.ts +460 -13
- package/Tests/Server/Utils/Telemetry/ResourceFacetPlanner.test.ts +678 -0
- package/Tests/Server/Utils/Telemetry/ResourceFacetResolver.test.ts +348 -2
- package/Tests/Server/Utils/Telemetry/ServiceDependencyDiscovery.test.ts +525 -0
- package/Tests/Server/Utils/Telemetry/TraceContextPropagation.test.ts +420 -0
- package/Tests/Types/Billing/SubscriptionStatus.test.ts +176 -0
- package/Tests/Types/Billing/SubscriptionStatusPastDueMonitoring.test.ts +187 -0
- package/Tests/Types/Dashboard/DashboardTemplateInvariants.test.ts +53 -7
- package/Tests/Types/Dashboard/SloDashboardTemplate.test.ts +816 -792
- package/Tests/Types/Monitor/CriteriaFilter.test.ts +216 -24
- package/Tests/Types/Monitor/MonitorStepDnssecMonitor.test.ts +14 -1
- package/Tests/Types/Monitor/MonitorStepDomainMonitor.test.ts +14 -1
- package/Tests/Types/Monitor/MonitorStepExternalStatusPageMonitor.test.ts +14 -1
- package/Tests/Types/Monitor/MonitorStepRetriesParsing.test.ts +201 -0
- package/Tests/Types/Rules/RuleRun.test.ts +315 -0
- package/Tests/Types/Rum/SessionReplayApiContracts.test.ts +133 -0
- package/Tests/Types/Rum/SessionReplayTransportContracts.test.ts +95 -0
- package/Tests/Types/SecurityEvent/Connectors/ConnectorDiagnostics.test.ts +82 -0
- package/Tests/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.test.ts +339 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplateVariables.test.ts +217 -0
- package/Tests/Types/StatusPage/SubscriberUpdateNotification.test.ts +200 -0
- package/Tests/Types/Telemetry/ExceptionSpanScope.test.ts +89 -0
- package/Tests/Types/Telemetry/ResourceEntityFacet.test.ts +96 -0
- package/Tests/Types/Telemetry/ResourceFacetCatalog.test.ts +304 -0
- package/Tests/UI/Components/ActiveFilterChipsLockedFilters.test.tsx +411 -0
- package/Tests/UI/Components/AlertBanner.test.tsx +319 -0
- package/Tests/UI/Components/BulkArchiveActionsCopy.test.tsx +310 -0
- package/Tests/UI/Components/Card.test.tsx +312 -1
- package/Tests/UI/Components/CardModelDetailHeaderLayout.test.tsx +253 -0
- package/Tests/UI/Components/CardModelDetailRefresher.test.tsx +342 -0
- package/Tests/UI/Components/Checkbox.test.tsx +79 -0
- package/Tests/UI/Components/CopyTextButton.test.tsx +142 -0
- package/Tests/UI/Components/Detail/DetailIdIsUnique.test.tsx +87 -0
- package/Tests/UI/Components/DetailCompactStyle.test.tsx +621 -0
- package/Tests/UI/Components/Dropdown/DropdownClearable.test.tsx +393 -0
- package/Tests/UI/Components/Dropdown/DropdownMultiSelectChipAccessibleName.test.tsx +64 -0
- package/Tests/UI/Components/EmptyState/EmptyState.test.tsx +335 -4
- package/Tests/UI/Components/EmptyState/EmptyStateGuideLinks.test.tsx +337 -0
- package/Tests/UI/Components/ErrorBoundary.test.tsx +60 -0
- package/Tests/UI/Components/FacetSections.test.tsx +581 -0
- package/Tests/UI/Components/FacetSidebarControls.test.tsx +812 -0
- package/Tests/UI/Components/FacetVisibility.test.ts +429 -0
- package/Tests/UI/Components/Forms/ModelFormJsonColumns.test.tsx +21 -20
- package/Tests/UI/Components/LabelRuleImportExport.test.tsx +15 -2
- package/Tests/UI/Components/LockedFilterChip.test.tsx +788 -0
- package/Tests/UI/Components/LogsEntityNames.test.ts +1769 -0
- package/Tests/UI/Components/LogsEntityNamesComponents.test.tsx +696 -0
- package/Tests/UI/Components/LogsFacetSidebarHiddenFacets.test.tsx +600 -0
- package/Tests/UI/Components/LogsViewerEntityNames.test.tsx +713 -0
- package/Tests/UI/Components/MarkdownInlineReferences.test.tsx +2079 -0
- package/Tests/UI/Components/MemberRoleAssignment.test.tsx +446 -0
- package/Tests/UI/Components/ModelDetailRefetch.test.tsx +397 -0
- package/Tests/UI/Components/ModelListRefetch.test.tsx +233 -0
- package/Tests/UI/Components/ModelPageModelChange.test.tsx +409 -0
- package/Tests/UI/Components/MoreMenu.test.tsx +133 -0
- package/Tests/UI/Components/MoreMenuMotion.test.tsx +84 -3
- package/Tests/UI/Components/PaginationIntegration.test.tsx +25 -0
- package/Tests/UI/Components/ResourceFacetConfigs.test.ts +172 -0
- package/Tests/UI/Components/RuleCriteria/RuleCriteriaModelTable.test.tsx +3 -3
- package/Tests/UI/Components/RuleRun/RuleDetailFields.test.tsx +336 -0
- package/Tests/UI/Components/RuleRun/RuleTable.test.tsx +304 -0
- package/Tests/UI/Components/RuleRun/RunRuleNowModal.test.tsx +231 -0
- package/Tests/UI/Components/RuleRun/RunRulesBulkAction.test.ts +213 -0
- package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +32 -14
- package/Tests/UI/Components/TableSortAndMobileColumns.test.tsx +44 -1
- package/Tests/UI/Components/TelemetryActiveFilterChipsLockedFilters.test.tsx +367 -0
- package/Tests/UI/Components/TelemetryFacetSidebarHiddenFacets.test.tsx +718 -0
- package/Tests/UI/Monitor/EvaluationLogList.test.tsx +303 -0
- package/Tests/UI/Monitor/MonitorSummarySnapshotRender.test.tsx +55 -1
- package/Tests/UI/Rum/FidelityNotices.test.ts +22 -0
- package/Tests/UI/Rum/RecordingHealthCard.test.tsx +120 -136
- package/Tests/UI/Rum/RecordingHealthDashboard.test.tsx +988 -0
- package/Tests/UI/Rum/ReplayCard.test.tsx +32 -0
- package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +709 -12
- package/Tests/UI/Rum/ReplayEngine.test.ts +154 -0
- package/Tests/UI/Rum/ReplayHeader.test.tsx +284 -124
- package/Tests/UI/Rum/ReplayPinControl.test.tsx +189 -10
- package/Tests/UI/Rum/ReplayPlayerChrome.test.tsx +286 -12
- package/Tests/UI/Rum/ReplayRail.test.tsx +294 -0
- package/Tests/UI/Rum/ReplayScrubber.test.tsx +213 -1
- package/Tests/UI/Rum/ReplayStage.test.tsx +1228 -173
- package/Tests/UI/Rum/ReplayStageOverlays.test.tsx +433 -3
- package/Tests/UI/Rum/ReplayTabSwitcher.test.tsx +1391 -0
- package/Tests/UI/Rum/ReplayTimeline.test.tsx +222 -0
- package/Tests/UI/Rum/ReplayUi.test.tsx +189 -2
- package/Tests/UI/Rum/ReplayUserSessionsMenu.test.tsx +91 -0
- package/Tests/UI/Rum/SessionReplayEmptyState.test.tsx +1 -1
- package/Tests/UI/Rum/SessionReplaySettingsPolicyLoading.test.tsx +585 -0
- package/Tests/UI/Rum/SessionReplayTable.test.tsx +844 -51
- package/Tests/UI/Rum/SessionReplayUsersTable.test.tsx +29 -1
- package/Tests/UI/Telemetry/TelemetryDetailPanel.test.tsx +288 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +31 -1
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +6 -0
- package/Tests/UI/Utils/Clipboard.test.ts +154 -0
- package/Tests/UI/Utils/DashboardStackingLayers.test.ts +8 -1
- package/Tests/UI/Utils/Navigation.test.ts +24 -0
- package/Tests/UI/Utils/RuleRunClient.test.ts +303 -0
- package/Tests/UI/Utils/Telemetry/TelemetryEntityNames.test.ts +2206 -0
- package/Tests/UI/Utils/Telemetry/UseTelemetryEntityNames.test.tsx +844 -0
- package/Tests/Utils/AI/InvestigationReport.test.ts +2430 -0
- package/Tests/Utils/APIOutgoingRequestTracer.test.ts +137 -0
- package/Tests/Utils/Dashboard/Components/DashboardComponentDefaults.test.ts +2 -0
- package/Tests/Utils/Dashboard/Components/DashboardSloListComponent.test.ts +206 -0
- package/Tests/Utils/Dashboard/DashboardSloComponent.test.ts +36 -2
- package/Tests/Utils/Dashboard/SloTemplateVariableScoping.test.ts +409 -588
- package/Tests/Utils/Dashboard/SloWidgetSource.test.ts +351 -0
- package/Tests/Utils/Markdown/MarkdownEscape.test.ts +361 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +1425 -118
- package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +188 -3
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +661 -13
- package/Tests/Utils/NetworkDiscovery/NetbiosNameUtil.test.ts +349 -0
- package/Tests/Utils/NetworkDiscovery/RunImportedDeviceNaming.test.ts +656 -0
- package/Tests/Utils/NetworkDiscovery/ShortDeviceNamePlanner.test.ts +1020 -0
- package/Tests/Utils/NetworkDiscovery/ShortHostnameUtil.test.ts +619 -0
- package/Tests/Utils/NetworkSite/CidrMatchUtil.test.ts +317 -0
- package/Tests/Utils/Project/DataResidency.test.ts +198 -0
- package/Tests/Utils/Rules/RuleRunSummary.test.ts +394 -0
- package/Tests/Utils/Rum/SessionReplayHealthDiagnosis.test.ts +40 -0
- package/Tests/Utils/Rum/SessionReplayRecordingEnded.test.ts +619 -0
- package/Tests/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.test.ts +631 -0
- package/Tests/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.test.ts +479 -0
- package/Tests/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.test.ts +507 -0
- package/Tests/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.test.ts +686 -0
- package/Tests/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.test.ts +474 -0
- package/Tests/Utils/SecurityEvent/Connectors/OktaNormalizer.test.ts +736 -0
- package/Tests/Utils/SecurityEvent/Connectors/SplunkNormalizer.test.ts +407 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +129 -0
- package/Tests/Utils/Slo/SloAffectedResourceMarkdown.test.ts +302 -0
- package/Tests/Utils/Slo/SloBurnRateTemplate.test.ts +468 -0
- package/Tests/Utils/Slo/SloEvaluation.test.ts +20 -4
- package/Tests/Utils/Slo/SloFeedMarkdown.test.ts +1185 -0
- package/Tests/Utils/Slo/SloHealth.test.ts +262 -0
- package/Tests/Utils/Slo/SloHistoryMetricName.test.ts +102 -0
- package/Tests/Utils/Slo/SloListWidgetFormat.test.ts +522 -0
- package/Tests/Utils/Slo/SloMetricType.test.ts +355 -0
- package/Tests/Utils/Slo/SloMonitorRuleCriteria.test.ts +387 -0
- package/Tests/Utils/Slo/SloMonitorStatusSummary.test.ts +210 -0
- package/Tests/Utils/Slo/SloOverviewText.test.ts +226 -0
- package/Tests/Utils/Slo/SloProjection.test.ts +1039 -0
- package/Tests/Utils/Slo/SloWidgetFormat.test.ts +47 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +57 -1
- package/Tests/Utils/Telemetry/EntityRelationship.test.ts +36 -0
- package/Tests/Utils/Telemetry/LockedFilterSearch.test.ts +521 -0
- package/Tests/Utils/Telemetry/NetworkHost.test.ts +48 -0
- package/Tests/Utils/Telemetry/OriginAllowList.test.ts +154 -0
- package/Tests/Utils/Traces/CriticalPath.test.ts +25 -0
- package/Types/AI/AIChatTypes.ts +8 -0
- package/Types/AI/InvestigationEvidence.ts +96 -0
- package/Types/BaseDatabase/EnableAuditLogOn.ts +41 -0
- package/Types/Billing/SubscriptionStatus.ts +39 -4
- package/Types/Dashboard/DashboardComponentType.ts +1 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +5 -0
- package/Types/Dashboard/DashboardComponents/DashboardSloComponent.ts +10 -0
- package/Types/Dashboard/DashboardComponents/DashboardSloListComponent.ts +29 -0
- package/Types/Dashboard/DashboardTemplates.ts +290 -297
- package/Types/Database/EnableAuditLog.ts +23 -1
- package/Types/Email/EmailTemplateType.ts +4 -0
- package/Types/Monitor/CriteriaFilter.ts +55 -8
- package/Types/Monitor/MonitorEvaluationSummary.ts +5 -0
- package/Types/Monitor/MonitorStep.ts +5 -2
- package/Types/Monitor/MonitorStepDnsMonitor.ts +3 -1
- package/Types/Monitor/MonitorStepDnssecMonitor.ts +3 -1
- package/Types/Monitor/MonitorStepDomainMonitor.ts +3 -1
- package/Types/Monitor/MonitorStepExternalStatusPageMonitor.ts +3 -1
- package/Types/Monitor/MonitorStepRetries.ts +59 -0
- package/Types/Monitor/MonitorStepSnmpMonitor.ts +9 -2
- package/Types/NetworkDevice/NetworkDeviceDiagnosticResult.ts +104 -0
- package/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.ts +47 -0
- package/Types/NetworkDevice/NetworkDeviceDiagnosticType.ts +47 -0
- package/Types/NetworkDevice/NetworkDevicePingMetricNames.ts +20 -0
- package/Types/Permission.ts +129 -2
- package/Types/Rules/RuleCriteriaFieldRegistry.ts +5 -0
- package/Types/Rules/RuleRun.ts +518 -0
- package/Types/Rum/SessionReplay.ts +109 -0
- package/Types/Rum/SessionReplayApi.ts +49 -0
- package/Types/SecurityEvent/Connectors/ConnectorDiagnostics.ts +117 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.ts +113 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.ts +599 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.ts +45 -0
- package/Types/SecurityEvent/GoogleSecOpsRegion.ts +34 -0
- package/Types/ServiceLevelObjective/SloHistoryMetricName.ts +25 -0
- package/Types/ServiceLevelObjective/SloMetricType.ts +49 -0
- package/Types/StatusPage/StatusPageSubscriberNotificationEventType.ts +4 -0
- package/Types/StatusPage/SubscriberNotificationTemplateVariables.ts +331 -0
- package/Types/StatusPage/SubscriberNotificationTrigger.ts +12 -0
- package/Types/StatusPage/SubscriberUpdateNotification.ts +89 -0
- package/Types/Telemetry/EntityType.ts +14 -0
- package/Types/Telemetry/ExceptionSpanScope.ts +83 -0
- package/Types/Telemetry/LockedFilterDetail.ts +25 -0
- package/Types/Telemetry/ResourceEntityFacet.ts +17 -10
- package/Types/Telemetry/ResourceFacetCatalog.ts +171 -0
- package/Types/Telemetry/ServiceType.ts +7 -0
- package/Typings/Index.d.ts +53 -3
- package/UI/Components/AlertBanner/AlertBanner.tsx +85 -27
- package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +21 -2
- package/UI/Components/Card/Card.tsx +118 -83
- package/UI/Components/Checkbox/Checkbox.tsx +8 -5
- package/UI/Components/CopyTextButton/CopyTextButton.tsx +7 -1
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +4 -1
- package/UI/Components/Detail/Detail.tsx +145 -23
- package/UI/Components/Dropdown/Dropdown.tsx +64 -1
- package/UI/Components/EmptyState/EmptyState.tsx +27 -3
- package/UI/Components/EmptyState/EmptyStateGuideLinks.tsx +124 -0
- package/UI/Components/ErrorBoundary.tsx +38 -0
- package/UI/Components/Forms/ModelForm.tsx +6 -5
- package/UI/Components/LabelRule/LabelRuleTable.tsx +8 -2
- package/UI/Components/LogsViewer/LogsEntityNames.ts +912 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +152 -77
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +17 -11
- package/UI/Components/LogsViewer/components/FacetSection.tsx +66 -79
- package/UI/Components/LogsViewer/components/FacetValueRow.tsx +17 -2
- package/UI/Components/LogsViewer/components/LogDetailsPanel.tsx +45 -5
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +100 -19
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +156 -39
- package/UI/Components/LogsViewer/components/LogsTable.tsx +30 -8
- package/UI/Components/LogsViewer/types.ts +6 -0
- package/UI/Components/Markdown.tsx/InlineReferences.tsx +628 -0
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +385 -312
- package/UI/Components/MemberRoleAssignment/MemberRoleAssignment.tsx +50 -22
- package/UI/Components/ModelDetail/CardModelDetail.tsx +15 -0
- package/UI/Components/ModelDetail/ModelDetail.tsx +64 -19
- package/UI/Components/ModelList/ModelList.tsx +33 -8
- package/UI/Components/MoreMenu/MoreMenu.tsx +14 -3
- package/UI/Components/Page/ModelPage.tsx +119 -54
- package/UI/Components/RuleRun/RuleDetailFields.tsx +359 -0
- package/UI/Components/RuleRun/RuleTable.tsx +183 -0
- package/UI/Components/RuleRun/RuleView.tsx +170 -0
- package/UI/Components/RuleRun/RunRuleNowModal.tsx +147 -0
- package/UI/Components/RuleRun/RunRulesBulkAction.ts +103 -0
- package/UI/Components/Table/Table.tsx +8 -0
- package/UI/Components/Table/TableRow.tsx +13 -5
- package/UI/Components/TelemetryViewer/FacetVisibility.ts +229 -0
- package/UI/Components/TelemetryViewer/ResourceFacetConfigs.ts +46 -0
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +7 -0
- package/UI/Components/TelemetryViewer/components/FacetSearchInput.tsx +79 -0
- package/UI/Components/TelemetryViewer/components/FacetSectionHeader.tsx +69 -0
- package/UI/Components/TelemetryViewer/components/FacetShowMoreButton.tsx +36 -0
- package/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.tsx +88 -0
- package/UI/Components/TelemetryViewer/components/LockedFilterChip.tsx +430 -0
- package/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.tsx +14 -10
- package/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.tsx +203 -10
- package/UI/Components/TelemetryViewer/components/TelemetryFacetSection.tsx +60 -73
- package/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.tsx +94 -7
- package/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.tsx +17 -2
- package/UI/Components/TelemetryViewer/types.ts +19 -0
- package/UI/Components/TelemetryViewer/useFacetSearchExemptions.ts +158 -0
- package/UI/Components/TelemetryViewer/useFacetSectionSearch.ts +102 -0
- package/UI/Utils/Clipboard.ts +68 -2
- package/UI/Utils/Navigation.ts +17 -2
- package/UI/Utils/Rules/RuleRunClient.ts +178 -0
- package/UI/Utils/Telemetry/TelemetryEntityNames.ts +628 -0
- package/UI/Utils/Telemetry/UseTelemetryEntityNames.ts +151 -0
- package/Utils/AI/InvestigationReport.ts +1789 -0
- package/Utils/API.ts +90 -1
- package/Utils/Dashboard/Components/DashboardSloComponent.ts +19 -2
- package/Utils/Dashboard/Components/DashboardSloListComponent.ts +126 -0
- package/Utils/Dashboard/Components/Index.ts +7 -0
- package/Utils/Dashboard/SloWidgetSource.ts +188 -0
- package/Utils/Markdown/MarkdownEscape.ts +63 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +161 -36
- package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +25 -0
- package/Utils/NetworkDiscovery/NetbiosNameUtil.ts +146 -0
- package/Utils/NetworkDiscovery/RunImportedDeviceNaming.ts +390 -0
- package/Utils/NetworkDiscovery/ShortDeviceNamePlanner.ts +291 -0
- package/Utils/NetworkDiscovery/ShortHostnameUtil.ts +91 -0
- package/Utils/NetworkSite/CidrMatchUtil.ts +37 -12
- package/Utils/Project/DataResidency.ts +63 -0
- package/Utils/Rules/RuleRunSummary.ts +323 -0
- package/Utils/Rum/SessionReplayHealth.ts +11 -0
- package/Utils/Rum/SessionReplayRecordingEnded.ts +134 -0
- package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.ts +427 -0
- package/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.ts +197 -0
- package/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.ts +464 -0
- package/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.ts +567 -0
- package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.ts +299 -0
- package/Utils/SecurityEvent/Connectors/OktaNormalizer.ts +467 -0
- package/Utils/SecurityEvent/Connectors/SplunkNormalizer.ts +439 -0
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +124 -12
- package/Utils/Slo/SloAffectedResourceMarkdown.ts +123 -0
- package/Utils/Slo/SloBurnRateTemplate.ts +373 -0
- package/Utils/Slo/SloFeedMarkdown.ts +1507 -0
- package/Utils/Slo/SloHealth.ts +96 -9
- package/Utils/Slo/SloListWidgetFormat.ts +370 -0
- package/Utils/Slo/SloMetricType.ts +237 -0
- package/Utils/Slo/SloMonitorRuleCriteria.ts +364 -0
- package/Utils/Slo/SloMonitorStatusSummary.ts +210 -0
- package/Utils/Slo/SloOverviewText.ts +265 -0
- package/Utils/Slo/SloProjection.ts +967 -0
- package/Utils/Slo/SloWidgetFormat.ts +12 -2
- package/Utils/Telemetry/CrossSignalScope.ts +22 -8
- package/Utils/Telemetry/EntityRelationship.ts +8 -0
- package/Utils/Telemetry/LockedFilterSearch.ts +366 -0
- package/Utils/Telemetry/NetworkHost.ts +43 -0
- package/Utils/Telemetry/OriginAllowList.ts +139 -4
- package/Utils/Traces/CriticalPath.ts +10 -4
- package/build/dist/Models/AnalyticsModels/AuditLog.js +70 -1
- package/build/dist/Models/AnalyticsModels/AuditLog.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +4 -4
- package/build/dist/Models/DatabaseModels/Alert.js +60 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +64 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisodePublicNote.js +75 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisodePublicNote.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentPublicNote.js +75 -0
- package/build/dist/Models/DatabaseModels/IncidentPublicNote.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +10 -4
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +68 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiagnostic.js +772 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiagnostic.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +140 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +42 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +75 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js.map +1 -1
- package/build/dist/Models/DatabaseModels/{GoogleSecOpsConnection.js → SecurityEventConnection.js} +87 -75
- package/build/dist/Models/DatabaseModels/SecurityEventConnection.js.map +1 -0
- package/build/dist/Models/DatabaseModels/{GoogleSecOpsConnectionRun.js → SecurityEventConnectionRun.js} +37 -37
- package/build/dist/Models/DatabaseModels/SecurityEventConnectionRun.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjective.js +192 -10
- package/build/dist/Models/DatabaseModels/ServiceLevelObjective.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +798 -96
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveFeed.js +596 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.js +590 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.js +16 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.js +16 -0
- package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js +75 -0
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js +2 -2
- package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +336 -27
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +14 -0
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/BillingInvoiceAPI.js +233 -19
- package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
- package/build/dist/Server/API/BillingPaymentMethodAPI.js +86 -5
- package/build/dist/Server/API/BillingPaymentMethodAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +72 -2
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/SecurityEventConnectionAPI.js +263 -0
- package/build/dist/Server/API/SecurityEventConnectionAPI.js.map +1 -0
- package/build/dist/Server/API/StatusPageAPI.js +236 -154
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +248 -170
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.js +21 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.js +207 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.js +72 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.js +46 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +57 -4
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js +112 -56
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js +167 -68
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js +87 -26
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js +270 -203
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +498 -354
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js +97 -34
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +91 -8
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AuditLogService.js +408 -44
- package/build/dist/Server/Services/AuditLogService.js.map +1 -1
- package/build/dist/Server/Services/BillingInvoiceService.js +94 -85
- package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +406 -14
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +189 -101
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +135 -86
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +189 -100
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js +117 -69
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +125 -18
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +189 -101
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +145 -91
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +191 -101
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +7 -16
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +190 -102
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js +112 -56
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js +220 -63
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js +87 -26
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js +24 -0
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +258 -192
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +519 -376
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js +95 -32
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js +24 -0
- package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +90 -5
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js +113 -65
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +10 -4
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/InventoryItemService.js +22 -0
- package/build/dist/Server/Services/InventoryItemService.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js +117 -69
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +145 -91
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +191 -101
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/LabelService.js +20 -25
- package/build/dist/Server/Services/LabelService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +8 -17
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +4 -14
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js +123 -77
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js +167 -82
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorProbeService.js +18 -2
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +11 -9
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +287 -5
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiagnosticService.js +333 -0
- package/build/dist/Server/Services/NetworkDeviceDiagnosticService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +117 -69
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +36 -2
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js +117 -64
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js +173 -83
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js +116 -65
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +189 -101
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +82 -10
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +189 -101
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +111 -63
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +161 -77
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js +117 -69
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +280 -209
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +521 -376
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +24 -0
- package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +24 -8
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/{GoogleSecOpsConnectionRunService.js → SecurityEventConnectionRunService.js} +2 -2
- package/build/dist/Server/Services/SecurityEventConnectionRunService.js.map +1 -0
- package/build/dist/Server/Services/SecurityEventConnectionService.js +396 -0
- package/build/dist/Server/Services/SecurityEventConnectionService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +115 -62
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +163 -77
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js +769 -18
- package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveFeedService.js +96 -0
- package/build/dist/Server/Services/ServiceLevelObjectiveFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.js +614 -87
- package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleService.js +844 -0
- package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLevelObjectiveOwnerTeamService.js +207 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveOwnerUserService.js +221 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLevelObjectiveService.js +997 -50
- package/build/dist/Server/Services/ServiceLevelObjectiveService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +191 -102
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageAnnouncementService.js +12 -0
- package/build/dist/Server/Services/StatusPageAnnouncementService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js +118 -70
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js +158 -76
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js +19 -215
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +6 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +27 -5
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/ThreatIntelFeedService.js +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +51 -25
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js +141 -92
- package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js +189 -101
- package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js +117 -69
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js +171 -83
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -0
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js +17 -0
- package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +3 -0
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -1
- package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js +31 -0
- package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +14 -7
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationEvidence.js +468 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationEvidence.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationReferences.js +230 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationReferences.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +24 -1
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js +21 -1
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +32 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SloTools.js +337 -53
- package/build/dist/Server/Utils/AI/Toolbox/SloTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js +6 -2
- package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +59 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js +108 -15
- package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js +2 -2
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js +115 -6
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js.map +1 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +13 -0
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationValueUtil.js +82 -0
- package/build/dist/Server/Utils/Database/RelationValueUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js +10 -6
- package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +17 -21
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +5 -3
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.js +5 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js +50 -10
- package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +13 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +6 -10
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Rules/MonitorRulePatternValidator.js +34 -0
- package/build/dist/Server/Utils/Rules/MonitorRulePatternValidator.js.map +1 -0
- package/build/dist/Server/Utils/Rules/OwnerRuleAssignment.js +69 -0
- package/build/dist/Server/Utils/Rules/OwnerRuleAssignment.js.map +1 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleApplication.js +25 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleApplication.js.map +1 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunPermission.js +128 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunPermission.js.map +1 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js +746 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js.map +1 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunner.js +221 -0
- package/build/dist/Server/Utils/Rules/RuleRun/RuleRunner.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +3 -2
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.js +752 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.js +493 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.js +354 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.js +405 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.js +466 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.js +344 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.js +511 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/{GoogleSecOps → Connectors/GoogleSecOps}/GoogleSecOpsClient.js +401 -68
- package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.js +1417 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.js +406 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.js +336 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.js +474 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.js +417 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.js +314 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.js +494 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.js +839 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/{GoogleSecOps/GoogleSecOpsRunExecutor.js → Connectors/SecurityEventConnectionRunExecutor.js} +77 -50
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionRunExecutor.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.js +214 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.js +42 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.js +494 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.js +379 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Types.js +122 -0
- package/build/dist/Server/Utils/SecurityEvent/Connectors/Types.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventDedupe.js +52 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventDedupe.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +2 -2
- package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js +599 -32
- package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js.map +1 -1
- package/build/dist/Server/Utils/Slo/SloFeedUtil.js +150 -0
- package/build/dist/Server/Utils/Slo/SloFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.js +136 -0
- package/build/dist/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.js.map +1 -0
- package/build/dist/Server/Utils/Slo/SloMetricUtil.js +269 -0
- package/build/dist/Server/Utils/Slo/SloMetricUtil.js.map +1 -0
- package/build/dist/Server/Utils/Slo/SloOwnerReferenceValidator.js +134 -0
- package/build/dist/Server/Utils/Slo/SloOwnerReferenceValidator.js.map +1 -0
- package/build/dist/Server/Utils/Slo/SloRecordReferenceValidator.js +137 -0
- package/build/dist/Server/Utils/Slo/SloRecordReferenceValidator.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +10 -0
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js +6 -26
- package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageResource.js +31 -5
- package/build/dist/Server/Utils/StatusPageResource.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +8 -0
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/KubernetesResourceAttributes.js +80 -0
- package/build/dist/Server/Utils/Telemetry/KubernetesResourceAttributes.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js +122 -67
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ResourceFacetPlanner.js +146 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetPlanner.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +174 -248
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js +492 -0
- package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/TraceContextPropagation.js +259 -0
- package/build/dist/Server/Utils/Telemetry/TraceContextPropagation.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry.js +11 -5
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Types/AI/InvestigationEvidence.js +2 -0
- package/build/dist/Types/AI/InvestigationEvidence.js.map +1 -0
- package/build/dist/Types/Billing/SubscriptionStatus.js +37 -3
- package/build/dist/Types/Billing/SubscriptionStatus.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +5 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSloListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSloListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +275 -286
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Database/EnableAuditLog.js +19 -1
- package/build/dist/Types/Database/EnableAuditLog.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +4 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +45 -6
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +2 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDnsMonitor.js +3 -1
- package/build/dist/Types/Monitor/MonitorStepDnsMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDnssecMonitor.js +3 -1
- package/build/dist/Types/Monitor/MonitorStepDnssecMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDomainMonitor.js +3 -1
- package/build/dist/Types/Monitor/MonitorStepDomainMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +3 -1
- package/build/dist/Types/Monitor/MonitorStepExternalStatusPageMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepRetries.js +47 -0
- package/build/dist/Types/Monitor/MonitorStepRetries.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js +3 -1
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js.map +1 -1
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticResult.js +29 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticResult.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.js +37 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticType.js +42 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticType.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDevicePingMetricNames.js +20 -0
- package/build/dist/Types/NetworkDevice/NetworkDevicePingMetricNames.js.map +1 -0
- package/build/dist/Types/Permission.js +116 -2
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js +5 -0
- package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js.map +1 -1
- package/build/dist/Types/Rules/RuleRun.js +267 -0
- package/build/dist/Types/Rules/RuleRun.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplay.js +95 -0
- package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplayApi.js.map +1 -1
- package/build/dist/Types/SecurityEvent/Connectors/ConnectorDiagnostics.js +18 -0
- package/build/dist/Types/SecurityEvent/Connectors/ConnectorDiagnostics.js.map +1 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.js +17 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.js.map +1 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +439 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js.map +1 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js +39 -0
- package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js.map +1 -0
- package/build/dist/Types/SecurityEvent/GoogleSecOpsRegion.js +35 -0
- package/build/dist/Types/SecurityEvent/GoogleSecOpsRegion.js.map +1 -0
- package/build/dist/Types/ServiceLevelObjective/SloHistoryMetricName.js +26 -0
- package/build/dist/Types/ServiceLevelObjective/SloHistoryMetricName.js.map +1 -0
- package/build/dist/Types/ServiceLevelObjective/SloMetricType.js +45 -0
- package/build/dist/Types/ServiceLevelObjective/SloMetricType.js.map +1 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js +4 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js.map +1 -1
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js +295 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTrigger.js +13 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTrigger.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js +67 -0
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js.map +1 -0
- package/build/dist/Types/Telemetry/EntityType.js +14 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ExceptionSpanScope.js +59 -0
- package/build/dist/Types/Telemetry/ExceptionSpanScope.js.map +1 -0
- package/build/dist/Types/Telemetry/LockedFilterDetail.js +16 -0
- package/build/dist/Types/Telemetry/LockedFilterDetail.js.map +1 -0
- package/build/dist/Types/Telemetry/ResourceEntityFacet.js +16 -10
- package/build/dist/Types/Telemetry/ResourceEntityFacet.js.map +1 -1
- package/build/dist/Types/Telemetry/ResourceFacetCatalog.js +119 -0
- package/build/dist/Types/Telemetry/ResourceFacetCatalog.js.map +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js +7 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/AlertBanner/AlertBanner.js +48 -19
- package/build/dist/UI/Components/AlertBanner/AlertBanner.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +10 -2
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +34 -17
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/Checkbox/Checkbox.js +6 -4
- package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
- package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js +5 -1
- package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Detail/Detail.js +74 -15
- package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +33 -5
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/EmptyState/EmptyState.js +3 -3
- package/build/dist/UI/Components/EmptyState/EmptyState.js.map +1 -1
- package/build/dist/UI/Components/EmptyState/EmptyStateGuideLinks.js +47 -0
- package/build/dist/UI/Components/EmptyState/EmptyStateGuideLinks.js.map +1 -0
- package/build/dist/UI/Components/ErrorBoundary.js +34 -0
- package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +6 -5
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/LabelRule/LabelRuleTable.js +6 -2
- package/build/dist/UI/Components/LabelRule/LabelRuleTable.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsEntityNames.js +535 -0
- package/build/dist/UI/Components/LogsViewer/LogsEntityNames.js.map +1 -0
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +117 -57
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +3 -7
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/FacetSection.js +31 -44
- package/build/dist/UI/Components/LogsViewer/components/FacetSection.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js +17 -3
- package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js +19 -3
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +64 -18
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +100 -41
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js +13 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/types.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/InlineReferences.js +403 -0
- package/build/dist/UI/Components/Markdown.tsx/InlineReferences.js.map +1 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +197 -179
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js +30 -21
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +12 -0
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js +46 -12
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +26 -7
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +3 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
- package/build/dist/UI/Components/Page/ModelPage.js +62 -34
- package/build/dist/UI/Components/Page/ModelPage.js.map +1 -1
- package/build/dist/UI/Components/RuleRun/RuleDetailFields.js +226 -0
- package/build/dist/UI/Components/RuleRun/RuleDetailFields.js.map +1 -0
- package/build/dist/UI/Components/RuleRun/RuleTable.js +97 -0
- package/build/dist/UI/Components/RuleRun/RuleTable.js.map +1 -0
- package/build/dist/UI/Components/RuleRun/RuleView.js +83 -0
- package/build/dist/UI/Components/RuleRun/RuleView.js.map +1 -0
- package/build/dist/UI/Components/RuleRun/RunRuleNowModal.js +74 -0
- package/build/dist/UI/Components/RuleRun/RunRuleNowModal.js.map +1 -0
- package/build/dist/UI/Components/RuleRun/RunRulesBulkAction.js +78 -0
- package/build/dist/UI/Components/RuleRun/RunRulesBulkAction.js.map +1 -0
- package/build/dist/UI/Components/Table/Table.js +3 -1
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +8 -1
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js +111 -0
- package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/ResourceFacetConfigs.js +22 -0
- package/build/dist/UI/Components/TelemetryViewer/ResourceFacetConfigs.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/FacetSearchInput.js +36 -0
- package/build/dist/UI/Components/TelemetryViewer/components/FacetSearchInput.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/FacetSectionHeader.js +21 -0
- package/build/dist/UI/Components/TelemetryViewer/components/FacetSectionHeader.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/FacetShowMoreButton.js +14 -0
- package/build/dist/UI/Components/TelemetryViewer/components/FacetShowMoreButton.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.js +27 -0
- package/build/dist/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js +202 -0
- package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js +2 -6
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js +111 -12
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js +27 -40
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js +70 -10
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js +17 -3
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/types.js +0 -4
- package/build/dist/UI/Components/TelemetryViewer/types.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/useFacetSearchExemptions.js +70 -0
- package/build/dist/UI/Components/TelemetryViewer/useFacetSearchExemptions.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/useFacetSectionSearch.js +52 -0
- package/build/dist/UI/Components/TelemetryViewer/useFacetSectionSearch.js.map +1 -0
- package/build/dist/UI/Utils/Clipboard.js +59 -2
- package/build/dist/UI/Utils/Clipboard.js.map +1 -1
- package/build/dist/UI/Utils/Navigation.js +11 -2
- package/build/dist/UI/Utils/Navigation.js.map +1 -1
- package/build/dist/UI/Utils/Rules/RuleRunClient.js +98 -0
- package/build/dist/UI/Utils/Rules/RuleRunClient.js.map +1 -0
- package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js +479 -0
- package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js.map +1 -0
- package/build/dist/UI/Utils/Telemetry/UseTelemetryEntityNames.js +113 -0
- package/build/dist/UI/Utils/Telemetry/UseTelemetryEntityNames.js.map +1 -0
- package/build/dist/Utils/AI/InvestigationReport.js +1241 -0
- package/build/dist/Utils/AI/InvestigationReport.js.map +1 -0
- package/build/dist/Utils/API.js +25 -0
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardSloComponent.js +16 -2
- package/build/dist/Utils/Dashboard/Components/DashboardSloComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardSloListComponent.js +94 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSloListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +4 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Dashboard/SloWidgetSource.js +125 -0
- package/build/dist/Utils/Dashboard/SloWidgetSource.js.map +1 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js +49 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +112 -34
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +22 -0
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js +129 -0
- package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RunImportedDeviceNaming.js +255 -0
- package/build/dist/Utils/NetworkDiscovery/RunImportedDeviceNaming.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ShortDeviceNamePlanner.js +184 -0
- package/build/dist/Utils/NetworkDiscovery/ShortDeviceNamePlanner.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ShortHostnameUtil.js +79 -0
- package/build/dist/Utils/NetworkDiscovery/ShortHostnameUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/CidrMatchUtil.js +21 -12
- package/build/dist/Utils/NetworkSite/CidrMatchUtil.js.map +1 -1
- package/build/dist/Utils/Project/DataResidency.js +51 -0
- package/build/dist/Utils/Project/DataResidency.js.map +1 -0
- package/build/dist/Utils/Rules/RuleRunSummary.js +197 -0
- package/build/dist/Utils/Rules/RuleRunSummary.js.map +1 -0
- package/build/dist/Utils/Rum/SessionReplayHealth.js +10 -0
- package/build/dist/Utils/Rum/SessionReplayHealth.js.map +1 -1
- package/build/dist/Utils/Rum/SessionReplayRecordingEnded.js +54 -0
- package/build/dist/Utils/Rum/SessionReplayRecordingEnded.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.js +311 -0
- package/build/dist/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.js +150 -0
- package/build/dist/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.js +328 -0
- package/build/dist/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.js +405 -0
- package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.js +212 -0
- package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/OktaNormalizer.js +351 -0
- package/build/dist/Utils/SecurityEvent/Connectors/OktaNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Connectors/SplunkNormalizer.js +348 -0
- package/build/dist/Utils/SecurityEvent/Connectors/SplunkNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +103 -10
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -1
- package/build/dist/Utils/Slo/SloAffectedResourceMarkdown.js +51 -0
- package/build/dist/Utils/Slo/SloAffectedResourceMarkdown.js.map +1 -0
- package/build/dist/Utils/Slo/SloBurnRateTemplate.js +228 -0
- package/build/dist/Utils/Slo/SloBurnRateTemplate.js.map +1 -0
- package/build/dist/Utils/Slo/SloFeedMarkdown.js +934 -0
- package/build/dist/Utils/Slo/SloFeedMarkdown.js.map +1 -0
- package/build/dist/Utils/Slo/SloHealth.js +75 -9
- package/build/dist/Utils/Slo/SloHealth.js.map +1 -1
- package/build/dist/Utils/Slo/SloListWidgetFormat.js +217 -0
- package/build/dist/Utils/Slo/SloListWidgetFormat.js.map +1 -0
- package/build/dist/Utils/Slo/SloMetricType.js +212 -0
- package/build/dist/Utils/Slo/SloMetricType.js.map +1 -0
- package/build/dist/Utils/Slo/SloMonitorRuleCriteria.js +216 -0
- package/build/dist/Utils/Slo/SloMonitorRuleCriteria.js.map +1 -0
- package/build/dist/Utils/Slo/SloMonitorStatusSummary.js +129 -0
- package/build/dist/Utils/Slo/SloMonitorStatusSummary.js.map +1 -0
- package/build/dist/Utils/Slo/SloOverviewText.js +110 -0
- package/build/dist/Utils/Slo/SloOverviewText.js.map +1 -0
- package/build/dist/Utils/Slo/SloProjection.js +448 -0
- package/build/dist/Utils/Slo/SloProjection.js.map +1 -0
- package/build/dist/Utils/Slo/SloWidgetFormat.js +4 -2
- package/build/dist/Utils/Slo/SloWidgetFormat.js.map +1 -1
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +16 -5
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityRelationship.js +7 -0
- package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
- package/build/dist/Utils/Telemetry/LockedFilterSearch.js +252 -0
- package/build/dist/Utils/Telemetry/LockedFilterSearch.js.map +1 -0
- package/build/dist/Utils/Telemetry/NetworkHost.js +39 -0
- package/build/dist/Utils/Telemetry/NetworkHost.js.map +1 -0
- package/build/dist/Utils/Telemetry/OriginAllowList.js +105 -4
- package/build/dist/Utils/Telemetry/OriginAllowList.js.map +1 -1
- package/build/dist/Utils/Traces/CriticalPath.js +9 -4
- package/build/dist/Utils/Traces/CriticalPath.js.map +1 -1
- package/package.json +1 -1
- package/Server/API/GoogleSecOpsConnectionAPI.ts +0 -79
- package/Server/Services/GoogleSecOpsConnectionService.ts +0 -101
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +0 -774
- package/Tests/App/Dashboard/GoogleSecOpsConnectionsErrors.test.tsx +0 -423
- package/Tests/App/Dashboard/GoogleSecOpsDiagnostics.test.tsx +0 -724
- package/Tests/Server/API/GoogleSecOpsConnectionAPI.test.ts +0 -248
- package/Tests/Server/Services/GoogleSecOpsDiagnosticsModel.test.ts +0 -153
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.test.ts +0 -711
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsDiagnostics.test.ts +0 -838
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +0 -716
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +0 -860
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerHardening.test.ts +0 -1231
- package/Tests/UI/Rum/RecordingHealthStrip.test.tsx +0 -600
- package/Types/SecurityEvent/GoogleSecOpsDiagnostics.ts +0 -56
- package/UI/Components/GanttChart/Bar/BarLabel.tsx +0 -17
- package/UI/Components/GanttChart/Bar/Index.tsx +0 -149
- package/UI/Components/GanttChart/ChartContainer.tsx +0 -50
- package/UI/Components/GanttChart/Index.tsx +0 -90
- package/UI/Components/GanttChart/Row/Index.tsx +0 -22
- package/UI/Components/GanttChart/Row/Row.tsx +0 -231
- package/UI/Components/GanttChart/Row/RowLabel.tsx +0 -30
- package/UI/Components/GanttChart/Rows.tsx +0 -59
- package/UI/Components/GanttChart/Timeline/Index.tsx +0 -46
- package/UI/Components/GanttChart/Timeline/TimelineInterval.tsx +0 -33
- package/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.tsx +0 -43
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +0 -1
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnectionRun.js.map +0 -1
- package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js +0 -56
- package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js.map +0 -1
- package/build/dist/Server/Services/GoogleSecOpsConnectionRunService.js.map +0 -1
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +0 -62
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +0 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +0 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +0 -577
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +0 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.js.map +0 -1
- package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js +0 -2
- package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Bar/BarLabel.js +0 -8
- package/build/dist/UI/Components/GanttChart/Bar/BarLabel.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Bar/Index.js +0 -77
- package/build/dist/UI/Components/GanttChart/Bar/Index.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/ChartContainer.js +0 -33
- package/build/dist/UI/Components/GanttChart/ChartContainer.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Index.js +0 -39
- package/build/dist/UI/Components/GanttChart/Index.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Row/Index.js +0 -7
- package/build/dist/UI/Components/GanttChart/Row/Index.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Row/Row.js +0 -106
- package/build/dist/UI/Components/GanttChart/Row/Row.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Row/RowLabel.js +0 -10
- package/build/dist/UI/Components/GanttChart/Row/RowLabel.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Rows.js +0 -19
- package/build/dist/UI/Components/GanttChart/Rows.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Timeline/Index.js +0 -16
- package/build/dist/UI/Components/GanttChart/Timeline/Index.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Timeline/TimelineInterval.js +0 -13
- package/build/dist/UI/Components/GanttChart/Timeline/TimelineInterval.js.map +0 -1
- package/build/dist/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.js +0 -13
- package/build/dist/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.js.map +0 -1
|
@@ -4,6 +4,8 @@ import ExceptionInstanceService from "../../../../Server/Services/ExceptionInsta
|
|
|
4
4
|
import { Statement } from "../../../../Server/Utils/AnalyticsDatabase/Statement";
|
|
5
5
|
import SessionReplayReadService, {
|
|
6
6
|
MAX_LIST_ROUTES,
|
|
7
|
+
MAX_SESSION_REPLAY_SESSION_ID_LENGTH,
|
|
8
|
+
MAX_SESSION_REPLAY_SUMMARIES_BATCH_SIZE,
|
|
7
9
|
MAX_SESSION_REPLAY_USERS_LIMIT,
|
|
8
10
|
SESSION_REPLAY_ACTIVITY_SUMMARY_CACHE_TTL_MS,
|
|
9
11
|
SessionReplayApplicationActivitySummary,
|
|
@@ -17,15 +19,25 @@ import SessionReplayReadService, {
|
|
|
17
19
|
SessionReplayManifest,
|
|
18
20
|
SessionReplaySessionHeader,
|
|
19
21
|
SessionReplaySessionIdentity,
|
|
22
|
+
SessionReplaySummariesRequest,
|
|
23
|
+
SessionReplaySummary,
|
|
20
24
|
SessionReplayUserRollup,
|
|
21
25
|
SessionReplayUsersRequest,
|
|
22
26
|
SessionReplayUsersResult,
|
|
23
27
|
} from "../../../../Server/Utils/SessionReplay/SessionReplayReadService";
|
|
28
|
+
import logger from "../../../../Server/Utils/Logger";
|
|
24
29
|
import BadDataException from "../../../../Types/Exception/BadDataException";
|
|
25
30
|
import { JSONObject } from "../../../../Types/JSON";
|
|
26
31
|
import ObjectID from "../../../../Types/ObjectID";
|
|
27
|
-
import
|
|
32
|
+
import AnalyticsTableName from "../../../../Types/AnalyticsDatabase/AnalyticsTableName";
|
|
33
|
+
import {
|
|
34
|
+
MAX_SESSION_REPLAY_CHUNKS_PER_SESSION,
|
|
35
|
+
MAX_SESSION_REPLAY_READ_BYTES,
|
|
36
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS,
|
|
37
|
+
SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS,
|
|
38
|
+
} from "../../../../Types/Rum/SessionReplay";
|
|
28
39
|
import { SessionReplaySortBy } from "../../../../Types/Rum/SessionReplayApi";
|
|
40
|
+
import ServiceType from "../../../../Types/Telemetry/ServiceType";
|
|
29
41
|
import { afterEach, beforeEach, describe, expect, test } from "@jest/globals";
|
|
30
42
|
|
|
31
43
|
/*
|
|
@@ -136,6 +148,173 @@ describe("SessionReplayReadService statements", () => {
|
|
|
136
148
|
return statementOf(headerQuerySpy).query;
|
|
137
149
|
}
|
|
138
150
|
|
|
151
|
+
function summariesRequest(
|
|
152
|
+
overrides: Partial<SessionReplaySummariesRequest> = {},
|
|
153
|
+
): SessionReplaySummariesRequest {
|
|
154
|
+
return {
|
|
155
|
+
projectId: projectId,
|
|
156
|
+
rumApplicationId: rumApplicationId,
|
|
157
|
+
sessionIds: ["session-a", "session-b"],
|
|
158
|
+
...overrides,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
describe("session summary batch", () => {
|
|
163
|
+
test("uses one application-scoped argMax query with only non-identity summary columns", async () => {
|
|
164
|
+
await SessionReplayReadService.getSessionSummaries(summariesRequest());
|
|
165
|
+
|
|
166
|
+
expect(headerQuerySpy).toHaveBeenCalledTimes(1);
|
|
167
|
+
expect(chunkQuerySpy).not.toHaveBeenCalled();
|
|
168
|
+
|
|
169
|
+
const statement: Statement = statementOf(headerQuerySpy);
|
|
170
|
+
const query: string = statement.query;
|
|
171
|
+
|
|
172
|
+
expect(query).toMatch(/FROM \{p\d+:Identifier\}/);
|
|
173
|
+
expect(query).toContain("projectId = ");
|
|
174
|
+
expect(query).toContain("rumApplicationId = ");
|
|
175
|
+
expect(query).toContain("sessionId IN (");
|
|
176
|
+
expect(query).toContain(
|
|
177
|
+
"GROUP BY projectId, rumApplicationId, sessionId",
|
|
178
|
+
);
|
|
179
|
+
expect(query).toContain("argMax(startTime, version)");
|
|
180
|
+
expect(query).toContain("argMax(entryUrl, version)");
|
|
181
|
+
expect(query).toContain("argMax(browserName, version)");
|
|
182
|
+
expect(query).toContain("argMax(browserVersion, version)");
|
|
183
|
+
expect(query).toContain("argMax(osName, version)");
|
|
184
|
+
expect(query).toContain("argMax(deviceType, version)");
|
|
185
|
+
expect(query).toContain("retentionDate >= now()");
|
|
186
|
+
expect(query).toContain("timeout_overflow_mode = 'throw'");
|
|
187
|
+
expect(query).not.toContain(" FINAL");
|
|
188
|
+
|
|
189
|
+
for (const forbiddenColumn of [
|
|
190
|
+
"identifiedUserKey",
|
|
191
|
+
"identifiedUserLabel",
|
|
192
|
+
"identifiedUserTraits",
|
|
193
|
+
"visitorId",
|
|
194
|
+
"payload",
|
|
195
|
+
"exitUrl",
|
|
196
|
+
"countryCode",
|
|
197
|
+
]) {
|
|
198
|
+
expect(query).not.toContain(forbiddenColumn);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const values: Array<unknown> = boundValues(statement);
|
|
202
|
+
expect(values).toContain(AnalyticsTableName.RumSession);
|
|
203
|
+
expect(values).toContain(projectId.toString());
|
|
204
|
+
expect(values).toContain(rumApplicationId.toString());
|
|
205
|
+
expect(values).toContainEqual(["session-a", "session-b"]);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
test("deduplicates ids, returns stable request order and omits missing or unexpected rows", async () => {
|
|
209
|
+
headerQuerySpy.mockResolvedValue(
|
|
210
|
+
fakeResultSet([
|
|
211
|
+
{
|
|
212
|
+
sessionId: "not-requested",
|
|
213
|
+
aggStartTime: 1,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
sessionId: "session-b",
|
|
217
|
+
aggStartTime: 1700000200000,
|
|
218
|
+
aggDurationMs: "45000",
|
|
219
|
+
aggEntryUrl: "https://example.com/checkout",
|
|
220
|
+
aggBrowserName: "Firefox",
|
|
221
|
+
aggBrowserVersion: "130",
|
|
222
|
+
aggOsName: "Linux",
|
|
223
|
+
aggDeviceType: "desktop",
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
sessionId: "session-a",
|
|
227
|
+
aggStartTime: 1700000100000,
|
|
228
|
+
aggDurationMs: 15000,
|
|
229
|
+
aggEntryUrl: "https://example.com/",
|
|
230
|
+
aggBrowserName: "Safari",
|
|
231
|
+
aggBrowserVersion: "18",
|
|
232
|
+
aggOsName: "iOS",
|
|
233
|
+
aggDeviceType: "mobile",
|
|
234
|
+
},
|
|
235
|
+
/* Defensive duplicate driver rows never duplicate the response. */
|
|
236
|
+
{
|
|
237
|
+
sessionId: "session-a",
|
|
238
|
+
aggStartTime: 2,
|
|
239
|
+
},
|
|
240
|
+
]) as never,
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
const summaries: Array<SessionReplaySummary> =
|
|
244
|
+
await SessionReplayReadService.getSessionSummaries(
|
|
245
|
+
summariesRequest({
|
|
246
|
+
sessionIds: [
|
|
247
|
+
"session-a",
|
|
248
|
+
"session-b",
|
|
249
|
+
"session-a",
|
|
250
|
+
"missing-session",
|
|
251
|
+
],
|
|
252
|
+
}),
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
expect(summaries).toEqual([
|
|
256
|
+
{
|
|
257
|
+
sessionId: "session-a",
|
|
258
|
+
startTime: new Date(1700000100000),
|
|
259
|
+
startTimeUnixMs: 1700000100000,
|
|
260
|
+
durationMs: 15000,
|
|
261
|
+
entryUrl: "https://example.com/",
|
|
262
|
+
browserName: "Safari",
|
|
263
|
+
browserVersion: "18",
|
|
264
|
+
osName: "iOS",
|
|
265
|
+
deviceType: "mobile",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
sessionId: "session-b",
|
|
269
|
+
startTime: new Date(1700000200000),
|
|
270
|
+
startTimeUnixMs: 1700000200000,
|
|
271
|
+
durationMs: 45000,
|
|
272
|
+
entryUrl: "https://example.com/checkout",
|
|
273
|
+
browserName: "Firefox",
|
|
274
|
+
browserVersion: "130",
|
|
275
|
+
osName: "Linux",
|
|
276
|
+
deviceType: "desktop",
|
|
277
|
+
},
|
|
278
|
+
]);
|
|
279
|
+
|
|
280
|
+
const values: Array<unknown> = boundValues(statementOf(headerQuerySpy));
|
|
281
|
+
expect(values).toContainEqual([
|
|
282
|
+
"session-a",
|
|
283
|
+
"session-b",
|
|
284
|
+
"missing-session",
|
|
285
|
+
]);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
test.each([
|
|
289
|
+
{ name: "an empty batch", sessionIds: [] },
|
|
290
|
+
{ name: "an empty id", sessionIds: [""] },
|
|
291
|
+
{
|
|
292
|
+
name: "an overlong id",
|
|
293
|
+
sessionIds: ["x".repeat(MAX_SESSION_REPLAY_SESSION_ID_LENGTH + 1)],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "an oversized batch",
|
|
297
|
+
sessionIds: Array.from(
|
|
298
|
+
{ length: MAX_SESSION_REPLAY_SUMMARIES_BATCH_SIZE + 1 },
|
|
299
|
+
(_value: unknown, index: number): string => {
|
|
300
|
+
return `session-${index}`;
|
|
301
|
+
},
|
|
302
|
+
),
|
|
303
|
+
},
|
|
304
|
+
])(
|
|
305
|
+
"rejects $name before querying",
|
|
306
|
+
async ({ sessionIds }: { sessionIds: Array<string> }) => {
|
|
307
|
+
await expect(
|
|
308
|
+
SessionReplayReadService.getSessionSummaries(
|
|
309
|
+
summariesRequest({ sessionIds: sessionIds }),
|
|
310
|
+
),
|
|
311
|
+
).rejects.toBeInstanceOf(BadDataException);
|
|
312
|
+
|
|
313
|
+
expect(headerQuerySpy).not.toHaveBeenCalled();
|
|
314
|
+
},
|
|
315
|
+
);
|
|
316
|
+
});
|
|
317
|
+
|
|
139
318
|
describe("list predicates are HAVING clauses over argMax aliases", () => {
|
|
140
319
|
test("hasIdentifiedUser tests the digest alias, never the label", async () => {
|
|
141
320
|
const positive: string = await listQuery({ hasIdentifiedUser: true });
|
|
@@ -623,164 +802,863 @@ describe("SessionReplayReadService statements", () => {
|
|
|
623
802
|
});
|
|
624
803
|
});
|
|
625
804
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
805
|
+
/*
|
|
806
|
+
* The bug: a user closed the tab, the recorder sent its final chunk, and
|
|
807
|
+
* the sessions table kept saying "Recording now" for 10-15 minutes -
|
|
808
|
+
* because the only fact the list returned was isFinalized, and the
|
|
809
|
+
* finalizer only runs once a session has been idle for ten minutes. The
|
|
810
|
+
* list now also says whether every tab of an unfinalized session has
|
|
811
|
+
* ended, read from the chunk rows by the shared rule, once the same
|
|
812
|
+
* grace the finalizer waits on has passed.
|
|
813
|
+
*/
|
|
814
|
+
describe("hasRecordingEnded on the session list", () => {
|
|
815
|
+
/* An arbitrary fixed device clock: the end of a tab's final chunk. */
|
|
816
|
+
const FINAL_END: number = 1757000000000;
|
|
817
|
+
/*
|
|
818
|
+
* The SERVER unix ms the tab's newest chunk row was written (its
|
|
819
|
+
* version). Deliberately not FINAL_END: the grace is measured on the
|
|
820
|
+
* server clock, never on the device's.
|
|
821
|
+
*/
|
|
822
|
+
const STORED_AT: number = FINAL_END + 2345;
|
|
823
|
+
/* The first server "now" at which STORED_AT is past the grace. */
|
|
824
|
+
const GRACE_PASSED: number =
|
|
825
|
+
STORED_AT + SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS;
|
|
826
|
+
|
|
827
|
+
function request(
|
|
828
|
+
overrides: Partial<SessionReplayListRequest> = {},
|
|
829
|
+
): SessionReplayListRequest {
|
|
830
|
+
return listRequest({ nowUnixMs: GRACE_PASSED, ...overrides });
|
|
831
|
+
}
|
|
647
832
|
|
|
648
|
-
|
|
649
|
-
|
|
833
|
+
function listRow(sessionId: string, isFinalized: boolean): JSONObject {
|
|
834
|
+
return {
|
|
835
|
+
sessionId: sessionId,
|
|
836
|
+
applicationId: rumApplicationId.toString(),
|
|
837
|
+
aggStartTime: FINAL_END - 60000,
|
|
838
|
+
aggEndTime: FINAL_END,
|
|
839
|
+
aggIsFinalized: isFinalized ? 1 : 0,
|
|
840
|
+
aggSealedReason: isFinalized ? "final-chunk" : "",
|
|
841
|
+
};
|
|
842
|
+
}
|
|
650
843
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
844
|
+
/* A tab whose final chunk ended at FINAL_END and nothing started after. */
|
|
845
|
+
function endedTabRow(
|
|
846
|
+
sessionId: string,
|
|
847
|
+
tabId: string,
|
|
848
|
+
overrides: JSONObject = {},
|
|
849
|
+
): JSONObject {
|
|
850
|
+
return {
|
|
851
|
+
sessionId: sessionId,
|
|
852
|
+
tabId: tabId,
|
|
853
|
+
tabHasFinalChunk: 1,
|
|
854
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
855
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
856
|
+
tabMaxChunkIndex: 4,
|
|
857
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
858
|
+
...overrides,
|
|
859
|
+
};
|
|
860
|
+
}
|
|
655
861
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
862
|
+
/* A tab that has not sent a final chunk: maxIf's default end is epoch. */
|
|
863
|
+
function liveTabRow(
|
|
864
|
+
sessionId: string,
|
|
865
|
+
tabId: string,
|
|
866
|
+
overrides: JSONObject = {},
|
|
867
|
+
): JSONObject {
|
|
868
|
+
return {
|
|
869
|
+
sessionId: sessionId,
|
|
870
|
+
tabId: tabId,
|
|
871
|
+
tabHasFinalChunk: 0,
|
|
872
|
+
tabFinalChunkEndUnixMs: 0,
|
|
873
|
+
tabLastChunkStartUnixMs: FINAL_END,
|
|
874
|
+
tabMaxChunkIndex: 4,
|
|
875
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
876
|
+
...overrides,
|
|
877
|
+
};
|
|
878
|
+
}
|
|
662
879
|
|
|
663
|
-
|
|
880
|
+
function mockPage(rows: Array<JSONObject>): void {
|
|
881
|
+
headerQuerySpy.mockResolvedValue(fakeResultSet(rows) as never);
|
|
882
|
+
}
|
|
664
883
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
rumApplicationId: rumApplicationId,
|
|
669
|
-
});
|
|
884
|
+
function mockChunkFacts(rows: Array<JSONObject>): void {
|
|
885
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(rows) as never);
|
|
886
|
+
}
|
|
670
887
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
888
|
+
function endedBySessionId(
|
|
889
|
+
result: SessionReplayListResult,
|
|
890
|
+
): Record<string, boolean> {
|
|
891
|
+
const ended: Record<string, boolean> = {};
|
|
675
892
|
|
|
676
|
-
|
|
677
|
-
|
|
893
|
+
for (const session of result.sessions) {
|
|
894
|
+
ended[session.sessionId] = session.hasRecordingEnded;
|
|
895
|
+
}
|
|
678
896
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
projectId: projectId,
|
|
682
|
-
sessionId: "s-1",
|
|
683
|
-
});
|
|
897
|
+
return ended;
|
|
898
|
+
}
|
|
684
899
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
expect(header!.expiresAtUnixMs).toBe(1700604800000);
|
|
691
|
-
expect(header!.clickCount).toBe(7);
|
|
692
|
-
expect(header!.customEventCount).toBe(2);
|
|
693
|
-
expect(header!.activeMs).toBe(30000);
|
|
694
|
-
expect(header!.firstErrorOffsetMs).toBe(5000);
|
|
695
|
-
/* A stored value outside the vocabulary never reaches the player. */
|
|
696
|
-
expect(header!.recorderCapabilities).toEqual([
|
|
697
|
-
"click-events",
|
|
698
|
-
"web-vitals",
|
|
900
|
+
test("the follow-up is one parameterised, application-pinned, per-tab key-range read over the chunk table", async () => {
|
|
901
|
+
mockPage([
|
|
902
|
+
listRow("s-1", false),
|
|
903
|
+
listRow("s-2", true),
|
|
904
|
+
listRow("s-3", false),
|
|
699
905
|
]);
|
|
700
|
-
expect(header!.identifiedUserLabel).toBeUndefined();
|
|
701
|
-
expect(header!.identifiedUserTraits).toBeUndefined();
|
|
702
|
-
});
|
|
703
906
|
|
|
704
|
-
|
|
705
|
-
* The digest alias was always SELECTed by the header read and simply
|
|
706
|
-
* never mapped, so the player had no key to hand back to /list for
|
|
707
|
-
* "this person's other sessions". Both keys ride on the header read
|
|
708
|
-
* itself - not on the separate, identity-gated getSessionIdentity -
|
|
709
|
-
* because neither names anyone.
|
|
710
|
-
*/
|
|
711
|
-
test("maps the identity digest and the visitor id off the header read, without the identity columns", async () => {
|
|
712
|
-
headerQuerySpy.mockResolvedValue(fakeResultSet([headerRow]) as never);
|
|
907
|
+
await SessionReplayReadService.listSessions(request());
|
|
713
908
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
projectId: projectId,
|
|
717
|
-
sessionId: "s-1",
|
|
718
|
-
});
|
|
909
|
+
expect(headerQuerySpy).toHaveBeenCalledTimes(1);
|
|
910
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(1);
|
|
719
911
|
|
|
720
|
-
const
|
|
912
|
+
const statement: Statement = statementOf(chunkQuerySpy);
|
|
913
|
+
const query: string = statement.query;
|
|
914
|
+
const bound: Array<unknown> = boundValues(statement);
|
|
915
|
+
|
|
916
|
+
/* The chunk table, bound as an identifier like every other read. */
|
|
917
|
+
expect(bound).toContain(AnalyticsTableName.RumSessionChunk);
|
|
918
|
+
|
|
919
|
+
/* The sort-key prefix (projectId, sessionId) plus the app pin. */
|
|
920
|
+
expect(whereSection(query)).toMatch(/projectId = \{p\d+:String\}/);
|
|
921
|
+
expect(whereSection(query)).toMatch(
|
|
922
|
+
/AND sessionId IN \(\{p\d+:Array\(String\)\}\)/,
|
|
923
|
+
);
|
|
924
|
+
expect(whereSection(query)).toMatch(
|
|
925
|
+
/AND rumApplicationId = \{p\d+:String\}/,
|
|
926
|
+
);
|
|
927
|
+
expect(whereSection(query)).toContain("retentionDate >= now()");
|
|
928
|
+
expect(bound).toContain(projectId.toString());
|
|
929
|
+
expect(bound).toContain(rumApplicationId.toString());
|
|
930
|
+
|
|
931
|
+
/* Only the unfinalized sessions of the page, bound, never spelled. */
|
|
932
|
+
expect(bound).toContainEqual(["s-1", "s-3"]);
|
|
933
|
+
expect(query).not.toContain("'s-1'");
|
|
934
|
+
expect(query).not.toContain("'s-3'");
|
|
935
|
+
for (const value of bound) {
|
|
936
|
+
if (Array.isArray(value)) {
|
|
937
|
+
expect(value).not.toContain("s-2");
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/* Per tab, with exactly the five documented facts. */
|
|
942
|
+
expect(query).toContain("GROUP BY sessionId, tabId");
|
|
943
|
+
expect(query).toContain("max(toUInt8(isFinal)) AS tabHasFinalChunk");
|
|
721
944
|
expect(query).toContain(
|
|
722
|
-
"
|
|
945
|
+
"toFloat64(toUnixTimestamp64Milli(maxIf(chunkEndTime, isFinal))) AS tabFinalChunkEndUnixMs",
|
|
946
|
+
);
|
|
947
|
+
expect(query).toContain(
|
|
948
|
+
"toFloat64(toUnixTimestamp64Milli(max(chunkStartTime))) AS tabLastChunkStartUnixMs",
|
|
949
|
+
);
|
|
950
|
+
expect(query).toContain("toFloat64(max(chunkIndex)) AS tabMaxChunkIndex");
|
|
951
|
+
expect(query).toContain(
|
|
952
|
+
"toFloat64(max(version)) AS tabLastChunkStoredAtUnixMs",
|
|
723
953
|
);
|
|
724
|
-
expect(query).toContain("argMax(visitorId, version) AS aggVisitorId");
|
|
725
|
-
expect(query).not.toContain("identifiedUserLabel");
|
|
726
954
|
|
|
727
|
-
|
|
728
|
-
|
|
955
|
+
/*
|
|
956
|
+
* The grace is judged in the process against the rows' server write
|
|
957
|
+
* time, not in SQL against the device clock or now64().
|
|
958
|
+
*/
|
|
959
|
+
expect(query).not.toContain("now64(");
|
|
729
960
|
|
|
730
|
-
/*
|
|
731
|
-
|
|
732
|
-
|
|
961
|
+
/* Maxima need no de-duplication, and the payload is never named. */
|
|
962
|
+
expect(query).not.toContain("LIMIT 1 BY");
|
|
963
|
+
expect(query).not.toMatch(/\bpayload\b(?!Bytes)/);
|
|
964
|
+
expect(query).toContain("timeout_overflow_mode = 'throw'");
|
|
965
|
+
});
|
|
733
966
|
|
|
734
|
-
|
|
967
|
+
test("an unfinalized session whose single tab sent its final chunk reads as ended once the grace has passed (the closed-tab regression)", async () => {
|
|
968
|
+
mockPage([listRow("s-1", false)]);
|
|
969
|
+
mockChunkFacts([endedTabRow("s-1", "tab-1")]);
|
|
735
970
|
|
|
736
|
-
const
|
|
737
|
-
await SessionReplayReadService.
|
|
738
|
-
projectId: projectId,
|
|
739
|
-
sessionId: "s-1",
|
|
740
|
-
});
|
|
971
|
+
const result: SessionReplayListResult =
|
|
972
|
+
await SessionReplayReadService.listSessions(request());
|
|
741
973
|
|
|
742
|
-
expect(
|
|
743
|
-
expect(
|
|
974
|
+
expect(result.sessions).toHaveLength(1);
|
|
975
|
+
expect(result.sessions[0]!.isFinalized).toBe(false);
|
|
976
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(true);
|
|
744
977
|
});
|
|
745
978
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
979
|
+
/*
|
|
980
|
+
* The flap this grace exists for: in a multi-page app, page A's final
|
|
981
|
+
* chunk lands while page B (a new tab id under the same session) has
|
|
982
|
+
* not stored its first chunk yet. For that moment the only tab the
|
|
983
|
+
* rows know about has ended, and without a grace the list would say
|
|
984
|
+
* "Recording ended" for a session that is still recording, then flip
|
|
985
|
+
* back on the next poll.
|
|
986
|
+
*/
|
|
987
|
+
test.each([
|
|
988
|
+
["stored just now", 0, false],
|
|
989
|
+
["stored 20 s ago (page B's first chunk still on its way)", 20000, false],
|
|
990
|
+
[
|
|
991
|
+
"stored 1 ms short of the grace",
|
|
992
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS - 1,
|
|
993
|
+
false,
|
|
994
|
+
],
|
|
995
|
+
[
|
|
996
|
+
"stored exactly the grace ago",
|
|
997
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS,
|
|
998
|
+
true,
|
|
999
|
+
],
|
|
1000
|
+
[
|
|
1001
|
+
"stored well past the grace",
|
|
1002
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS + 5 * 60 * 1000,
|
|
1003
|
+
true,
|
|
1004
|
+
],
|
|
1005
|
+
] as Array<[string, number, boolean]>)(
|
|
1006
|
+
"a single sealed tab %s (%i ms old): hasRecordingEnded %s",
|
|
1007
|
+
async (_label: string, ageMs: number, expected: boolean) => {
|
|
1008
|
+
mockPage([listRow("s-1", false)]);
|
|
1009
|
+
mockChunkFacts([endedTabRow("s-1", "tab-1")]);
|
|
1010
|
+
|
|
1011
|
+
const result: SessionReplayListResult =
|
|
1012
|
+
await SessionReplayReadService.listSessions(
|
|
1013
|
+
request({ nowUnixMs: STORED_AT + ageMs }),
|
|
1014
|
+
);
|
|
1015
|
+
|
|
1016
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(expected);
|
|
1017
|
+
},
|
|
1018
|
+
);
|
|
753
1019
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1020
|
+
test("the grace is measured from the NEWEST stored chunk of any tab, not from the oldest seal", async () => {
|
|
1021
|
+
/*
|
|
1022
|
+
* Page A sealed and was stored long ago; page B sealed moments ago.
|
|
1023
|
+
* Page C may still be about to register, so the session is not over.
|
|
1024
|
+
*/
|
|
1025
|
+
mockPage([listRow("s-1", false)]);
|
|
1026
|
+
mockChunkFacts([
|
|
1027
|
+
endedTabRow("s-1", "tab-page-a", {
|
|
1028
|
+
tabLastChunkStoredAtUnixMs: STORED_AT - 10 * 60 * 1000,
|
|
758
1029
|
}),
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
1030
|
+
endedTabRow("s-1", "tab-page-b", {
|
|
1031
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
1032
|
+
}),
|
|
1033
|
+
]);
|
|
762
1034
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
aggIdentifiedUserLabel: "jane@example.com",
|
|
769
|
-
aggIdentifiedUserTraits: { plan: "pro", seats: 4 },
|
|
770
|
-
},
|
|
771
|
-
]) as never,
|
|
772
|
-
);
|
|
1035
|
+
const early: SessionReplayListResult =
|
|
1036
|
+
await SessionReplayReadService.listSessions(
|
|
1037
|
+
request({ nowUnixMs: GRACE_PASSED - 1 }),
|
|
1038
|
+
);
|
|
1039
|
+
expect(early.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
773
1040
|
|
|
774
|
-
const
|
|
775
|
-
await SessionReplayReadService.
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
1041
|
+
const late: SessionReplayListResult =
|
|
1042
|
+
await SessionReplayReadService.listSessions(
|
|
1043
|
+
request({ nowUnixMs: GRACE_PASSED }),
|
|
1044
|
+
);
|
|
1045
|
+
expect(late.sessions[0]!.hasRecordingEnded).toBe(true);
|
|
1046
|
+
});
|
|
780
1047
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1048
|
+
test("the grace reads the rows' server write time, not the device's chunk clock", async () => {
|
|
1049
|
+
/*
|
|
1050
|
+
* A device clock hours behind the server: its final chunk "ended"
|
|
1051
|
+
* long before now, but the row was stored seconds ago.
|
|
1052
|
+
*/
|
|
1053
|
+
mockPage([listRow("s-1", false)]);
|
|
1054
|
+
mockChunkFacts([
|
|
1055
|
+
endedTabRow("s-1", "tab-1", {
|
|
1056
|
+
tabFinalChunkEndUnixMs: FINAL_END - 3 * 60 * 60 * 1000,
|
|
1057
|
+
tabLastChunkStartUnixMs: FINAL_END - 3 * 60 * 60 * 1000 - 15000,
|
|
1058
|
+
}),
|
|
1059
|
+
]);
|
|
1060
|
+
|
|
1061
|
+
const result: SessionReplayListResult =
|
|
1062
|
+
await SessionReplayReadService.listSessions(
|
|
1063
|
+
request({ nowUnixMs: STORED_AT + 5000 }),
|
|
1064
|
+
);
|
|
1065
|
+
|
|
1066
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
test("without an injected clock the list measures the grace against Date.now()", async () => {
|
|
1070
|
+
mockPage([listRow("s-1", false)]);
|
|
1071
|
+
mockChunkFacts([endedTabRow("s-1", "tab-1")]);
|
|
1072
|
+
|
|
1073
|
+
const nowSpy: jest.SpyInstance = jest
|
|
1074
|
+
.spyOn(Date, "now")
|
|
1075
|
+
.mockReturnValue(GRACE_PASSED - 1);
|
|
1076
|
+
|
|
1077
|
+
const early: SessionReplayListResult =
|
|
1078
|
+
await SessionReplayReadService.listSessions(listRequest());
|
|
1079
|
+
expect(early.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
1080
|
+
|
|
1081
|
+
nowSpy.mockReturnValue(GRACE_PASSED);
|
|
1082
|
+
|
|
1083
|
+
const late: SessionReplayListResult =
|
|
1084
|
+
await SessionReplayReadService.listSessions(listRequest());
|
|
1085
|
+
expect(late.sessions[0]!.hasRecordingEnded).toBe(true);
|
|
1086
|
+
});
|
|
1087
|
+
|
|
1088
|
+
/*
|
|
1089
|
+
* A tab that reached the per-session chunk cap never gets a final
|
|
1090
|
+
* chunk: the ingest gate refuses every index past the last one, the
|
|
1091
|
+
* recorder's own truncation seal included. It has ended all the same.
|
|
1092
|
+
*/
|
|
1093
|
+
test.each([
|
|
1094
|
+
[
|
|
1095
|
+
"at the last permitted index, grace passed",
|
|
1096
|
+
MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
1097
|
+
GRACE_PASSED,
|
|
1098
|
+
true,
|
|
1099
|
+
],
|
|
1100
|
+
[
|
|
1101
|
+
"at the last permitted index, inside the grace",
|
|
1102
|
+
MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
1103
|
+
GRACE_PASSED - 1,
|
|
1104
|
+
false,
|
|
1105
|
+
],
|
|
1106
|
+
[
|
|
1107
|
+
"one index short of the cap, grace passed",
|
|
1108
|
+
MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 2,
|
|
1109
|
+
GRACE_PASSED,
|
|
1110
|
+
false,
|
|
1111
|
+
],
|
|
1112
|
+
] as Array<[string, number, number, boolean]>)(
|
|
1113
|
+
"a capped tab with no final chunk %s (index %i, now %i): hasRecordingEnded %s",
|
|
1114
|
+
async (
|
|
1115
|
+
_label: string,
|
|
1116
|
+
maxChunkIndex: number,
|
|
1117
|
+
nowUnixMs: number,
|
|
1118
|
+
expected: boolean,
|
|
1119
|
+
) => {
|
|
1120
|
+
mockPage([listRow("s-1", false)]);
|
|
1121
|
+
mockChunkFacts([
|
|
1122
|
+
liveTabRow("s-1", "tab-1", { tabMaxChunkIndex: maxChunkIndex }),
|
|
1123
|
+
]);
|
|
1124
|
+
|
|
1125
|
+
const result: SessionReplayListResult =
|
|
1126
|
+
await SessionReplayReadService.listSessions(
|
|
1127
|
+
request({ nowUnixMs: nowUnixMs }),
|
|
1128
|
+
);
|
|
1129
|
+
|
|
1130
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(expected);
|
|
1131
|
+
},
|
|
1132
|
+
);
|
|
1133
|
+
|
|
1134
|
+
test("one live tab among ended ones keeps the whole session recording", async () => {
|
|
1135
|
+
mockPage([listRow("s-1", false)]);
|
|
1136
|
+
mockChunkFacts([
|
|
1137
|
+
endedTabRow("s-1", "tab-1"),
|
|
1138
|
+
liveTabRow("s-1", "tab-2"),
|
|
1139
|
+
endedTabRow("s-1", "tab-3"),
|
|
1140
|
+
]);
|
|
1141
|
+
|
|
1142
|
+
const result: SessionReplayListResult =
|
|
1143
|
+
await SessionReplayReadService.listSessions(request());
|
|
1144
|
+
|
|
1145
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
test("an older recorder's trailing chunk inside the tolerance still ends the tab; one past it does not", async () => {
|
|
1149
|
+
mockPage([listRow("s-trailing", false), listRow("s-resumed", false)]);
|
|
1150
|
+
mockChunkFacts([
|
|
1151
|
+
endedTabRow("s-trailing", "tab-1", {
|
|
1152
|
+
tabLastChunkStartUnixMs:
|
|
1153
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS,
|
|
1154
|
+
}),
|
|
1155
|
+
endedTabRow("s-resumed", "tab-1", {
|
|
1156
|
+
tabLastChunkStartUnixMs:
|
|
1157
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS + 1,
|
|
1158
|
+
}),
|
|
1159
|
+
]);
|
|
1160
|
+
|
|
1161
|
+
const result: SessionReplayListResult =
|
|
1162
|
+
await SessionReplayReadService.listSessions(request());
|
|
1163
|
+
|
|
1164
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1165
|
+
"s-trailing": true,
|
|
1166
|
+
"s-resumed": false,
|
|
1167
|
+
});
|
|
1168
|
+
});
|
|
1169
|
+
|
|
1170
|
+
test("each session is judged on its own tabs and its own stored times", async () => {
|
|
1171
|
+
mockPage([
|
|
1172
|
+
listRow("s-ended", false),
|
|
1173
|
+
listRow("s-live", false),
|
|
1174
|
+
listRow("s-mixed", false),
|
|
1175
|
+
listRow("s-recent", false),
|
|
1176
|
+
]);
|
|
1177
|
+
mockChunkFacts([
|
|
1178
|
+
endedTabRow("s-ended", "tab-1"),
|
|
1179
|
+
endedTabRow("s-ended", "tab-2"),
|
|
1180
|
+
liveTabRow("s-live", "tab-1"),
|
|
1181
|
+
endedTabRow("s-mixed", "tab-1"),
|
|
1182
|
+
liveTabRow("s-mixed", "tab-2"),
|
|
1183
|
+
endedTabRow("s-recent", "tab-1", {
|
|
1184
|
+
tabLastChunkStoredAtUnixMs: GRACE_PASSED - 1000,
|
|
1185
|
+
}),
|
|
1186
|
+
]);
|
|
1187
|
+
|
|
1188
|
+
const result: SessionReplayListResult =
|
|
1189
|
+
await SessionReplayReadService.listSessions(request());
|
|
1190
|
+
|
|
1191
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1192
|
+
"s-ended": true,
|
|
1193
|
+
"s-live": false,
|
|
1194
|
+
"s-mixed": false,
|
|
1195
|
+
"s-recent": false,
|
|
1196
|
+
});
|
|
1197
|
+
});
|
|
1198
|
+
|
|
1199
|
+
test("a finalized session is never 'ended', even when chunk facts for it come back", async () => {
|
|
1200
|
+
mockPage([listRow("s-final", true), listRow("s-open", false)]);
|
|
1201
|
+
mockChunkFacts([
|
|
1202
|
+
endedTabRow("s-final", "tab-1"),
|
|
1203
|
+
endedTabRow("s-open", "tab-1"),
|
|
1204
|
+
]);
|
|
1205
|
+
|
|
1206
|
+
const result: SessionReplayListResult =
|
|
1207
|
+
await SessionReplayReadService.listSessions(request());
|
|
1208
|
+
|
|
1209
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1210
|
+
"s-final": false,
|
|
1211
|
+
"s-open": true,
|
|
1212
|
+
});
|
|
1213
|
+
expect(boundValues(statementOf(chunkQuerySpy))).toContainEqual([
|
|
1214
|
+
"s-open",
|
|
1215
|
+
]);
|
|
1216
|
+
});
|
|
1217
|
+
|
|
1218
|
+
test("a page of only finalized sessions runs no follow-up query", async () => {
|
|
1219
|
+
mockPage([listRow("s-1", true), listRow("s-2", true)]);
|
|
1220
|
+
|
|
1221
|
+
const result: SessionReplayListResult =
|
|
1222
|
+
await SessionReplayReadService.listSessions(request());
|
|
1223
|
+
|
|
1224
|
+
expect(chunkQuerySpy).not.toHaveBeenCalled();
|
|
1225
|
+
expect(endedBySessionId(result)).toEqual({ "s-1": false, "s-2": false });
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
test("an empty page runs no follow-up query", async () => {
|
|
1229
|
+
mockPage([]);
|
|
1230
|
+
|
|
1231
|
+
const result: SessionReplayListResult =
|
|
1232
|
+
await SessionReplayReadService.listSessions(request());
|
|
1233
|
+
|
|
1234
|
+
expect(result.sessions).toHaveLength(0);
|
|
1235
|
+
expect(chunkQuerySpy).not.toHaveBeenCalled();
|
|
1236
|
+
});
|
|
1237
|
+
|
|
1238
|
+
test("the look-ahead row past the page size is not asked about", async () => {
|
|
1239
|
+
mockPage([listRow("s-1", false), listRow("s-2", false)]);
|
|
1240
|
+
|
|
1241
|
+
const result: SessionReplayListResult =
|
|
1242
|
+
await SessionReplayReadService.listSessions(request({ limit: 1 }));
|
|
1243
|
+
|
|
1244
|
+
expect(result.sessions).toHaveLength(1);
|
|
1245
|
+
expect(result.nextCursor).not.toBeNull();
|
|
1246
|
+
expect(boundValues(statementOf(chunkQuerySpy))).toContainEqual(["s-1"]);
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
test("an unfinalized session with no chunk rows yet is not 'ended'", async () => {
|
|
1250
|
+
mockPage([listRow("s-1", false), listRow("s-2", false)]);
|
|
1251
|
+
mockChunkFacts([endedTabRow("s-2", "tab-1")]);
|
|
1252
|
+
|
|
1253
|
+
const result: SessionReplayListResult =
|
|
1254
|
+
await SessionReplayReadService.listSessions(request());
|
|
1255
|
+
|
|
1256
|
+
expect(endedBySessionId(result)).toEqual({ "s-1": false, "s-2": true });
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
test("a thrown follow-up leaves every row false and still returns the list", async () => {
|
|
1260
|
+
const warnSpy: jest.SpyInstance = jest
|
|
1261
|
+
.spyOn(logger, "warn")
|
|
1262
|
+
.mockImplementation((): void => {
|
|
1263
|
+
return;
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
mockPage([listRow("s-1", false), listRow("s-2", true)]);
|
|
1267
|
+
chunkQuerySpy.mockRejectedValue(new Error("clickhouse down") as never);
|
|
1268
|
+
|
|
1269
|
+
const result: SessionReplayListResult =
|
|
1270
|
+
await SessionReplayReadService.listSessions(request());
|
|
1271
|
+
|
|
1272
|
+
expect(result.sessions).toHaveLength(2);
|
|
1273
|
+
expect(endedBySessionId(result)).toEqual({ "s-1": false, "s-2": false });
|
|
1274
|
+
expect(warnSpy).toHaveBeenCalled();
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
test("a follow-up whose body cannot be parsed degrades the same way", async () => {
|
|
1278
|
+
jest.spyOn(logger, "warn").mockImplementation((): void => {
|
|
1279
|
+
return;
|
|
1280
|
+
});
|
|
1281
|
+
|
|
1282
|
+
mockPage([listRow("s-1", false)]);
|
|
1283
|
+
chunkQuerySpy.mockResolvedValue({
|
|
1284
|
+
json: async (): Promise<JSONObject> => {
|
|
1285
|
+
throw new Error("truncated body");
|
|
1286
|
+
},
|
|
1287
|
+
} as never);
|
|
1288
|
+
|
|
1289
|
+
const result: SessionReplayListResult =
|
|
1290
|
+
await SessionReplayReadService.listSessions(request());
|
|
1291
|
+
|
|
1292
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
1293
|
+
});
|
|
1294
|
+
|
|
1295
|
+
test("ClickHouse's quoted numbers parse, and a missing clock is never read as ended", async () => {
|
|
1296
|
+
mockPage([
|
|
1297
|
+
listRow("s-quoted", false),
|
|
1298
|
+
listRow("s-no-start", false),
|
|
1299
|
+
listRow("s-no-end", false),
|
|
1300
|
+
listRow("s-garbled", false),
|
|
1301
|
+
listRow("s-no-stored-at", false),
|
|
1302
|
+
listRow("s-blank-stored-at", false),
|
|
1303
|
+
listRow("s-no-index", false),
|
|
1304
|
+
]);
|
|
1305
|
+
mockChunkFacts([
|
|
1306
|
+
{
|
|
1307
|
+
sessionId: "s-quoted",
|
|
1308
|
+
tabId: "tab-1",
|
|
1309
|
+
tabHasFinalChunk: "1",
|
|
1310
|
+
tabFinalChunkEndUnixMs: String(FINAL_END),
|
|
1311
|
+
tabLastChunkStartUnixMs: String(FINAL_END - 15000),
|
|
1312
|
+
tabMaxChunkIndex: "4",
|
|
1313
|
+
tabLastChunkStoredAtUnixMs: String(STORED_AT),
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
sessionId: "s-no-start",
|
|
1317
|
+
tabId: "tab-1",
|
|
1318
|
+
tabHasFinalChunk: 1,
|
|
1319
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
1320
|
+
tabMaxChunkIndex: 4,
|
|
1321
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
sessionId: "s-no-end",
|
|
1325
|
+
tabId: "tab-1",
|
|
1326
|
+
tabHasFinalChunk: 1,
|
|
1327
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1328
|
+
tabMaxChunkIndex: 4,
|
|
1329
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
sessionId: "s-garbled",
|
|
1333
|
+
tabId: "tab-1",
|
|
1334
|
+
tabHasFinalChunk: 1,
|
|
1335
|
+
tabFinalChunkEndUnixMs: "not-a-number",
|
|
1336
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1337
|
+
tabMaxChunkIndex: 4,
|
|
1338
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
1339
|
+
},
|
|
1340
|
+
/*
|
|
1341
|
+
* A missing write time must not read as 0 - epoch is older than
|
|
1342
|
+
* any grace, which would skip it outright.
|
|
1343
|
+
*/
|
|
1344
|
+
{
|
|
1345
|
+
sessionId: "s-no-stored-at",
|
|
1346
|
+
tabId: "tab-1",
|
|
1347
|
+
tabHasFinalChunk: 1,
|
|
1348
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
1349
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1350
|
+
tabMaxChunkIndex: 4,
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
sessionId: "s-blank-stored-at",
|
|
1354
|
+
tabId: "tab-1",
|
|
1355
|
+
tabHasFinalChunk: 1,
|
|
1356
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
1357
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1358
|
+
tabMaxChunkIndex: 4,
|
|
1359
|
+
tabLastChunkStoredAtUnixMs: " ",
|
|
1360
|
+
},
|
|
1361
|
+
/*
|
|
1362
|
+
* A missing chunk index only means the cap rule cannot apply; a
|
|
1363
|
+
* sealed tab is still judged by its seal.
|
|
1364
|
+
*/
|
|
1365
|
+
{
|
|
1366
|
+
sessionId: "s-no-index",
|
|
1367
|
+
tabId: "tab-1",
|
|
1368
|
+
tabHasFinalChunk: 1,
|
|
1369
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
1370
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1371
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
1372
|
+
},
|
|
1373
|
+
]);
|
|
1374
|
+
|
|
1375
|
+
const result: SessionReplayListResult =
|
|
1376
|
+
await SessionReplayReadService.listSessions(request());
|
|
1377
|
+
|
|
1378
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1379
|
+
"s-quoted": true,
|
|
1380
|
+
"s-no-start": false,
|
|
1381
|
+
"s-no-end": false,
|
|
1382
|
+
"s-garbled": false,
|
|
1383
|
+
"s-no-stored-at": false,
|
|
1384
|
+
"s-blank-stored-at": false,
|
|
1385
|
+
"s-no-index": true,
|
|
1386
|
+
});
|
|
1387
|
+
});
|
|
1388
|
+
|
|
1389
|
+
test("a missing or garbled chunk index never reads as capped", async () => {
|
|
1390
|
+
mockPage([listRow("s-no-index", false), listRow("s-garbled", false)]);
|
|
1391
|
+
mockChunkFacts([
|
|
1392
|
+
liveTabRow("s-no-index", "tab-1", { tabMaxChunkIndex: undefined }),
|
|
1393
|
+
liveTabRow("s-garbled", "tab-1", { tabMaxChunkIndex: "Infinity" }),
|
|
1394
|
+
]);
|
|
1395
|
+
|
|
1396
|
+
const result: SessionReplayListResult =
|
|
1397
|
+
await SessionReplayReadService.listSessions(request());
|
|
1398
|
+
|
|
1399
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1400
|
+
"s-no-index": false,
|
|
1401
|
+
"s-garbled": false,
|
|
1402
|
+
});
|
|
1403
|
+
});
|
|
1404
|
+
|
|
1405
|
+
test("a chunk row for a session that was not asked about decides nothing", async () => {
|
|
1406
|
+
mockPage([listRow("s-1", false)]);
|
|
1407
|
+
mockChunkFacts([
|
|
1408
|
+
endedTabRow("s-1", "tab-1"),
|
|
1409
|
+
liveTabRow("someone-else", "tab-1"),
|
|
1410
|
+
endedTabRow("", "tab-1"),
|
|
1411
|
+
]);
|
|
1412
|
+
|
|
1413
|
+
const result: SessionReplayListResult =
|
|
1414
|
+
await SessionReplayReadService.listSessions(request());
|
|
1415
|
+
|
|
1416
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(true);
|
|
1417
|
+
});
|
|
1418
|
+
|
|
1419
|
+
/*
|
|
1420
|
+
* The follow-up now keys its facts per (session, tab) so the manifest
|
|
1421
|
+
* can answer each tab's own hasRecordingEnded off the same read. GROUP
|
|
1422
|
+
* BY sessionId, tabId makes that pair unique, so this only guards a
|
|
1423
|
+
* result that repeats one: the rows fold with the same maxima the group
|
|
1424
|
+
* applies, and the session verdict is what it always was.
|
|
1425
|
+
*/
|
|
1426
|
+
test("repeated rows for one tab of a session fold like a single group", async () => {
|
|
1427
|
+
mockPage([listRow("s-sealed", false), listRow("s-resumed", false)]);
|
|
1428
|
+
mockChunkFacts([
|
|
1429
|
+
/* Both rows of the tab sealed: the session is over. */
|
|
1430
|
+
liveTabRow("s-sealed", "tab-1", {
|
|
1431
|
+
tabLastChunkStartUnixMs: FINAL_END - 15000,
|
|
1432
|
+
}),
|
|
1433
|
+
endedTabRow("s-sealed", "tab-1"),
|
|
1434
|
+
/* The tab kept recording past the tolerance: still recording. */
|
|
1435
|
+
endedTabRow("s-resumed", "tab-1"),
|
|
1436
|
+
liveTabRow("s-resumed", "tab-1", {
|
|
1437
|
+
tabLastChunkStartUnixMs:
|
|
1438
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS + 1,
|
|
1439
|
+
}),
|
|
1440
|
+
]);
|
|
1441
|
+
|
|
1442
|
+
const result: SessionReplayListResult =
|
|
1443
|
+
await SessionReplayReadService.listSessions(request());
|
|
1444
|
+
|
|
1445
|
+
expect(endedBySessionId(result)).toEqual({
|
|
1446
|
+
"s-sealed": true,
|
|
1447
|
+
"s-resumed": false,
|
|
1448
|
+
});
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1451
|
+
/*
|
|
1452
|
+
* The manifest's per-tab flags ride on the same read; the list must
|
|
1453
|
+
* still answer one flag per session and nothing per tab.
|
|
1454
|
+
*/
|
|
1455
|
+
test("the list reports only the session-level flag, from one follow-up read", async () => {
|
|
1456
|
+
mockPage([listRow("s-1", false)]);
|
|
1457
|
+
mockChunkFacts([endedTabRow("s-1", "tab-1"), liveTabRow("s-1", "tab-2")]);
|
|
1458
|
+
|
|
1459
|
+
const result: SessionReplayListResult =
|
|
1460
|
+
await SessionReplayReadService.listSessions(request());
|
|
1461
|
+
|
|
1462
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(1);
|
|
1463
|
+
expect(result.sessions[0]!.hasRecordingEnded).toBe(false);
|
|
1464
|
+
expect(Object.keys(result.sessions[0]!)).not.toContain("tabs");
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
test("the follow-up does not change the list statement or its filters", async () => {
|
|
1468
|
+
mockPage([listRow("s-1", false)]);
|
|
1469
|
+
|
|
1470
|
+
const query: string = await listQuery({ isFinalized: false });
|
|
1471
|
+
|
|
1472
|
+
/* "Live" stays "not finalized"; the chunk facts never reach HAVING. */
|
|
1473
|
+
expect(havingSection(query)).toMatch(/aggIsFinalized = \{p\d+:Bool\}/);
|
|
1474
|
+
expect(query).not.toContain("isFinal)");
|
|
1475
|
+
expect(query).not.toContain("tabHasFinalChunk");
|
|
1476
|
+
expect(query).not.toContain("tabLastChunkStoredAtUnixMs");
|
|
1477
|
+
});
|
|
1478
|
+
});
|
|
1479
|
+
|
|
1480
|
+
describe("getSessionHeader", () => {
|
|
1481
|
+
const headerRow: JSONObject = {
|
|
1482
|
+
sessionId: "s-1",
|
|
1483
|
+
headerProjectId: "p",
|
|
1484
|
+
applicationId: "a",
|
|
1485
|
+
aggStartTime: 1700000000000,
|
|
1486
|
+
aggEndTime: 1700000060000,
|
|
1487
|
+
aggIsFinalized: 1,
|
|
1488
|
+
aggClientReportedStart: 1699999999000,
|
|
1489
|
+
aggTags: { env: "prod" },
|
|
1490
|
+
aggExpiresAt: 1700604800000,
|
|
1491
|
+
aggClickCount: 7,
|
|
1492
|
+
aggCustomEventCount: 2,
|
|
1493
|
+
aggActiveMs: 30000,
|
|
1494
|
+
aggFirstErrorOffsetMs: 5000,
|
|
1495
|
+
aggAttributes: {
|
|
1496
|
+
"recorder.capabilities": "click-events,web-vitals,made-up",
|
|
1497
|
+
},
|
|
1498
|
+
aggIdentifiedUserKey: "hmac-key",
|
|
1499
|
+
aggVisitorId: "0123456789abcdef0123456789abcdef",
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1502
|
+
test("never names the identity columns and pins the application only when given one", async () => {
|
|
1503
|
+
headerQuerySpy.mockResolvedValue(fakeResultSet([headerRow]) as never);
|
|
1504
|
+
|
|
1505
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1506
|
+
projectId: projectId,
|
|
1507
|
+
sessionId: "s-1",
|
|
1508
|
+
});
|
|
1509
|
+
|
|
1510
|
+
const plain: string = statementOf(headerQuerySpy).query;
|
|
1511
|
+
expect(plain).not.toContain("identifiedUserLabel");
|
|
1512
|
+
expect(plain).not.toContain("identifiedUserTraits");
|
|
1513
|
+
expect(plain).not.toContain("rumApplicationId = ");
|
|
1514
|
+
expect(plain).toContain("LIMIT 2");
|
|
1515
|
+
expect(plain).toContain("retentionDate >= now()");
|
|
1516
|
+
|
|
1517
|
+
headerQuerySpy.mockClear();
|
|
1518
|
+
|
|
1519
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1520
|
+
projectId: projectId,
|
|
1521
|
+
sessionId: "s-1",
|
|
1522
|
+
rumApplicationId: rumApplicationId,
|
|
1523
|
+
});
|
|
1524
|
+
|
|
1525
|
+
const pinned: Statement = statementOf(headerQuerySpy);
|
|
1526
|
+
expect(whereSection(pinned.query)).toContain("rumApplicationId = ");
|
|
1527
|
+
expect(boundValues(pinned)).toContain(rumApplicationId.toString());
|
|
1528
|
+
});
|
|
1529
|
+
|
|
1530
|
+
test("maps the clock, tags, expiry, counters and the known recorder capabilities", async () => {
|
|
1531
|
+
headerQuerySpy.mockResolvedValue(fakeResultSet([headerRow]) as never);
|
|
1532
|
+
|
|
1533
|
+
const header: SessionReplaySessionHeader | null =
|
|
1534
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1535
|
+
projectId: projectId,
|
|
1536
|
+
sessionId: "s-1",
|
|
1537
|
+
});
|
|
1538
|
+
|
|
1539
|
+
expect(header).not.toBeNull();
|
|
1540
|
+
expect(header!.startTimeUnixMs).toBe(1700000000000);
|
|
1541
|
+
expect(header!.endTimeUnixMs).toBe(1700000060000);
|
|
1542
|
+
expect(header!.clientReportedStartUnixMs).toBe(1699999999000);
|
|
1543
|
+
expect(header!.tags).toEqual({ env: "prod" });
|
|
1544
|
+
expect(header!.expiresAtUnixMs).toBe(1700604800000);
|
|
1545
|
+
expect(header!.clickCount).toBe(7);
|
|
1546
|
+
expect(header!.customEventCount).toBe(2);
|
|
1547
|
+
expect(header!.activeMs).toBe(30000);
|
|
1548
|
+
expect(header!.firstErrorOffsetMs).toBe(5000);
|
|
1549
|
+
/* A stored value outside the vocabulary never reaches the player. */
|
|
1550
|
+
expect(header!.recorderCapabilities).toEqual([
|
|
1551
|
+
"click-events",
|
|
1552
|
+
"web-vitals",
|
|
1553
|
+
]);
|
|
1554
|
+
expect(header!.identifiedUserLabel).toBeUndefined();
|
|
1555
|
+
expect(header!.identifiedUserTraits).toBeUndefined();
|
|
1556
|
+
});
|
|
1557
|
+
|
|
1558
|
+
/*
|
|
1559
|
+
* The digest alias was always SELECTed by the header read and simply
|
|
1560
|
+
* never mapped, so the player had no key to hand back to /list for
|
|
1561
|
+
* "this person's other sessions". Both keys ride on the header read
|
|
1562
|
+
* itself - not on the separate, identity-gated getSessionIdentity -
|
|
1563
|
+
* because neither names anyone.
|
|
1564
|
+
*/
|
|
1565
|
+
test("maps the identity digest and the visitor id off the header read, without the identity columns", async () => {
|
|
1566
|
+
headerQuerySpy.mockResolvedValue(fakeResultSet([headerRow]) as never);
|
|
1567
|
+
|
|
1568
|
+
const header: SessionReplaySessionHeader | null =
|
|
1569
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1570
|
+
projectId: projectId,
|
|
1571
|
+
sessionId: "s-1",
|
|
1572
|
+
});
|
|
1573
|
+
|
|
1574
|
+
const query: string = statementOf(headerQuerySpy).query;
|
|
1575
|
+
expect(query).toContain(
|
|
1576
|
+
"argMax(identifiedUserKey, version) AS aggIdentifiedUserKey",
|
|
1577
|
+
);
|
|
1578
|
+
expect(query).toContain("argMax(visitorId, version) AS aggVisitorId");
|
|
1579
|
+
expect(query).not.toContain("identifiedUserLabel");
|
|
1580
|
+
|
|
1581
|
+
expect(header!.identifiedUserKey).toBe("hmac-key");
|
|
1582
|
+
expect(header!.visitorId).toBe("0123456789abcdef0123456789abcdef");
|
|
1583
|
+
|
|
1584
|
+
/* An older recorder's header reads as "", never undefined. */
|
|
1585
|
+
const olderRow: JSONObject = { ...headerRow, aggIdentifiedUserKey: "" };
|
|
1586
|
+
delete olderRow["aggVisitorId"];
|
|
1587
|
+
|
|
1588
|
+
headerQuerySpy.mockResolvedValue(fakeResultSet([olderRow]) as never);
|
|
1589
|
+
|
|
1590
|
+
const older: SessionReplaySessionHeader | null =
|
|
1591
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1592
|
+
projectId: projectId,
|
|
1593
|
+
sessionId: "s-1",
|
|
1594
|
+
});
|
|
1595
|
+
|
|
1596
|
+
expect(older!.identifiedUserKey).toBe("");
|
|
1597
|
+
expect(older!.visitorId).toBe("");
|
|
1598
|
+
});
|
|
1599
|
+
|
|
1600
|
+
/*
|
|
1601
|
+
* The header read is also the authorization lookup behind every chunk
|
|
1602
|
+
* and heartbeat request (cached 30s), so it must not grow a chunk-table
|
|
1603
|
+
* read. It answers false; getManifest judges the field.
|
|
1604
|
+
*/
|
|
1605
|
+
test("never reads the chunk table and leaves hasRecordingEnded to the manifest", async () => {
|
|
1606
|
+
headerQuerySpy.mockResolvedValue(
|
|
1607
|
+
fakeResultSet([
|
|
1608
|
+
{ ...headerRow, aggIsFinalized: 0, aggSealedReason: "final-chunk" },
|
|
1609
|
+
]) as never,
|
|
1610
|
+
);
|
|
1611
|
+
|
|
1612
|
+
const header: SessionReplaySessionHeader | null =
|
|
1613
|
+
await SessionReplayReadService.getSessionHeader({
|
|
1614
|
+
projectId: projectId,
|
|
1615
|
+
sessionId: "s-1",
|
|
1616
|
+
rumApplicationId: rumApplicationId,
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
expect(header!.isFinalized).toBe(false);
|
|
1620
|
+
expect(header!.hasRecordingEnded).toBe(false);
|
|
1621
|
+
expect(chunkQuerySpy).not.toHaveBeenCalled();
|
|
1622
|
+
});
|
|
1623
|
+
|
|
1624
|
+
test("an ambiguous session id is refused with an actionable message", async () => {
|
|
1625
|
+
headerQuerySpy.mockResolvedValue(
|
|
1626
|
+
fakeResultSet([
|
|
1627
|
+
headerRow,
|
|
1628
|
+
{ ...headerRow, applicationId: "b" },
|
|
1629
|
+
]) as never,
|
|
1630
|
+
);
|
|
1631
|
+
|
|
1632
|
+
await expect(
|
|
1633
|
+
SessionReplayReadService.getSessionHeader({
|
|
1634
|
+
projectId: projectId,
|
|
1635
|
+
sessionId: "s-1",
|
|
1636
|
+
}),
|
|
1637
|
+
).rejects.toThrow(/rumApplicationId/);
|
|
1638
|
+
});
|
|
1639
|
+
});
|
|
1640
|
+
|
|
1641
|
+
describe("getSessionIdentity", () => {
|
|
1642
|
+
test("names both identity columns, pinned to the application", async () => {
|
|
1643
|
+
headerQuerySpy.mockResolvedValue(
|
|
1644
|
+
fakeResultSet([
|
|
1645
|
+
{
|
|
1646
|
+
aggIdentifiedUserLabel: "jane@example.com",
|
|
1647
|
+
aggIdentifiedUserTraits: { plan: "pro", seats: 4 },
|
|
1648
|
+
},
|
|
1649
|
+
]) as never,
|
|
1650
|
+
);
|
|
1651
|
+
|
|
1652
|
+
const identity: SessionReplaySessionIdentity =
|
|
1653
|
+
await SessionReplayReadService.getSessionIdentity({
|
|
1654
|
+
projectId: projectId,
|
|
1655
|
+
rumApplicationId: rumApplicationId,
|
|
1656
|
+
sessionId: "s-1",
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
|
+
const statement: Statement = statementOf(headerQuerySpy);
|
|
1660
|
+
expect(statement.query).toContain(
|
|
1661
|
+
"argMax(identifiedUserLabel, version) AS aggIdentifiedUserLabel",
|
|
784
1662
|
);
|
|
785
1663
|
expect(statement.query).toContain(
|
|
786
1664
|
"argMax(identifiedUserTraits, version) AS aggIdentifiedUserTraits",
|
|
@@ -1355,6 +2233,7 @@ describe("SessionReplayReadService statements", () => {
|
|
|
1355
2233
|
recorderCapabilities: [],
|
|
1356
2234
|
identifiedUserKey: "",
|
|
1357
2235
|
visitorId: "",
|
|
2236
|
+
hasRecordingEnded: false,
|
|
1358
2237
|
...overrides,
|
|
1359
2238
|
};
|
|
1360
2239
|
}
|
|
@@ -1395,70 +2274,750 @@ describe("SessionReplayReadService statements", () => {
|
|
|
1395
2274
|
},
|
|
1396
2275
|
];
|
|
1397
2276
|
|
|
1398
|
-
test("projects clickCount and url per chunk, never the payload, and derives each tab's first offset", async () => {
|
|
1399
|
-
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2277
|
+
test("projects clickCount and url per chunk, never the payload, and derives each tab's first offset", async () => {
|
|
2278
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2279
|
+
|
|
2280
|
+
const manifest: SessionReplayManifest =
|
|
2281
|
+
await SessionReplayReadService.getManifest({
|
|
2282
|
+
header: header({ isFinalized: true, durationMs: 150000 }),
|
|
2283
|
+
projectId: projectId,
|
|
2284
|
+
rumApplicationId: rumApplicationId,
|
|
2285
|
+
sessionId: "s-1",
|
|
2286
|
+
});
|
|
2287
|
+
|
|
2288
|
+
const query: string = statementOf(chunkQuerySpy).query;
|
|
2289
|
+
expect(query).toContain("clickCount");
|
|
2290
|
+
expect(query).toContain("url");
|
|
2291
|
+
expect(query).not.toMatch(/\bpayload\b(?!Bytes)/);
|
|
2292
|
+
expect(query).not.toContain("length(payload)");
|
|
2293
|
+
expect(query).toContain("retentionDate >= now()");
|
|
2294
|
+
|
|
2295
|
+
expect(manifest.tabs).toHaveLength(2);
|
|
2296
|
+
expect(manifest.tabs[0]!.firstChunkStartOffsetMs).toBe(0);
|
|
2297
|
+
expect(manifest.tabs[1]!.firstChunkStartOffsetMs).toBe(134000);
|
|
2298
|
+
expect(manifest.tabs[0]!.chunks[1]!.clickCount).toBe(1);
|
|
2299
|
+
expect(manifest.tabs[0]!.chunks[1]!.url).toBe("https://a/checkout");
|
|
2300
|
+
});
|
|
2301
|
+
|
|
2302
|
+
test("a finalized header is returned untouched", async () => {
|
|
2303
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2304
|
+
|
|
2305
|
+
const finalized: SessionReplaySessionHeader = header({
|
|
2306
|
+
isFinalized: true,
|
|
2307
|
+
durationMs: 90000,
|
|
2308
|
+
chunkCount: 9,
|
|
2309
|
+
eventCount: 9,
|
|
2310
|
+
});
|
|
2311
|
+
|
|
2312
|
+
const manifest: SessionReplayManifest =
|
|
2313
|
+
await SessionReplayReadService.getManifest({
|
|
2314
|
+
header: finalized,
|
|
2315
|
+
projectId: projectId,
|
|
2316
|
+
rumApplicationId: rumApplicationId,
|
|
2317
|
+
sessionId: "s-1",
|
|
2318
|
+
});
|
|
2319
|
+
|
|
2320
|
+
expect(manifest.header).toBe(finalized);
|
|
2321
|
+
});
|
|
2322
|
+
|
|
2323
|
+
test("a provisional header reports what its chunk rows prove instead of zeros", async () => {
|
|
2324
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2325
|
+
|
|
2326
|
+
const manifest: SessionReplayManifest =
|
|
2327
|
+
await SessionReplayReadService.getManifest({
|
|
2328
|
+
header: header({ isFinalized: false }),
|
|
2329
|
+
projectId: projectId,
|
|
2330
|
+
rumApplicationId: rumApplicationId,
|
|
2331
|
+
sessionId: "s-1",
|
|
2332
|
+
});
|
|
2333
|
+
|
|
2334
|
+
expect(manifest.header.isFinalized).toBe(false);
|
|
2335
|
+
expect(manifest.header.durationMs).toBe(150000);
|
|
2336
|
+
expect(manifest.header.chunkCount).toBe(3);
|
|
2337
|
+
expect(manifest.header.eventCount).toBe(170);
|
|
2338
|
+
expect(manifest.header.maxChunkIndex).toBe(1);
|
|
2339
|
+
expect(manifest.header.endTimeUnixMs).toBe(1700000150000);
|
|
2340
|
+
expect(manifest.header.endTime.getTime()).toBe(1700000150000);
|
|
2341
|
+
});
|
|
2342
|
+
|
|
2343
|
+
/*
|
|
2344
|
+
* The player's Live pill reads the manifest header. The header read
|
|
2345
|
+
* itself never judges hasRecordingEnded (it is also the cached
|
|
2346
|
+
* authorization lookup), so the manifest does, with the same helper
|
|
2347
|
+
* and the same statement as the list.
|
|
2348
|
+
*/
|
|
2349
|
+
describe("hasRecordingEnded on the manifest header", () => {
|
|
2350
|
+
const FINAL_END: number = 1700000150000;
|
|
2351
|
+
/* Server write time of the newest chunk row (its version). */
|
|
2352
|
+
const STORED_AT: number = FINAL_END + 1500;
|
|
2353
|
+
const GRACE_PASSED: number =
|
|
2354
|
+
STORED_AT + SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS;
|
|
2355
|
+
|
|
2356
|
+
function endedTabRow(
|
|
2357
|
+
tabId: string,
|
|
2358
|
+
overrides: JSONObject = {},
|
|
2359
|
+
): JSONObject {
|
|
2360
|
+
return {
|
|
2361
|
+
sessionId: "s-1",
|
|
2362
|
+
tabId: tabId,
|
|
2363
|
+
tabHasFinalChunk: 1,
|
|
2364
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
2365
|
+
tabLastChunkStartUnixMs: FINAL_END - 16000,
|
|
2366
|
+
tabMaxChunkIndex: 1,
|
|
2367
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
2368
|
+
...overrides,
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
function liveTabRow(
|
|
2373
|
+
tabId: string,
|
|
2374
|
+
overrides: JSONObject = {},
|
|
2375
|
+
): JSONObject {
|
|
2376
|
+
return {
|
|
2377
|
+
sessionId: "s-1",
|
|
2378
|
+
tabId: tabId,
|
|
2379
|
+
tabHasFinalChunk: 0,
|
|
2380
|
+
tabFinalChunkEndUnixMs: 0,
|
|
2381
|
+
tabLastChunkStartUnixMs: FINAL_END,
|
|
2382
|
+
tabMaxChunkIndex: 1,
|
|
2383
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
2384
|
+
...overrides,
|
|
2385
|
+
};
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
async function manifestAt(
|
|
2389
|
+
nowUnixMs: number | undefined,
|
|
2390
|
+
): Promise<SessionReplayManifest> {
|
|
2391
|
+
return SessionReplayReadService.getManifest({
|
|
2392
|
+
header: header({ isFinalized: false }),
|
|
2393
|
+
projectId: projectId,
|
|
2394
|
+
rumApplicationId: rumApplicationId,
|
|
2395
|
+
sessionId: "s-1",
|
|
2396
|
+
...(nowUnixMs !== undefined && { nowUnixMs: nowUnixMs }),
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
function mockManifestThenFacts(facts: Array<JSONObject>): void {
|
|
2401
|
+
chunkQuerySpy
|
|
2402
|
+
.mockResolvedValueOnce(fakeResultSet(chunkRows) as never)
|
|
2403
|
+
.mockResolvedValueOnce(fakeResultSet(facts) as never);
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
test("an unfinalized session whose every tab sent its final chunk is ended once the grace has passed, read pinned to the authorized application", async () => {
|
|
2407
|
+
mockManifestThenFacts([
|
|
2408
|
+
endedTabRow("tab-1"),
|
|
2409
|
+
endedTabRow("tab-2", {
|
|
2410
|
+
tabLastChunkStartUnixMs: FINAL_END + 4,
|
|
2411
|
+
}),
|
|
2412
|
+
]);
|
|
2413
|
+
|
|
2414
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2415
|
+
|
|
2416
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(2);
|
|
2417
|
+
|
|
2418
|
+
/* The manifest statement goes first and is unchanged. */
|
|
2419
|
+
const manifestQuery: string = statementOf(chunkQuerySpy, 0).query;
|
|
2420
|
+
expect(manifestQuery).toContain("LIMIT 1 BY tabId, chunkIndex");
|
|
2421
|
+
expect(manifestQuery).not.toContain("tabHasFinalChunk");
|
|
2422
|
+
|
|
2423
|
+
const ended: Statement = statementOf(chunkQuerySpy, 1);
|
|
2424
|
+
expect(ended.query).toContain("GROUP BY sessionId, tabId");
|
|
2425
|
+
expect(ended.query).toMatch(
|
|
2426
|
+
/AND sessionId IN \(\{p\d+:Array\(String\)\}\)/,
|
|
2427
|
+
);
|
|
2428
|
+
expect(ended.query).toMatch(/AND rumApplicationId = \{p\d+:String\}/);
|
|
2429
|
+
expect(ended.query).toContain(
|
|
2430
|
+
"toFloat64(max(chunkIndex)) AS tabMaxChunkIndex",
|
|
2431
|
+
);
|
|
2432
|
+
expect(ended.query).toContain(
|
|
2433
|
+
"toFloat64(max(version)) AS tabLastChunkStoredAtUnixMs",
|
|
2434
|
+
);
|
|
2435
|
+
expect(boundValues(ended)).toContainEqual(["s-1"]);
|
|
2436
|
+
expect(boundValues(ended)).toContain(rumApplicationId.toString());
|
|
2437
|
+
expect(boundValues(ended)).toContain(projectId.toString());
|
|
2438
|
+
|
|
2439
|
+
expect(manifest.header.isFinalized).toBe(false);
|
|
2440
|
+
expect(manifest.header.hasRecordingEnded).toBe(true);
|
|
2441
|
+
/* The live reconciliation still happens alongside it. */
|
|
2442
|
+
expect(manifest.header.durationMs).toBe(150000);
|
|
2443
|
+
expect(manifest.header.chunkCount).toBe(3);
|
|
2444
|
+
});
|
|
2445
|
+
|
|
2446
|
+
/*
|
|
2447
|
+
* The player's Live pill must not switch off while a multi-page
|
|
2448
|
+
* app's next page is still registering its first chunk.
|
|
2449
|
+
*/
|
|
2450
|
+
test.each([
|
|
2451
|
+
["stored just now", 0, false],
|
|
2452
|
+
[
|
|
2453
|
+
"stored 1 ms short of the grace",
|
|
2454
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS - 1,
|
|
2455
|
+
false,
|
|
2456
|
+
],
|
|
2457
|
+
[
|
|
2458
|
+
"stored exactly the grace ago",
|
|
2459
|
+
SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS,
|
|
2460
|
+
true,
|
|
2461
|
+
],
|
|
2462
|
+
] as Array<[string, number, boolean]>)(
|
|
2463
|
+
"a single sealed tab %s (%i ms old): hasRecordingEnded %s",
|
|
2464
|
+
async (_label: string, ageMs: number, expected: boolean) => {
|
|
2465
|
+
mockManifestThenFacts([endedTabRow("tab-1")]);
|
|
2466
|
+
|
|
2467
|
+
const manifest: SessionReplayManifest = await manifestAt(
|
|
2468
|
+
STORED_AT + ageMs,
|
|
2469
|
+
);
|
|
2470
|
+
|
|
2471
|
+
expect(manifest.header.hasRecordingEnded).toBe(expected);
|
|
2472
|
+
},
|
|
2473
|
+
);
|
|
2474
|
+
|
|
2475
|
+
test("a capped tab with no final chunk is ended after the grace, not before", async () => {
|
|
2476
|
+
const capped: JSONObject = liveTabRow("tab-1", {
|
|
2477
|
+
tabMaxChunkIndex: MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
2478
|
+
});
|
|
2479
|
+
|
|
2480
|
+
mockManifestThenFacts([capped]);
|
|
2481
|
+
expect(
|
|
2482
|
+
(await manifestAt(GRACE_PASSED - 1)).header.hasRecordingEnded,
|
|
2483
|
+
).toBe(false);
|
|
2484
|
+
|
|
2485
|
+
mockManifestThenFacts([capped]);
|
|
2486
|
+
expect((await manifestAt(GRACE_PASSED)).header.hasRecordingEnded).toBe(
|
|
2487
|
+
true,
|
|
2488
|
+
);
|
|
2489
|
+
});
|
|
2490
|
+
|
|
2491
|
+
test("without an injected clock the manifest measures the grace against Date.now()", async () => {
|
|
2492
|
+
const nowSpy: jest.SpyInstance = jest
|
|
2493
|
+
.spyOn(Date, "now")
|
|
2494
|
+
.mockReturnValue(GRACE_PASSED - 1);
|
|
2495
|
+
|
|
2496
|
+
mockManifestThenFacts([endedTabRow("tab-1")]);
|
|
2497
|
+
expect((await manifestAt(undefined)).header.hasRecordingEnded).toBe(
|
|
2498
|
+
false,
|
|
2499
|
+
);
|
|
2500
|
+
|
|
2501
|
+
nowSpy.mockReturnValue(GRACE_PASSED);
|
|
2502
|
+
|
|
2503
|
+
mockManifestThenFacts([endedTabRow("tab-1")]);
|
|
2504
|
+
expect((await manifestAt(undefined)).header.hasRecordingEnded).toBe(
|
|
2505
|
+
true,
|
|
2506
|
+
);
|
|
2507
|
+
});
|
|
2508
|
+
|
|
2509
|
+
test("one tab still recording keeps the header live", async () => {
|
|
2510
|
+
mockManifestThenFacts([endedTabRow("tab-1"), liveTabRow("tab-2")]);
|
|
2511
|
+
|
|
2512
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2513
|
+
|
|
2514
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2515
|
+
});
|
|
2516
|
+
|
|
2517
|
+
test("a tab that kept recording past the tolerance after its final chunk keeps the header live", async () => {
|
|
2518
|
+
mockManifestThenFacts([
|
|
2519
|
+
endedTabRow("tab-1", {
|
|
2520
|
+
tabLastChunkStartUnixMs:
|
|
2521
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS + 1,
|
|
2522
|
+
}),
|
|
2523
|
+
]);
|
|
2524
|
+
|
|
2525
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2526
|
+
|
|
2527
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2528
|
+
});
|
|
2529
|
+
|
|
2530
|
+
test("a finalized header runs no second read and is still returned untouched", async () => {
|
|
2531
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2532
|
+
|
|
2533
|
+
const finalized: SessionReplaySessionHeader = header({
|
|
2534
|
+
isFinalized: true,
|
|
2535
|
+
durationMs: 150000,
|
|
2536
|
+
});
|
|
2537
|
+
|
|
2538
|
+
const manifest: SessionReplayManifest =
|
|
2539
|
+
await SessionReplayReadService.getManifest({
|
|
2540
|
+
header: finalized,
|
|
2541
|
+
projectId: projectId,
|
|
2542
|
+
rumApplicationId: rumApplicationId,
|
|
2543
|
+
sessionId: "s-1",
|
|
2544
|
+
nowUnixMs: GRACE_PASSED,
|
|
2545
|
+
});
|
|
2546
|
+
|
|
2547
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(1);
|
|
2548
|
+
expect(manifest.header).toBe(finalized);
|
|
2549
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2550
|
+
});
|
|
2551
|
+
|
|
2552
|
+
test("a failed ended read answers 'not ended' and never fails the manifest", async () => {
|
|
2553
|
+
const warnSpy: jest.SpyInstance = jest
|
|
2554
|
+
.spyOn(logger, "warn")
|
|
2555
|
+
.mockImplementation((): void => {
|
|
2556
|
+
return;
|
|
2557
|
+
});
|
|
2558
|
+
|
|
2559
|
+
chunkQuerySpy
|
|
2560
|
+
.mockResolvedValueOnce(fakeResultSet(chunkRows) as never)
|
|
2561
|
+
.mockRejectedValueOnce(new Error("clickhouse down") as never);
|
|
2562
|
+
|
|
2563
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2564
|
+
|
|
2565
|
+
expect(manifest.tabs).toHaveLength(2);
|
|
2566
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2567
|
+
expect(manifest.header.chunkCount).toBe(3);
|
|
2568
|
+
expect(warnSpy).toHaveBeenCalled();
|
|
2569
|
+
});
|
|
2570
|
+
|
|
2571
|
+
test("a failed manifest read still fails, whatever the ended read answered", async () => {
|
|
2572
|
+
chunkQuerySpy
|
|
2573
|
+
.mockRejectedValueOnce(new Error("manifest down") as never)
|
|
2574
|
+
.mockResolvedValueOnce(
|
|
2575
|
+
fakeResultSet([endedTabRow("tab-1")]) as never,
|
|
2576
|
+
);
|
|
2577
|
+
|
|
2578
|
+
await expect(manifestAt(GRACE_PASSED)).rejects.toThrow("manifest down");
|
|
2579
|
+
});
|
|
2580
|
+
|
|
2581
|
+
test("an unfinalized header with no chunk rows is not ended and keeps its fields", async () => {
|
|
2582
|
+
const provisional: SessionReplaySessionHeader = header({
|
|
2583
|
+
isFinalized: false,
|
|
2584
|
+
});
|
|
2585
|
+
|
|
2586
|
+
const manifest: SessionReplayManifest =
|
|
2587
|
+
await SessionReplayReadService.getManifest({
|
|
2588
|
+
header: provisional,
|
|
2589
|
+
projectId: projectId,
|
|
2590
|
+
rumApplicationId: rumApplicationId,
|
|
2591
|
+
sessionId: "s-1",
|
|
2592
|
+
nowUnixMs: GRACE_PASSED,
|
|
2593
|
+
});
|
|
2594
|
+
|
|
2595
|
+
expect(manifest.tabs).toHaveLength(0);
|
|
2596
|
+
expect(manifest.header).toEqual({
|
|
2597
|
+
...provisional,
|
|
2598
|
+
hasRecordingEnded: false,
|
|
2599
|
+
});
|
|
2600
|
+
});
|
|
2601
|
+
|
|
2602
|
+
/*
|
|
2603
|
+
* The list badge and the player's Live pill are two reads of one
|
|
2604
|
+
* helper. Fed the same chunk facts at the same server "now", they
|
|
2605
|
+
* must give the same answer, at every edge of the rule.
|
|
2606
|
+
*/
|
|
2607
|
+
describe("the list and the manifest agree", () => {
|
|
2608
|
+
const scenarios: Array<[string, Array<JSONObject>, number, boolean]> = [
|
|
2609
|
+
[
|
|
2610
|
+
"a sealed tab inside the grace",
|
|
2611
|
+
[endedTabRow("tab-1")],
|
|
2612
|
+
GRACE_PASSED - 1,
|
|
2613
|
+
false,
|
|
2614
|
+
],
|
|
2615
|
+
[
|
|
2616
|
+
"a sealed tab at the grace",
|
|
2617
|
+
[endedTabRow("tab-1")],
|
|
2618
|
+
GRACE_PASSED,
|
|
2619
|
+
true,
|
|
2620
|
+
],
|
|
2621
|
+
[
|
|
2622
|
+
"a capped non-final tab inside the grace",
|
|
2623
|
+
[
|
|
2624
|
+
liveTabRow("tab-1", {
|
|
2625
|
+
tabMaxChunkIndex: MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
2626
|
+
}),
|
|
2627
|
+
],
|
|
2628
|
+
GRACE_PASSED - 1,
|
|
2629
|
+
false,
|
|
2630
|
+
],
|
|
2631
|
+
[
|
|
2632
|
+
"a capped non-final tab at the grace",
|
|
2633
|
+
[
|
|
2634
|
+
liveTabRow("tab-1", {
|
|
2635
|
+
tabMaxChunkIndex: MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
2636
|
+
}),
|
|
2637
|
+
],
|
|
2638
|
+
GRACE_PASSED,
|
|
2639
|
+
true,
|
|
2640
|
+
],
|
|
2641
|
+
[
|
|
2642
|
+
"a non-final tab one index short of the cap",
|
|
2643
|
+
[
|
|
2644
|
+
liveTabRow("tab-1", {
|
|
2645
|
+
tabMaxChunkIndex: MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 2,
|
|
2646
|
+
}),
|
|
2647
|
+
],
|
|
2648
|
+
GRACE_PASSED,
|
|
2649
|
+
false,
|
|
2650
|
+
],
|
|
2651
|
+
[
|
|
2652
|
+
"an old sealed tab next to a freshly sealed one",
|
|
2653
|
+
[
|
|
2654
|
+
endedTabRow("tab-1", {
|
|
2655
|
+
tabLastChunkStoredAtUnixMs: STORED_AT - 10 * 60 * 1000,
|
|
2656
|
+
}),
|
|
2657
|
+
endedTabRow("tab-2"),
|
|
2658
|
+
],
|
|
2659
|
+
GRACE_PASSED - 1,
|
|
2660
|
+
false,
|
|
2661
|
+
],
|
|
2662
|
+
[
|
|
2663
|
+
"a sealed tab next to a live one",
|
|
2664
|
+
[endedTabRow("tab-1"), liveTabRow("tab-2")],
|
|
2665
|
+
GRACE_PASSED,
|
|
2666
|
+
false,
|
|
2667
|
+
],
|
|
2668
|
+
];
|
|
2669
|
+
|
|
2670
|
+
test.each(scenarios)(
|
|
2671
|
+
"%s",
|
|
2672
|
+
async (
|
|
2673
|
+
_label: string,
|
|
2674
|
+
facts: Array<JSONObject>,
|
|
2675
|
+
nowUnixMs: number,
|
|
2676
|
+
expected: boolean,
|
|
2677
|
+
) => {
|
|
2678
|
+
/*
|
|
2679
|
+
* Answer each chunk-table statement by what it is, so the
|
|
2680
|
+
* list's single follow-up and the manifest's pair can share
|
|
2681
|
+
* one mock regardless of order.
|
|
2682
|
+
*/
|
|
2683
|
+
chunkQuerySpy.mockImplementation(
|
|
2684
|
+
async (statement: Statement): Promise<unknown> => {
|
|
2685
|
+
return fakeResultSet(
|
|
2686
|
+
statement.query.includes("tabHasFinalChunk")
|
|
2687
|
+
? facts
|
|
2688
|
+
: chunkRows,
|
|
2689
|
+
);
|
|
2690
|
+
},
|
|
2691
|
+
);
|
|
2692
|
+
headerQuerySpy.mockResolvedValue(
|
|
2693
|
+
fakeResultSet([
|
|
2694
|
+
{
|
|
2695
|
+
sessionId: "s-1",
|
|
2696
|
+
applicationId: rumApplicationId.toString(),
|
|
2697
|
+
aggStartTime: FINAL_END - 60000,
|
|
2698
|
+
aggEndTime: FINAL_END,
|
|
2699
|
+
aggIsFinalized: 0,
|
|
2700
|
+
aggSealedReason: "",
|
|
2701
|
+
},
|
|
2702
|
+
]) as never,
|
|
2703
|
+
);
|
|
2704
|
+
|
|
2705
|
+
const list: SessionReplayListResult =
|
|
2706
|
+
await SessionReplayReadService.listSessions(
|
|
2707
|
+
listRequest({ nowUnixMs: nowUnixMs }),
|
|
2708
|
+
);
|
|
2709
|
+
const manifest: SessionReplayManifest = await manifestAt(nowUnixMs);
|
|
2710
|
+
|
|
2711
|
+
expect(list.sessions).toHaveLength(1);
|
|
2712
|
+
expect(list.sessions[0]!.hasRecordingEnded).toBe(expected);
|
|
2713
|
+
expect(manifest.header.hasRecordingEnded).toBe(expected);
|
|
2714
|
+
},
|
|
2715
|
+
);
|
|
2716
|
+
});
|
|
2717
|
+
});
|
|
2718
|
+
|
|
2719
|
+
/*
|
|
2720
|
+
* The recorder mints a NEW tab id on every page load, so a session's
|
|
2721
|
+
* "tabs" are the pages the person walked through and the header's one
|
|
2722
|
+
* "every tab has ended" cannot say WHICH of them is still open - the
|
|
2723
|
+
* fact the player sorts open tabs before closed ones by. Each manifest
|
|
2724
|
+
* tab therefore carries its own flag, judged per tab by the same shared
|
|
2725
|
+
* rule, from the SAME single grouped read the header's flag comes from.
|
|
2726
|
+
*/
|
|
2727
|
+
describe("hasRecordingEnded per manifest tab", () => {
|
|
2728
|
+
const FINAL_END: number = 1700000150000;
|
|
2729
|
+
/* Server write time of the newest chunk row (its version). */
|
|
2730
|
+
const STORED_AT: number = FINAL_END + 1500;
|
|
2731
|
+
const GRACE_PASSED: number =
|
|
2732
|
+
STORED_AT + SESSION_REPLAY_ENDED_FINALIZE_GRACE_MS;
|
|
2733
|
+
|
|
2734
|
+
/* A tab that sealed: final chunk at FINAL_END, nothing after it. */
|
|
2735
|
+
function endedTabRow(
|
|
2736
|
+
tabId: string,
|
|
2737
|
+
overrides: JSONObject = {},
|
|
2738
|
+
): JSONObject {
|
|
2739
|
+
return {
|
|
2740
|
+
sessionId: "s-1",
|
|
2741
|
+
tabId: tabId,
|
|
2742
|
+
tabHasFinalChunk: 1,
|
|
2743
|
+
tabFinalChunkEndUnixMs: FINAL_END,
|
|
2744
|
+
tabLastChunkStartUnixMs: FINAL_END - 16000,
|
|
2745
|
+
tabMaxChunkIndex: 1,
|
|
2746
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
2747
|
+
...overrides,
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
1400
2750
|
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
2751
|
+
/* A tab still recording: no final chunk at all. */
|
|
2752
|
+
function liveTabRow(
|
|
2753
|
+
tabId: string,
|
|
2754
|
+
overrides: JSONObject = {},
|
|
2755
|
+
): JSONObject {
|
|
2756
|
+
return {
|
|
2757
|
+
sessionId: "s-1",
|
|
2758
|
+
tabId: tabId,
|
|
2759
|
+
tabHasFinalChunk: 0,
|
|
2760
|
+
tabFinalChunkEndUnixMs: 0,
|
|
2761
|
+
tabLastChunkStartUnixMs: FINAL_END,
|
|
2762
|
+
tabMaxChunkIndex: 1,
|
|
2763
|
+
tabLastChunkStoredAtUnixMs: STORED_AT,
|
|
2764
|
+
...overrides,
|
|
2765
|
+
};
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
function mockManifestThenFacts(facts: Array<JSONObject>): void {
|
|
2769
|
+
chunkQuerySpy
|
|
2770
|
+
.mockResolvedValueOnce(fakeResultSet(chunkRows) as never)
|
|
2771
|
+
.mockResolvedValueOnce(fakeResultSet(facts) as never);
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
async function manifestAt(
|
|
2775
|
+
nowUnixMs: number,
|
|
2776
|
+
overrides: Partial<SessionReplaySessionHeader> = {},
|
|
2777
|
+
): Promise<SessionReplayManifest> {
|
|
2778
|
+
return SessionReplayReadService.getManifest({
|
|
2779
|
+
header: header({ isFinalized: false, ...overrides }),
|
|
1404
2780
|
projectId: projectId,
|
|
1405
2781
|
rumApplicationId: rumApplicationId,
|
|
1406
2782
|
sessionId: "s-1",
|
|
2783
|
+
nowUnixMs: nowUnixMs,
|
|
1407
2784
|
});
|
|
2785
|
+
}
|
|
1408
2786
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
expect(query).not.toContain("length(payload)");
|
|
1414
|
-
expect(query).toContain("retentionDate >= now()");
|
|
2787
|
+
function endedByTabId(
|
|
2788
|
+
manifest: SessionReplayManifest,
|
|
2789
|
+
): Record<string, boolean> {
|
|
2790
|
+
const ended: Record<string, boolean> = {};
|
|
1415
2791
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
expect(manifest.tabs[0]!.chunks[1]!.clickCount).toBe(1);
|
|
1420
|
-
expect(manifest.tabs[0]!.chunks[1]!.url).toBe("https://a/checkout");
|
|
1421
|
-
});
|
|
2792
|
+
for (const tab of manifest.tabs) {
|
|
2793
|
+
ended[tab.tabId] = tab.hasRecordingEnded;
|
|
2794
|
+
}
|
|
1422
2795
|
|
|
1423
|
-
|
|
1424
|
-
|
|
2796
|
+
return ended;
|
|
2797
|
+
}
|
|
1425
2798
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
2799
|
+
test("a finalized session ends every tab without a second read", async () => {
|
|
2800
|
+
chunkQuerySpy.mockResolvedValue(fakeResultSet(chunkRows) as never);
|
|
2801
|
+
|
|
2802
|
+
const manifest: SessionReplayManifest =
|
|
2803
|
+
await SessionReplayReadService.getManifest({
|
|
2804
|
+
header: header({ isFinalized: true, durationMs: 150000 }),
|
|
2805
|
+
projectId: projectId,
|
|
2806
|
+
rumApplicationId: rumApplicationId,
|
|
2807
|
+
sessionId: "s-1",
|
|
2808
|
+
nowUnixMs: GRACE_PASSED,
|
|
2809
|
+
});
|
|
2810
|
+
|
|
2811
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(1);
|
|
2812
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2813
|
+
"tab-1": true,
|
|
2814
|
+
"tab-2": true,
|
|
2815
|
+
});
|
|
1431
2816
|
});
|
|
1432
2817
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
2818
|
+
test("a sealed tab and a still-recording one are told apart while the session stays live", async () => {
|
|
2819
|
+
mockManifestThenFacts([endedTabRow("tab-1"), liveTabRow("tab-2")]);
|
|
2820
|
+
|
|
2821
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2822
|
+
|
|
2823
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2824
|
+
"tab-1": true,
|
|
2825
|
+
"tab-2": false,
|
|
1439
2826
|
});
|
|
2827
|
+
/* One live tab keeps the session - and so the Live pill - going. */
|
|
2828
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2829
|
+
});
|
|
1440
2830
|
|
|
1441
|
-
|
|
1442
|
-
|
|
2831
|
+
/*
|
|
2832
|
+
* The grace is about a NEW tab id that may still register, which says
|
|
2833
|
+
* nothing about whether THIS tab sealed. A closed page is closed the
|
|
2834
|
+
* moment its final chunk lands, so the tab flag has no grace.
|
|
2835
|
+
*/
|
|
2836
|
+
test("a sealed tab is ended inside the session's grace, when the header still says live", async () => {
|
|
2837
|
+
mockManifestThenFacts([endedTabRow("tab-1"), endedTabRow("tab-2")]);
|
|
1443
2838
|
|
|
1444
|
-
|
|
1445
|
-
|
|
2839
|
+
const manifest: SessionReplayManifest = await manifestAt(
|
|
2840
|
+
GRACE_PASSED - 1,
|
|
2841
|
+
);
|
|
1446
2842
|
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
rumApplicationId: rumApplicationId,
|
|
1452
|
-
sessionId: "s-1",
|
|
2843
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2844
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2845
|
+
"tab-1": true,
|
|
2846
|
+
"tab-2": true,
|
|
1453
2847
|
});
|
|
2848
|
+
});
|
|
1454
2849
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
2850
|
+
test("a session that has ended as a whole ends every tab, including one the facts read knows nothing about", async () => {
|
|
2851
|
+
/* Only tab-1 has facts; tab-2's rows are in the manifest read. */
|
|
2852
|
+
mockManifestThenFacts([endedTabRow("tab-1")]);
|
|
2853
|
+
|
|
2854
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2855
|
+
|
|
2856
|
+
expect(manifest.header.hasRecordingEnded).toBe(true);
|
|
2857
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2858
|
+
"tab-1": true,
|
|
2859
|
+
"tab-2": true,
|
|
2860
|
+
});
|
|
2861
|
+
});
|
|
2862
|
+
|
|
2863
|
+
test("a tab with no facts of its own is not ended while the session is still recording", async () => {
|
|
2864
|
+
mockManifestThenFacts([liveTabRow("tab-2")]);
|
|
2865
|
+
|
|
2866
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2867
|
+
|
|
2868
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2869
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2870
|
+
"tab-1": false,
|
|
2871
|
+
"tab-2": false,
|
|
2872
|
+
});
|
|
2873
|
+
});
|
|
2874
|
+
|
|
2875
|
+
/*
|
|
2876
|
+
* A tab that reached the per-session chunk cap never gets a final
|
|
2877
|
+
* chunk - the ingest gate refuses every index past the last one - and
|
|
2878
|
+
* has ended all the same.
|
|
2879
|
+
*/
|
|
2880
|
+
test("a capped tab with no final chunk is ended on its own", async () => {
|
|
2881
|
+
mockManifestThenFacts([
|
|
2882
|
+
liveTabRow("tab-1", {
|
|
2883
|
+
tabMaxChunkIndex: MAX_SESSION_REPLAY_CHUNKS_PER_SESSION - 1,
|
|
2884
|
+
}),
|
|
2885
|
+
liveTabRow("tab-2"),
|
|
2886
|
+
]);
|
|
2887
|
+
|
|
2888
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2889
|
+
|
|
2890
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2891
|
+
"tab-1": true,
|
|
2892
|
+
"tab-2": false,
|
|
2893
|
+
});
|
|
2894
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2895
|
+
});
|
|
2896
|
+
|
|
2897
|
+
test("an older recorder's trailing chunk inside the tolerance still ends the tab; one past it leaves it open", async () => {
|
|
2898
|
+
mockManifestThenFacts([
|
|
2899
|
+
endedTabRow("tab-1", {
|
|
2900
|
+
tabLastChunkStartUnixMs:
|
|
2901
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS,
|
|
2902
|
+
}),
|
|
2903
|
+
endedTabRow("tab-2", {
|
|
2904
|
+
tabLastChunkStartUnixMs:
|
|
2905
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS + 1,
|
|
2906
|
+
}),
|
|
2907
|
+
]);
|
|
2908
|
+
|
|
2909
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2910
|
+
|
|
2911
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2912
|
+
"tab-1": true,
|
|
2913
|
+
"tab-2": false,
|
|
2914
|
+
});
|
|
2915
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2916
|
+
});
|
|
2917
|
+
|
|
2918
|
+
test("a failed facts read leaves every tab false and still returns the manifest", async () => {
|
|
2919
|
+
const warnSpy: jest.SpyInstance = jest
|
|
2920
|
+
.spyOn(logger, "warn")
|
|
2921
|
+
.mockImplementation((): void => {
|
|
2922
|
+
return;
|
|
2923
|
+
});
|
|
2924
|
+
|
|
2925
|
+
chunkQuerySpy
|
|
2926
|
+
.mockResolvedValueOnce(fakeResultSet(chunkRows) as never)
|
|
2927
|
+
.mockRejectedValueOnce(new Error("clickhouse down") as never);
|
|
2928
|
+
|
|
2929
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2930
|
+
|
|
2931
|
+
expect(manifest.tabs).toHaveLength(2);
|
|
2932
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2933
|
+
"tab-1": false,
|
|
2934
|
+
"tab-2": false,
|
|
2935
|
+
});
|
|
2936
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2937
|
+
expect(warnSpy).toHaveBeenCalled();
|
|
2938
|
+
});
|
|
2939
|
+
|
|
2940
|
+
test("ClickHouse's quoted facts are judged per tab, and an unmeasured clock is never ended", async () => {
|
|
2941
|
+
mockManifestThenFacts([
|
|
2942
|
+
{
|
|
2943
|
+
sessionId: "s-1",
|
|
2944
|
+
tabId: "tab-1",
|
|
2945
|
+
tabHasFinalChunk: "1",
|
|
2946
|
+
tabFinalChunkEndUnixMs: String(FINAL_END),
|
|
2947
|
+
tabLastChunkStartUnixMs: String(FINAL_END - 16000),
|
|
2948
|
+
tabMaxChunkIndex: "1",
|
|
2949
|
+
tabLastChunkStoredAtUnixMs: String(STORED_AT),
|
|
2950
|
+
},
|
|
2951
|
+
endedTabRow("tab-2", { tabFinalChunkEndUnixMs: "not-a-number" }),
|
|
2952
|
+
]);
|
|
2953
|
+
|
|
2954
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2955
|
+
|
|
2956
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2957
|
+
"tab-1": true,
|
|
2958
|
+
"tab-2": false,
|
|
2959
|
+
});
|
|
2960
|
+
});
|
|
2961
|
+
|
|
2962
|
+
/*
|
|
2963
|
+
* GROUP BY sessionId, tabId makes the pair unique, so this only
|
|
2964
|
+
* guards a result that repeats one: the rows fold with the same
|
|
2965
|
+
* maxima the group would have applied, never on less evidence.
|
|
2966
|
+
*/
|
|
2967
|
+
test("repeated rows for one tab fold like a single group", async () => {
|
|
2968
|
+
mockManifestThenFacts([
|
|
2969
|
+
liveTabRow("tab-1", { tabLastChunkStartUnixMs: FINAL_END - 16000 }),
|
|
2970
|
+
endedTabRow("tab-1"),
|
|
2971
|
+
endedTabRow("tab-2"),
|
|
2972
|
+
liveTabRow("tab-2", {
|
|
2973
|
+
tabLastChunkStartUnixMs:
|
|
2974
|
+
FINAL_END + SESSION_REPLAY_ENDED_TRAILING_CHUNK_TOLERANCE_MS + 1,
|
|
2975
|
+
}),
|
|
2976
|
+
]);
|
|
2977
|
+
|
|
2978
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
2979
|
+
|
|
2980
|
+
expect(endedByTabId(manifest)).toEqual({
|
|
2981
|
+
"tab-1": true,
|
|
2982
|
+
"tab-2": false,
|
|
2983
|
+
});
|
|
2984
|
+
expect(manifest.header.hasRecordingEnded).toBe(false);
|
|
2985
|
+
});
|
|
2986
|
+
|
|
2987
|
+
test("the tab flags come from the one grouped read the header's flag comes from, and the manifest statement is unchanged", async () => {
|
|
2988
|
+
mockManifestThenFacts([endedTabRow("tab-1"), liveTabRow("tab-2")]);
|
|
2989
|
+
|
|
2990
|
+
await manifestAt(GRACE_PASSED);
|
|
2991
|
+
|
|
2992
|
+
expect(chunkQuerySpy).toHaveBeenCalledTimes(2);
|
|
2993
|
+
|
|
2994
|
+
const manifestQuery: string = statementOf(chunkQuerySpy, 0).query;
|
|
2995
|
+
expect(manifestQuery).toContain("LIMIT 1 BY tabId, chunkIndex");
|
|
2996
|
+
expect(manifestQuery).not.toContain("tabHasFinalChunk");
|
|
2997
|
+
expect(manifestQuery).not.toContain("GROUP BY sessionId, tabId");
|
|
2998
|
+
|
|
2999
|
+
const facts: Statement = statementOf(chunkQuerySpy, 1);
|
|
3000
|
+
expect(facts.query).toContain("GROUP BY sessionId, tabId");
|
|
3001
|
+
expect(facts.query).toContain(
|
|
3002
|
+
"max(toUInt8(isFinal)) AS tabHasFinalChunk",
|
|
3003
|
+
);
|
|
3004
|
+
expect(facts.query).not.toMatch(/\bpayload\b(?!Bytes)/);
|
|
3005
|
+
expect(boundValues(facts)).toContainEqual(["s-1"]);
|
|
3006
|
+
expect(boundValues(facts)).toContain(rumApplicationId.toString());
|
|
3007
|
+
});
|
|
3008
|
+
|
|
3009
|
+
test("the rest of each tab is untouched by the new flag", async () => {
|
|
3010
|
+
mockManifestThenFacts([endedTabRow("tab-1"), liveTabRow("tab-2")]);
|
|
3011
|
+
|
|
3012
|
+
const manifest: SessionReplayManifest = await manifestAt(GRACE_PASSED);
|
|
3013
|
+
|
|
3014
|
+
expect(manifest.tabs[0]!.tabId).toBe("tab-1");
|
|
3015
|
+
expect(manifest.tabs[0]!.chunkIndexes).toEqual([0, 1]);
|
|
3016
|
+
expect(manifest.tabs[0]!.fullSnapshotChunkIndexes).toEqual([0]);
|
|
3017
|
+
expect(manifest.tabs[0]!.firstChunkStartOffsetMs).toBe(0);
|
|
3018
|
+
expect(manifest.tabs[1]!.firstChunkStartOffsetMs).toBe(134000);
|
|
3019
|
+
expect(manifest.tabs[1]!.totalPayloadBytes).toBe(256);
|
|
3020
|
+
});
|
|
1462
3021
|
});
|
|
1463
3022
|
});
|
|
1464
3023
|
|
|
@@ -1660,6 +3219,234 @@ describe("SessionReplayReadService statements", () => {
|
|
|
1660
3219
|
expect(boundValues(headers)).toContain("s-9");
|
|
1661
3220
|
});
|
|
1662
3221
|
|
|
3222
|
+
test("binds both live-instance and finalized-header RUM matches to the exception application", async () => {
|
|
3223
|
+
const primaryEntityId: ObjectID = ObjectID.generate();
|
|
3224
|
+
|
|
3225
|
+
exceptionQuerySpy.mockResolvedValue(
|
|
3226
|
+
fakeResultSet([{ sessionId: "scoped-live-session" }]) as never,
|
|
3227
|
+
);
|
|
3228
|
+
|
|
3229
|
+
await SessionReplayReadService.getSessionsForException({
|
|
3230
|
+
projectId: projectId,
|
|
3231
|
+
exceptionFingerprint: "shared-fingerprint",
|
|
3232
|
+
primaryEntityId: primaryEntityId,
|
|
3233
|
+
primaryEntityType: ServiceType.RealUserMonitor,
|
|
3234
|
+
accessibleRumApplicationIds: null,
|
|
3235
|
+
limit: 5,
|
|
3236
|
+
});
|
|
3237
|
+
|
|
3238
|
+
const instances: Statement = statementOf(exceptionQuerySpy);
|
|
3239
|
+
expect(instances.query).toContain("AND primaryEntityId = ");
|
|
3240
|
+
expect(instances.query).toContain("AND primaryEntityType = ");
|
|
3241
|
+
expect(boundValues(instances)).toContain(primaryEntityId.toString());
|
|
3242
|
+
expect(boundValues(instances)).toContain(ServiceType.RealUserMonitor);
|
|
3243
|
+
|
|
3244
|
+
const headers: Statement = statementOf(headerQuerySpy);
|
|
3245
|
+
const where: string = whereSection(headers.query);
|
|
3246
|
+
expect(where).toMatch(/AND rumApplicationId = \{p\d+:String\}/);
|
|
3247
|
+
expect(where).toContain("hasAny(exceptionFingerprints");
|
|
3248
|
+
expect(where).toContain("OR sessionId IN (");
|
|
3249
|
+
expect(headers.query).toContain(
|
|
3250
|
+
"HAVING (hasAny(aggExceptionFingerprints",
|
|
3251
|
+
);
|
|
3252
|
+
expect(boundValues(headers)).toContain(primaryEntityId.toString());
|
|
3253
|
+
expect(boundValues(headers)).toContainEqual(["scoped-live-session"]);
|
|
3254
|
+
});
|
|
3255
|
+
|
|
3256
|
+
test("a scoped backend exception admits only instance-proven sessions", async () => {
|
|
3257
|
+
const primaryEntityId: ObjectID = ObjectID.generate();
|
|
3258
|
+
|
|
3259
|
+
exceptionQuerySpy.mockResolvedValue(
|
|
3260
|
+
fakeResultSet([{ sessionId: "backend-session" }]) as never,
|
|
3261
|
+
);
|
|
3262
|
+
headerQuerySpy.mockResolvedValue(
|
|
3263
|
+
fakeResultSet([
|
|
3264
|
+
{
|
|
3265
|
+
sessionId: "backend-session",
|
|
3266
|
+
applicationId: rumApplicationId.toString(),
|
|
3267
|
+
aggStartTime: "2026-08-14 10:00:00.000",
|
|
3268
|
+
aggEndTime: "2026-08-14 10:10:00.000",
|
|
3269
|
+
matchedApplicationCount: 1,
|
|
3270
|
+
},
|
|
3271
|
+
]) as never,
|
|
3272
|
+
);
|
|
3273
|
+
|
|
3274
|
+
const sessions: Array<SessionReplayExceptionSession> =
|
|
3275
|
+
await SessionReplayReadService.getSessionsForException({
|
|
3276
|
+
projectId: projectId,
|
|
3277
|
+
exceptionFingerprint: "shared-fingerprint",
|
|
3278
|
+
primaryEntityId: primaryEntityId,
|
|
3279
|
+
primaryEntityType: ServiceType.OpenTelemetry,
|
|
3280
|
+
accessibleRumApplicationIds: null,
|
|
3281
|
+
limit: 5,
|
|
3282
|
+
});
|
|
3283
|
+
|
|
3284
|
+
expect(sessions).toHaveLength(1);
|
|
3285
|
+
expect(sessions[0]?.sessionId).toBe("backend-session");
|
|
3286
|
+
expect(sessions[0]?.rumApplicationId).toBe(rumApplicationId.toString());
|
|
3287
|
+
|
|
3288
|
+
const instances: Statement = statementOf(exceptionQuerySpy);
|
|
3289
|
+
expect(instances.query).toContain("AND primaryEntityId = ");
|
|
3290
|
+
expect(instances.query).toContain(
|
|
3291
|
+
"ifNull(primaryEntityType, '') = '' OR primaryEntityType = ",
|
|
3292
|
+
);
|
|
3293
|
+
expect(boundValues(instances)).toContain(ServiceType.OpenTelemetry);
|
|
3294
|
+
|
|
3295
|
+
const headers: Statement = statementOf(headerQuerySpy);
|
|
3296
|
+
expect(whereSection(headers.query)).toContain("sessionId IN (");
|
|
3297
|
+
expect(headers.query).not.toContain("hasAny(exceptionFingerprints");
|
|
3298
|
+
expect(headers.query).not.toContain("hasAny(aggExceptionFingerprints");
|
|
3299
|
+
expect(boundValues(headers)).toContainEqual(["backend-session"]);
|
|
3300
|
+
});
|
|
3301
|
+
|
|
3302
|
+
test("an id-only legacy scope uses the same conservative instance and ambiguity guards", async () => {
|
|
3303
|
+
const primaryEntityId: ObjectID = ObjectID.generate();
|
|
3304
|
+
|
|
3305
|
+
exceptionQuerySpy.mockResolvedValue(
|
|
3306
|
+
fakeResultSet([{ sessionId: "legacy-session" }]) as never,
|
|
3307
|
+
);
|
|
3308
|
+
headerQuerySpy.mockResolvedValue(
|
|
3309
|
+
fakeResultSet([
|
|
3310
|
+
{
|
|
3311
|
+
sessionId: "legacy-session",
|
|
3312
|
+
applicationId: rumApplicationId.toString(),
|
|
3313
|
+
aggStartTime: "2026-08-14 10:00:00.000",
|
|
3314
|
+
aggEndTime: "2026-08-14 10:10:00.000",
|
|
3315
|
+
matchedApplicationCount: 1,
|
|
3316
|
+
},
|
|
3317
|
+
]) as never,
|
|
3318
|
+
);
|
|
3319
|
+
|
|
3320
|
+
const sessions: Array<SessionReplayExceptionSession> =
|
|
3321
|
+
await SessionReplayReadService.getSessionsForException({
|
|
3322
|
+
projectId: projectId,
|
|
3323
|
+
exceptionFingerprint: "shared-fingerprint",
|
|
3324
|
+
primaryEntityId: primaryEntityId,
|
|
3325
|
+
accessibleRumApplicationIds: null,
|
|
3326
|
+
limit: 5,
|
|
3327
|
+
});
|
|
3328
|
+
|
|
3329
|
+
expect(sessions).toHaveLength(1);
|
|
3330
|
+
|
|
3331
|
+
const instances: Statement = statementOf(exceptionQuerySpy);
|
|
3332
|
+
expect(instances.query).toContain("AND primaryEntityId = ");
|
|
3333
|
+
expect(instances.query).not.toContain("AND primaryEntityType = ");
|
|
3334
|
+
|
|
3335
|
+
const headers: Statement = statementOf(headerQuerySpy);
|
|
3336
|
+
expect(headers.query).not.toContain("hasAny(exceptionFingerprints");
|
|
3337
|
+
expect(headers.query).toContain(
|
|
3338
|
+
"count() OVER (PARTITION BY sessionId) AS matchedApplicationCount",
|
|
3339
|
+
);
|
|
3340
|
+
expect(headers.query).toContain("QUALIFY matchedApplicationCount = 1");
|
|
3341
|
+
});
|
|
3342
|
+
|
|
3343
|
+
test("rejects a scoped backend session id shared by two applications before authorization and limit", async () => {
|
|
3344
|
+
const primaryEntityId: ObjectID = ObjectID.generate();
|
|
3345
|
+
const accessibleApplicationId: ObjectID = ObjectID.generate();
|
|
3346
|
+
const startTime: Date = new Date("2026-08-14T10:00:00.000Z");
|
|
3347
|
+
const endTime: Date = new Date("2026-08-14T11:00:00.000Z");
|
|
3348
|
+
|
|
3349
|
+
exceptionQuerySpy.mockResolvedValue(
|
|
3350
|
+
fakeResultSet([{ sessionId: "colliding-session" }]) as never,
|
|
3351
|
+
);
|
|
3352
|
+
/* The selected pre-limit window count also makes the mapper fail closed. */
|
|
3353
|
+
headerQuerySpy.mockResolvedValue(
|
|
3354
|
+
fakeResultSet([
|
|
3355
|
+
{
|
|
3356
|
+
sessionId: "colliding-session",
|
|
3357
|
+
applicationId: accessibleApplicationId.toString(),
|
|
3358
|
+
aggStartTime: startTime.getTime(),
|
|
3359
|
+
matchedApplicationCount: 2,
|
|
3360
|
+
},
|
|
3361
|
+
]) as never,
|
|
3362
|
+
);
|
|
3363
|
+
|
|
3364
|
+
const sessions: Array<SessionReplayExceptionSession> =
|
|
3365
|
+
await SessionReplayReadService.getSessionsForException({
|
|
3366
|
+
projectId: projectId,
|
|
3367
|
+
exceptionFingerprint: "shared-fingerprint",
|
|
3368
|
+
primaryEntityId: primaryEntityId,
|
|
3369
|
+
primaryEntityType: ServiceType.OpenTelemetry,
|
|
3370
|
+
accessibleRumApplicationIds: [accessibleApplicationId],
|
|
3371
|
+
startTime: startTime,
|
|
3372
|
+
endTime: endTime,
|
|
3373
|
+
limit: 1,
|
|
3374
|
+
});
|
|
3375
|
+
|
|
3376
|
+
expect(sessions).toEqual([]);
|
|
3377
|
+
|
|
3378
|
+
const headers: Statement = statementOf(headerQuerySpy);
|
|
3379
|
+
const where: string = whereSection(headers.query);
|
|
3380
|
+
const qualifyIndex: number = headers.query.indexOf(
|
|
3381
|
+
"QUALIFY matchedApplicationCount = 1",
|
|
3382
|
+
);
|
|
3383
|
+
const authorizationIndex: number = headers.query.indexOf(
|
|
3384
|
+
"rumApplicationId IN (",
|
|
3385
|
+
);
|
|
3386
|
+
const orderIndex: number = headers.query.indexOf("ORDER BY");
|
|
3387
|
+
const limitIndex: number = headers.query.indexOf("LIMIT");
|
|
3388
|
+
|
|
3389
|
+
expect(headers.query).toContain(
|
|
3390
|
+
"count() OVER (PARTITION BY sessionId) AS matchedApplicationCount",
|
|
3391
|
+
);
|
|
3392
|
+
expect(where).not.toContain("rumApplicationId IN (");
|
|
3393
|
+
expect(where).not.toContain("startTime >= ");
|
|
3394
|
+
expect(headers.query).toMatch(/aggStartTime >= \{p\d+:Int64\}/);
|
|
3395
|
+
expect(headers.query).toMatch(/aggStartTime <= \{p\d+:Int64\}/);
|
|
3396
|
+
expect(qualifyIndex).toBeGreaterThan(headers.query.indexOf("GROUP BY"));
|
|
3397
|
+
expect(authorizationIndex).toBeGreaterThan(qualifyIndex);
|
|
3398
|
+
expect(orderIndex).toBeGreaterThan(authorizationIndex);
|
|
3399
|
+
expect(limitIndex).toBeGreaterThan(orderIndex);
|
|
3400
|
+
expect(boundValues(headers)).toContainEqual([
|
|
3401
|
+
accessibleApplicationId.toString(),
|
|
3402
|
+
]);
|
|
3403
|
+
expect(boundValues(headers)).toContain(startTime.getTime());
|
|
3404
|
+
expect(boundValues(headers)).toContain(endTime.getTime());
|
|
3405
|
+
});
|
|
3406
|
+
|
|
3407
|
+
test("a scoped backend exception with no proven session fails closed", async () => {
|
|
3408
|
+
exceptionQuerySpy.mockResolvedValue(fakeResultSet([]) as never);
|
|
3409
|
+
|
|
3410
|
+
const sessions: Array<SessionReplayExceptionSession> =
|
|
3411
|
+
await SessionReplayReadService.getSessionsForException({
|
|
3412
|
+
projectId: projectId,
|
|
3413
|
+
exceptionFingerprint: "fp-1",
|
|
3414
|
+
primaryEntityId: ObjectID.generate(),
|
|
3415
|
+
primaryEntityType: ServiceType.OpenTelemetry,
|
|
3416
|
+
accessibleRumApplicationIds: null,
|
|
3417
|
+
limit: 5,
|
|
3418
|
+
});
|
|
3419
|
+
|
|
3420
|
+
expect(sessions).toEqual([]);
|
|
3421
|
+
expect(headerQuerySpy).not.toHaveBeenCalled();
|
|
3422
|
+
});
|
|
3423
|
+
|
|
3424
|
+
test("rejects a type without an id or an invalid entity type before querying", async () => {
|
|
3425
|
+
await expect(
|
|
3426
|
+
SessionReplayReadService.getSessionsForException({
|
|
3427
|
+
projectId: projectId,
|
|
3428
|
+
exceptionFingerprint: "fp-1",
|
|
3429
|
+
primaryEntityType: ServiceType.OpenTelemetry,
|
|
3430
|
+
accessibleRumApplicationIds: null,
|
|
3431
|
+
limit: 5,
|
|
3432
|
+
}),
|
|
3433
|
+
).rejects.toBeInstanceOf(BadDataException);
|
|
3434
|
+
|
|
3435
|
+
await expect(
|
|
3436
|
+
SessionReplayReadService.getSessionsForException({
|
|
3437
|
+
projectId: projectId,
|
|
3438
|
+
exceptionFingerprint: "fp-1",
|
|
3439
|
+
primaryEntityId: ObjectID.generate(),
|
|
3440
|
+
primaryEntityType: "invalid" as ServiceType,
|
|
3441
|
+
accessibleRumApplicationIds: null,
|
|
3442
|
+
limit: 5,
|
|
3443
|
+
}),
|
|
3444
|
+
).rejects.toBeInstanceOf(BadDataException);
|
|
3445
|
+
|
|
3446
|
+
expect(exceptionQuerySpy).not.toHaveBeenCalled();
|
|
3447
|
+
expect(headerQuerySpy).not.toHaveBeenCalled();
|
|
3448
|
+
});
|
|
3449
|
+
|
|
1663
3450
|
test("a pinned session the instance table has never seen falls back to the fingerprint alone", async () => {
|
|
1664
3451
|
/* The session exists, but it never threw this exception. */
|
|
1665
3452
|
exceptionQuerySpy.mockResolvedValue(fakeResultSet([]) as never);
|