@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.
Files changed (1589) hide show
  1. package/Models/AnalyticsModels/AuditLog.ts +81 -1
  2. package/Models/AnalyticsModels/SecurityEvent.ts +4 -4
  3. package/Models/DatabaseModels/Alert.ts +62 -0
  4. package/Models/DatabaseModels/GlobalConfig.ts +1 -1
  5. package/Models/DatabaseModels/Incident.ts +66 -0
  6. package/Models/DatabaseModels/IncidentEpisodePublicNote.ts +74 -0
  7. package/Models/DatabaseModels/IncidentPublicNote.ts +74 -0
  8. package/Models/DatabaseModels/Index.ts +10 -4
  9. package/Models/DatabaseModels/NetworkDevice.ts +67 -0
  10. package/Models/DatabaseModels/NetworkDeviceDiagnostic.ts +746 -0
  11. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +151 -0
  12. package/Models/DatabaseModels/NetworkSiteAssignmentRule.ts +1 -1
  13. package/Models/DatabaseModels/Project.ts +41 -0
  14. package/Models/DatabaseModels/RumApplication.ts +1 -1
  15. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.ts +74 -0
  16. package/Models/DatabaseModels/{GoogleSecOpsConnection.ts → SecurityEventConnection.ts} +61 -51
  17. package/Models/DatabaseModels/{GoogleSecOpsConnectionRun.ts → SecurityEventConnectionRun.ts} +24 -24
  18. package/Models/DatabaseModels/ServiceLevelObjective.ts +185 -8
  19. package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.ts +746 -43
  20. package/Models/DatabaseModels/ServiceLevelObjectiveFeed.ts +575 -0
  21. package/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.ts +582 -0
  22. package/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.ts +16 -0
  23. package/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.ts +16 -0
  24. package/Models/DatabaseModels/StatusPageAnnouncement.ts +75 -0
  25. package/Models/DatabaseModels/TelemetryIngestionKey.ts +2 -2
  26. package/Models/DatabaseModels/ThreatIntelFeed.ts +1 -1
  27. package/Server/API/AIInvestigationAPI.ts +484 -24
  28. package/Server/API/BaseAPI.ts +17 -0
  29. package/Server/API/BillingInvoiceAPI.ts +343 -30
  30. package/Server/API/BillingPaymentMethodAPI.ts +126 -5
  31. package/Server/API/DashboardAPI.ts +96 -2
  32. package/Server/API/SecurityEventConnectionAPI.ts +380 -0
  33. package/Server/API/StatusPageAPI.ts +308 -199
  34. package/Server/API/TelemetryAPI.ts +402 -265
  35. package/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.ts +99 -0
  36. package/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.ts +83 -0
  37. package/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.ts +36 -0
  38. package/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.ts +29 -0
  39. package/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.ts +516 -0
  40. package/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.ts +98 -0
  41. package/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.ts +27 -0
  42. package/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.ts +97 -0
  43. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
  44. package/Server/Middleware/TelemetryIngest.ts +101 -6
  45. package/Server/Services/AlertEpisodeLabelRuleEngineService.ts +138 -67
  46. package/Server/Services/AlertEpisodeOwnerRuleEngineService.ts +213 -84
  47. package/Server/Services/AlertEpisodePrivacyRuleEngineService.ts +112 -35
  48. package/Server/Services/AlertLabelRuleEngineService.ts +299 -217
  49. package/Server/Services/AlertOwnerRuleEngineService.ts +572 -396
  50. package/Server/Services/AlertPrivacyRuleEngineService.ts +116 -40
  51. package/Server/Services/AlertService.ts +111 -4
  52. package/Server/Services/AuditLogService.ts +612 -59
  53. package/Server/Services/BillingInvoiceService.ts +112 -102
  54. package/Server/Services/BillingService.ts +539 -11
  55. package/Server/Services/CephClusterLabelRuleEngineService.ts +170 -109
  56. package/Server/Services/CephClusterOwnerRuleEngineService.ts +233 -115
  57. package/Server/Services/CloudResourceLabelRuleEngineService.ts +163 -100
  58. package/Server/Services/CloudResourceOwnerRuleEngineService.ts +236 -115
  59. package/Server/Services/DashboardLabelRuleEngineService.ts +145 -84
  60. package/Server/Services/DashboardOwnerRuleEngineService.ts +213 -95
  61. package/Server/Services/DatabaseService.ts +171 -21
  62. package/Server/Services/DockerHostLabelRuleEngineService.ts +171 -110
  63. package/Server/Services/DockerHostOwnerRuleEngineService.ts +233 -115
  64. package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +181 -112
  65. package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +243 -118
  66. package/Server/Services/ExceptionAggregationService.ts +7 -16
  67. package/Server/Services/HostLabelRuleEngineService.ts +167 -106
  68. package/Server/Services/HostOwnerRuleEngineService.ts +229 -111
  69. package/Server/Services/IncidentEpisodeLabelRuleEngineService.ts +141 -67
  70. package/Server/Services/IncidentEpisodeOwnerRuleEngineService.ts +272 -72
  71. package/Server/Services/IncidentEpisodePrivacyRuleEngineService.ts +112 -35
  72. package/Server/Services/IncidentEpisodePublicNoteService.ts +24 -0
  73. package/Server/Services/IncidentLabelRuleEngineService.ts +279 -204
  74. package/Server/Services/IncidentOwnerRuleEngineService.ts +595 -425
  75. package/Server/Services/IncidentPrivacyRuleEngineService.ts +117 -44
  76. package/Server/Services/IncidentPublicNoteService.ts +24 -0
  77. package/Server/Services/IncidentService.ts +114 -3
  78. package/Server/Services/IncomingCallPolicyLabelRuleEngineService.ts +147 -83
  79. package/Server/Services/IncomingCallPolicyOwnerRuleEngineService.ts +221 -100
  80. package/Server/Services/Index.ts +10 -4
  81. package/Server/Services/InventoryItemService.ts +28 -0
  82. package/Server/Services/IoTFleetLabelRuleEngineService.ts +145 -84
  83. package/Server/Services/IoTFleetOwnerRuleEngineService.ts +213 -95
  84. package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +181 -112
  85. package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +243 -118
  86. package/Server/Services/LabelService.ts +23 -28
  87. package/Server/Services/LogAggregationService.ts +17 -23
  88. package/Server/Services/MetricAggregationService.ts +4 -14
  89. package/Server/Services/MonitorLabelRuleEngineService.ts +152 -92
  90. package/Server/Services/MonitorOwnerRuleEngineService.ts +220 -104
  91. package/Server/Services/MonitorProbeService.ts +20 -2
  92. package/Server/Services/MonitorService.ts +11 -9
  93. package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +376 -5
  94. package/Server/Services/NetworkDeviceDiagnosticService.ts +417 -0
  95. package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +147 -83
  96. package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +218 -97
  97. package/Server/Services/NetworkDeviceService.ts +39 -2
  98. package/Server/Services/OnCallDutyPolicyLabelRuleEngineService.ts +151 -80
  99. package/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.ts +222 -97
  100. package/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.ts +154 -83
  101. package/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.ts +225 -100
  102. package/Server/Services/PodmanHostLabelRuleEngineService.ts +171 -110
  103. package/Server/Services/PodmanHostOwnerRuleEngineService.ts +235 -115
  104. package/Server/Services/ProjectService.ts +111 -10
  105. package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +174 -110
  106. package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +239 -116
  107. package/Server/Services/RumApplicationLabelRuleEngineService.ts +137 -73
  108. package/Server/Services/RumApplicationOwnerRuleEngineService.ts +200 -83
  109. package/Server/Services/RunbookLabelRuleEngineService.ts +146 -84
  110. package/Server/Services/RunbookOwnerRuleEngineService.ts +216 -95
  111. package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +324 -230
  112. package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +613 -428
  113. package/Server/Services/ScheduledMaintenancePublicNoteService.ts +24 -0
  114. package/Server/Services/ScheduledMaintenanceService.ts +43 -14
  115. package/Server/Services/{GoogleSecOpsConnectionRunService.ts → SecurityEventConnectionRunService.ts} +1 -1
  116. package/Server/Services/SecurityEventConnectionService.ts +590 -0
  117. package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +143 -74
  118. package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +206 -85
  119. package/Server/Services/ServiceLabelRuleEngineService.ts +172 -110
  120. package/Server/Services/ServiceLevelObjectiveBurnRateRuleService.ts +1057 -18
  121. package/Server/Services/ServiceLevelObjectiveFeedService.ts +108 -0
  122. package/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.ts +793 -97
  123. package/Server/Services/ServiceLevelObjectiveMonitorRuleService.ts +1069 -0
  124. package/Server/Services/ServiceLevelObjectiveOwnerTeamService.ts +240 -1
  125. package/Server/Services/ServiceLevelObjectiveOwnerUserService.ts +257 -1
  126. package/Server/Services/ServiceLevelObjectiveService.ts +1356 -56
  127. package/Server/Services/ServiceOwnerRuleEngineService.ts +238 -116
  128. package/Server/Services/StatusPageAnnouncementService.ts +13 -0
  129. package/Server/Services/StatusPageLabelRuleEngineService.ts +146 -85
  130. package/Server/Services/StatusPageOwnerRuleEngineService.ts +210 -99
  131. package/Server/Services/StatusPageSubscriberNotificationTemplateService.ts +28 -232
  132. package/Server/Services/StatusPageSubscriberService.ts +6 -0
  133. package/Server/Services/TelemetryUsageBillingService.ts +38 -7
  134. package/Server/Services/ThreatIntelFeedService.ts +1 -1
  135. package/Server/Services/TraceAggregationService.ts +77 -28
  136. package/Server/Services/VMwareVCenterLabelRuleEngineService.ts +173 -110
  137. package/Server/Services/VMwareVCenterOwnerRuleEngineService.ts +238 -116
  138. package/Server/Services/WorkflowLabelRuleEngineService.ts +145 -84
  139. package/Server/Services/WorkflowOwnerRuleEngineService.ts +215 -95
  140. package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -0
  141. package/Server/Types/Database/UpdateByID.ts +3 -0
  142. package/Server/Types/Database/UpdateOneBy.ts +7 -0
  143. package/Server/Utils/AI/AlertAIContextBuilder.ts +19 -0
  144. package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +13 -1
  145. package/Server/Utils/AI/IncidentAIContextBuilder.ts +39 -0
  146. package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +15 -1
  147. package/Server/Utils/AI/SRE/InvestigationEvidence.ts +658 -0
  148. package/Server/Utils/AI/SRE/InvestigationReferences.ts +324 -0
  149. package/Server/Utils/AI/Toolbox/AlertTools.ts +37 -1
  150. package/Server/Utils/AI/Toolbox/IncidentTools.ts +22 -1
  151. package/Server/Utils/AI/Toolbox/Index.ts +38 -0
  152. package/Server/Utils/AI/Toolbox/SloTools.ts +416 -51
  153. package/Server/Utils/AI/Toolbox/TimelineTools.ts +9 -2
  154. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +80 -0
  155. package/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.ts +151 -13
  156. package/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.ts +17 -4
  157. package/Server/Utils/Dashboard/PublicDashboardSloWidget.ts +155 -8
  158. package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +16 -0
  159. package/Server/Utils/Database/RelationValueUtil.ts +106 -0
  160. package/Server/Utils/Monitor/Criteria/CompareCriteria.ts +6 -1
  161. package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +22 -27
  162. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +5 -3
  163. package/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.ts +3 -1
  164. package/Server/Utils/Monitor/MonitorStepsProjectValidator.ts +50 -20
  165. package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +13 -1
  166. package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +6 -11
  167. package/Server/Utils/Rules/MonitorRulePatternValidator.ts +51 -0
  168. package/Server/Utils/Rules/OwnerRuleAssignment.ts +110 -0
  169. package/Server/Utils/Rules/RuleRun/RuleApplication.ts +81 -0
  170. package/Server/Utils/Rules/RuleRun/RuleRunPermission.ts +188 -0
  171. package/Server/Utils/Rules/RuleRun/RuleRunRegistry.ts +803 -0
  172. package/Server/Utils/Rules/RuleRun/RuleRunner.ts +341 -0
  173. package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +3 -2
  174. package/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.ts +1108 -0
  175. package/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.ts +732 -0
  176. package/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.ts +497 -0
  177. package/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.ts +689 -0
  178. package/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.ts +767 -0
  179. package/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.ts +571 -0
  180. package/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.ts +827 -0
  181. package/Server/Utils/SecurityEvent/{GoogleSecOps → Connectors/GoogleSecOps}/GoogleSecOpsClient.ts +609 -74
  182. package/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.ts +2101 -0
  183. package/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.ts +610 -0
  184. package/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.ts +549 -0
  185. package/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.ts +830 -0
  186. package/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.ts +684 -0
  187. package/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.ts +487 -0
  188. package/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.ts +778 -0
  189. package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.ts +1182 -0
  190. package/Server/Utils/SecurityEvent/{GoogleSecOps/GoogleSecOpsRunExecutor.ts → Connectors/SecurityEventConnectionRunExecutor.ts} +165 -76
  191. package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.ts +306 -0
  192. package/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.ts +55 -0
  193. package/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.ts +709 -0
  194. package/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.ts +596 -0
  195. package/Server/Utils/SecurityEvent/Connectors/Types.ts +431 -0
  196. package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +1 -1
  197. package/Server/Utils/SecurityEvent/SecurityEventDedupe.ts +81 -0
  198. package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +2 -2
  199. package/Server/Utils/SessionReplay/SessionReplayReadService.ts +902 -40
  200. package/Server/Utils/Slo/SloFeedUtil.ts +200 -0
  201. package/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.ts +173 -0
  202. package/Server/Utils/Slo/SloMetricUtil.ts +327 -0
  203. package/Server/Utils/Slo/SloOwnerReferenceValidator.ts +208 -0
  204. package/Server/Utils/Slo/SloRecordReferenceValidator.ts +169 -0
  205. package/Server/Utils/StartServer.ts +10 -0
  206. package/Server/Utils/StatusPage/MonitorRulePatternValidator.ts +6 -43
  207. package/Server/Utils/StatusPageResource.ts +50 -5
  208. package/Server/Utils/Telemetry/EntityRegistry.ts +8 -0
  209. package/Server/Utils/Telemetry/KubernetesResourceAttributes.ts +108 -0
  210. package/Server/Utils/Telemetry/ResourceEntityFilter.ts +174 -93
  211. package/Server/Utils/Telemetry/ResourceFacetPlanner.ts +251 -0
  212. package/Server/Utils/Telemetry/ResourceFacetResolver.ts +248 -413
  213. package/Server/Utils/Telemetry/ServiceDependencyDiscovery.ts +668 -0
  214. package/Server/Utils/Telemetry/TraceContextPropagation.ts +348 -0
  215. package/Server/Utils/Telemetry.ts +18 -0
  216. package/Tests/App/Dashboard/AIInvestigationHeaderStatus.test.tsx +1063 -1
  217. package/Tests/App/Dashboard/AIRootCauseFeedItem.test.tsx +285 -0
  218. package/Tests/App/Dashboard/AddWidgetModal.test.tsx +4 -1
  219. package/Tests/App/Dashboard/AffectedResourcesDisplay.test.tsx +242 -0
  220. package/Tests/App/Dashboard/AffectedResourcesSlo.test.tsx +307 -0
  221. package/Tests/App/Dashboard/AlertEpisodeViewFields.test.tsx +601 -15
  222. package/Tests/App/Dashboard/ArchiveResourceCard.test.tsx +289 -0
  223. package/Tests/App/Dashboard/AuditLogsTable.test.tsx +598 -0
  224. package/Tests/App/Dashboard/BillingDefaultPaymentMethod.test.tsx +1046 -0
  225. package/Tests/App/Dashboard/BillingPaidUsageFlow.test.tsx +3 -0
  226. package/Tests/App/Dashboard/BillingPaymentMethodForm.test.tsx +201 -7
  227. package/Tests/App/Dashboard/BooleanSeriesCriteriaFilterText.test.ts +82 -0
  228. package/Tests/App/Dashboard/BreadcrumbCoverage.test.tsx +16 -1
  229. package/Tests/App/Dashboard/ChangeAlertStateAIHeader.test.tsx +943 -0
  230. package/Tests/App/Dashboard/ChatActivityFeed.test.tsx +168 -1
  231. package/Tests/App/Dashboard/CloudResourceTelemetryScope.test.ts +41 -0
  232. package/Tests/App/Dashboard/ConnectionTestModal.test.tsx +604 -0
  233. package/Tests/App/Dashboard/ConnectorTestReportView.test.tsx +755 -0
  234. package/Tests/App/Dashboard/CorrelateFilterBuilder.test.tsx +1095 -1
  235. package/Tests/App/Dashboard/CorrelateFilterChips.test.tsx +910 -0
  236. package/Tests/App/Dashboard/CorrelateGraph.test.tsx +3747 -25
  237. package/Tests/App/Dashboard/CorrelateGraphHelpers.test.ts +1085 -0
  238. package/Tests/App/Dashboard/CorrelateInspector.test.tsx +1534 -0
  239. package/Tests/App/Dashboard/CorrelateNodeCard.test.tsx +965 -0
  240. package/Tests/App/Dashboard/CorrelateResultSummary.test.tsx +1525 -0
  241. package/Tests/App/Dashboard/CorrelationGraph.test.ts +1030 -0
  242. package/Tests/App/Dashboard/CorrelationGraphLayout.test.ts +526 -0
  243. package/Tests/App/Dashboard/DashboardLazyPages.test.tsx +153 -6
  244. package/Tests/App/Dashboard/DeviceDiagnostics.test.tsx +787 -0
  245. package/Tests/App/Dashboard/DeviceLatencyTrend.test.tsx +278 -0
  246. package/Tests/App/Dashboard/DiscoveryReviewInventoryRefresh.test.tsx +279 -0
  247. package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +87 -0
  248. package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +443 -8
  249. package/Tests/App/Dashboard/EntityDetailPanel.test.tsx +165 -0
  250. package/Tests/App/Dashboard/EntityFilterDropdownArchivedSlos.test.tsx +340 -0
  251. package/Tests/App/Dashboard/EpisodeChangeState.test.tsx +1069 -0
  252. package/Tests/App/Dashboard/EpisodeMembersCard.test.tsx +772 -0
  253. package/Tests/App/Dashboard/EventOverviewPages.test.tsx +2450 -0
  254. package/Tests/App/Dashboard/EventOverviewSkeleton.test.tsx +210 -0
  255. package/Tests/App/Dashboard/EventStatBar.test.tsx +392 -0
  256. package/Tests/App/Dashboard/EventStatusPanel.test.tsx +247 -0
  257. package/Tests/App/Dashboard/ExceptionAIAssistance.test.tsx +606 -0
  258. package/Tests/App/Dashboard/ExceptionBreadcrumbTimeline.test.tsx +273 -0
  259. package/Tests/App/Dashboard/ExceptionDetailSideMenu.test.tsx +176 -0
  260. package/Tests/App/Dashboard/ExceptionOverviewCards.test.tsx +366 -0
  261. package/Tests/App/Dashboard/ExceptionSegmentedControl.test.tsx +1020 -0
  262. package/Tests/App/Dashboard/ExceptionSignalPages.test.tsx +371 -0
  263. package/Tests/App/Dashboard/ExceptionStackFrameViewer.test.tsx +440 -0
  264. package/Tests/App/Dashboard/ExceptionSummary.test.tsx +381 -0
  265. package/Tests/App/Dashboard/ExceptionTriage.test.tsx +306 -0
  266. package/Tests/App/Dashboard/ExceptionsResourceFacets.test.tsx +604 -0
  267. package/Tests/App/Dashboard/ExceptionsViewerEntityChips.test.tsx +706 -0
  268. package/Tests/App/Dashboard/FeedOrdering.test.ts +32 -0
  269. package/Tests/App/Dashboard/IncidentEpisodeViewFields.test.tsx +618 -13
  270. package/Tests/App/Dashboard/InfrastructureExplorer.test.tsx +254 -207
  271. package/Tests/App/Dashboard/InfrastructureGraph.test.tsx +303 -135
  272. package/Tests/App/Dashboard/InvestigationEvidenceList.test.tsx +1472 -0
  273. package/Tests/App/Dashboard/InvestigationFeedRefresh.test.tsx +303 -0
  274. package/Tests/App/Dashboard/InvestigationPanel.test.tsx +1931 -25
  275. package/Tests/App/Dashboard/InvestigationPanelStatus.test.tsx +159 -2
  276. package/Tests/App/Dashboard/InvestigationReferenceLink.test.tsx +177 -0
  277. package/Tests/App/Dashboard/InvestigationReportView.test.tsx +1398 -0
  278. package/Tests/App/Dashboard/InvestigationRunDetails.test.tsx +1166 -0
  279. package/Tests/App/Dashboard/InvoicesPayInvoice.test.tsx +437 -0
  280. package/Tests/App/Dashboard/KubernetesImageReferenceView.test.tsx +114 -0
  281. package/Tests/App/Dashboard/KubernetesLogsTabChips.test.tsx +285 -0
  282. package/Tests/App/Dashboard/LogsEntityChipNames.test.tsx +316 -0
  283. package/Tests/App/Dashboard/LogsResourceFacetChips.test.tsx +361 -0
  284. package/Tests/App/Dashboard/NetworkDeviceBulkDelete.test.tsx +65 -0
  285. package/Tests/App/Dashboard/NetworkTopologyLiveView.test.tsx +5 -0
  286. package/Tests/App/Dashboard/ProfileTableEntityNames.test.tsx +432 -0
  287. package/Tests/App/Dashboard/ProfileViewEntityName.test.tsx +250 -0
  288. package/Tests/App/Dashboard/ResourceArchiveSettings.test.tsx +10 -0
  289. package/Tests/App/Dashboard/ResourceAuditLogsSideMenus.test.tsx +74 -0
  290. package/Tests/App/Dashboard/ResourceFeed.test.tsx +125 -5
  291. package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +8 -1
  292. package/Tests/App/Dashboard/ResourceLogsTabsBareLayout.test.tsx +700 -0
  293. package/Tests/App/Dashboard/ResourcePageEntityNameProps.test.tsx +803 -0
  294. package/Tests/App/Dashboard/RumSessionReplaySideMenu.test.tsx +11 -1
  295. package/Tests/App/Dashboard/ScheduledMaintenanceChangeState.test.tsx +1026 -0
  296. package/Tests/App/Dashboard/ScheduledMaintenanceFeedRefresh.test.tsx +436 -0
  297. package/Tests/App/Dashboard/ScheduledMaintenanceOverviewPage.test.tsx +1195 -0
  298. package/Tests/App/Dashboard/SecurityEventConnectionDiagnostics.test.tsx +1764 -0
  299. package/Tests/App/Dashboard/SecurityEventConnectionFormModal.test.tsx +1958 -0
  300. package/Tests/App/Dashboard/SecurityEventConnectionsEmptyState.test.tsx +448 -0
  301. package/Tests/App/Dashboard/SecurityEventConnectionsTable.test.tsx +1455 -0
  302. package/Tests/App/Dashboard/SecurityEventSeverityPill.test.tsx +233 -0
  303. package/Tests/App/Dashboard/SecurityEventsEmptyState.test.tsx +282 -0
  304. package/Tests/App/Dashboard/SecurityEventsSideMenu.test.tsx +247 -0
  305. package/Tests/App/Dashboard/ServiceMapGraph.test.tsx +375 -274
  306. package/Tests/App/Dashboard/SessionReplayAuditTable.test.tsx +410 -0
  307. package/Tests/App/Dashboard/SloActiveBurnEventsCard.test.tsx +538 -0
  308. package/Tests/App/Dashboard/SloBulkActionsArchive.test.tsx +252 -0
  309. package/Tests/App/Dashboard/SloDashboardTemplateWidgets.test.tsx +322 -518
  310. package/Tests/App/Dashboard/SloElement.test.tsx +194 -0
  311. package/Tests/App/Dashboard/SloFeed.test.tsx +289 -0
  312. package/Tests/App/Dashboard/SloHistoryCharts.test.tsx +471 -0
  313. package/Tests/App/Dashboard/SloHistorySeries.test.tsx +607 -0
  314. package/Tests/App/Dashboard/SloListWidget.test.tsx +783 -0
  315. package/Tests/App/Dashboard/SloMetricsPage.test.tsx +346 -0
  316. package/Tests/App/Dashboard/SloMonitorsPage.test.tsx +661 -0
  317. package/Tests/App/Dashboard/SloMonitorsSummaryCard.test.tsx +489 -0
  318. package/Tests/App/Dashboard/SloNavigationWiring.test.tsx +437 -0
  319. package/Tests/App/Dashboard/SloNoticeBanner.test.tsx +305 -0
  320. package/Tests/App/Dashboard/SloOverviewData.test.tsx +563 -0
  321. package/Tests/App/Dashboard/SloOverviewHero.test.tsx +311 -0
  322. package/Tests/App/Dashboard/SloOverviewKpiStrip.test.tsx +426 -0
  323. package/Tests/App/Dashboard/SloOverviewSidebarCards.test.tsx +493 -0
  324. package/Tests/App/Dashboard/SloSettings.test.tsx +633 -0
  325. package/Tests/App/Dashboard/SloStatusSummaryCards.test.tsx +403 -0
  326. package/Tests/App/Dashboard/SloViewSideMenuCounts.test.tsx +373 -0
  327. package/Tests/App/Dashboard/SloWidgetVariableBinding.test.tsx +689 -0
  328. package/Tests/App/Dashboard/TelemetryResourceRetentionSettings.test.tsx +774 -0
  329. package/Tests/App/Dashboard/TopErrorsPanelResourceNames.test.tsx +316 -0
  330. package/Tests/App/Dashboard/TopologyConnectivitySection.test.tsx +206 -0
  331. package/Tests/App/Dashboard/TopologyDataLoading.test.tsx +30 -0
  332. package/Tests/App/Dashboard/TopologyPageNavigation.test.tsx +88 -24
  333. package/Tests/App/Dashboard/TraceExplorer.test.tsx +1590 -0
  334. package/Tests/App/Dashboard/TraceWaterfall.test.tsx +488 -0
  335. package/Tests/App/Dashboard/TracesAnalyticsSeriesLabels.test.tsx +367 -0
  336. package/Tests/App/Dashboard/TracesEntityNames.test.tsx +617 -0
  337. package/Tests/App/Dashboard/TracesResourceFacets.test.tsx +613 -0
  338. package/Tests/App/Dashboard/UseBulkShortenDeviceNames.test.tsx +1312 -0
  339. package/Tests/App/Dashboard/UseServiceNames.test.tsx +359 -0
  340. package/Tests/App/Dashboard/WidgetCatalog.test.ts +9 -1
  341. package/Tests/Models/AnalyticsModels/RumSessionReplayColumns.test.ts +14 -16
  342. package/Tests/Models/DatabaseModels/AuditLogModelConfiguration.test.ts +442 -0
  343. package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +13 -7
  344. package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +48 -1
  345. package/Tests/Models/DatabaseModels/SloOverhaulModels.test.ts +835 -0
  346. package/Tests/Models/DatabaseModels/StaticRuleCriteriaInheritance.test.ts +3 -2
  347. package/Tests/Models/DiscoveryScanNetbiosLookupColumn.test.ts +328 -0
  348. package/Tests/Models/DiscoveryScanShortDeviceNamesColumn.test.ts +335 -0
  349. package/Tests/Models/InventoryItemNaming.test.ts +132 -16
  350. package/Tests/Models/NetworkDeviceDiagnosticContract.test.ts +194 -0
  351. package/Tests/Models/NetworkDeviceDnsNameColumn.test.ts +321 -0
  352. package/Tests/Models/ProjectDataResidencyColumn.test.ts +154 -0
  353. package/Tests/Models/SecurityDomainAccessControl.test.ts +197 -22
  354. package/Tests/Server/API/AIInvestigationAPI.test.ts +611 -2
  355. package/Tests/Server/API/AIInvestigationEvidenceAPI.test.ts +1098 -0
  356. package/Tests/Server/API/BaseAPI.test.ts +6 -0
  357. package/Tests/Server/API/BaseAPIUpdateMiscDataProps.test.ts +217 -0
  358. package/Tests/Server/API/BillingInvoiceAPI.test.ts +7 -0
  359. package/Tests/Server/API/BillingInvoiceAPIPaymentStates.test.ts +990 -0
  360. package/Tests/Server/API/BillingPaymentMethodAPI.test.ts +498 -0
  361. package/Tests/Server/API/DashboardPublicSloAPI.test.ts +405 -0
  362. package/Tests/Server/API/SecurityEventConnectionAPI.test.ts +1750 -0
  363. package/Tests/Server/API/SessionReplayAPI.test.ts +644 -1
  364. package/Tests/Server/API/StatusPageManageSubscriptionRecipient.test.ts +857 -0
  365. package/Tests/Server/API/StatusPageManageSubscriptionTemplateVariables.test.ts +1084 -0
  366. package/Tests/Server/API/TelemetryFacetsAPI.test.ts +810 -0
  367. package/Tests/Server/Infrastructure/E2EClickHouseFixtureAccess.test.ts +240 -0
  368. package/Tests/Server/Infrastructure/Postgres/AddConfigurableRuleCriteriaMigration.test.ts +33 -3
  369. package/Tests/Server/Infrastructure/Postgres/AddDataResidencyToProjectMigration.test.ts +202 -0
  370. package/Tests/Server/Infrastructure/Postgres/AddNetbiosLookupToNetworkDeviceDiscoveryScanMigration.test.ts +330 -0
  371. package/Tests/Server/Infrastructure/Postgres/AddNetworkDeviceDnsNameAndShortDeviceNamesMigration.test.ts +340 -0
  372. package/Tests/Server/Infrastructure/Postgres/BackfillSloMonitorRulesAndAffectedResourcesMigration.test.ts +343 -0
  373. package/Tests/Server/Infrastructure/Postgres/SloProductOverhaulMigration.test.ts +801 -0
  374. package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +229 -0
  375. package/Tests/Server/Services/AddSubscriberUpdateNotificationStatusMigration.test.ts +307 -0
  376. package/Tests/Server/Services/AuditLogService.test.ts +1124 -0
  377. package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +200 -1
  378. package/Tests/Server/Services/BillingInvoiceServiceMutexRelease.test.ts +254 -0
  379. package/Tests/Server/Services/BillingService.test.ts +70 -0
  380. package/Tests/Server/Services/BillingServicePayInvoiceStates.test.ts +723 -0
  381. package/Tests/Server/Services/BillingServicePaymentMethodReads.test.ts +14 -2
  382. package/Tests/Server/Services/BillingServiceSubscriptionPaymentMethodSync.test.ts +1634 -0
  383. package/Tests/Server/Services/DatabaseServiceAuditRelationDiff.test.ts +492 -0
  384. package/Tests/Server/Services/DatabaseServicePasswordFieldSecrets.test.ts +629 -0
  385. package/Tests/Server/Services/IncidentAlertSloLinkSurvivesEdit.test.ts +431 -0
  386. package/Tests/Server/Services/IncidentAlertSloReferenceGuard.test.ts +358 -0
  387. package/Tests/Server/Services/InventoryItemDisplayName.test.ts +66 -0
  388. package/Tests/Server/Services/MonitorProbeServicePastDueMonitoring.test.ts +362 -0
  389. package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +1460 -1
  390. package/Tests/Server/Services/NetworkDeviceDiagnosticService.test.ts +962 -0
  391. package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +106 -0
  392. package/Tests/Server/Services/NetworkDeviceRuleEngines.test.ts +10 -1
  393. package/Tests/Server/Services/NetworkDeviceServicePastDueMonitoring.test.ts +335 -0
  394. package/Tests/Server/Services/NetworkDeviceSiteRuleDnsName.test.ts +568 -0
  395. package/Tests/Server/Services/OpenTelemetryResourceRetentionMemo.test.ts +28 -1
  396. package/Tests/Server/Services/ProjectDataResidencyPostgres.test.ts +344 -0
  397. package/Tests/Server/Services/ProjectServiceAuditLogSettingsCache.test.ts +187 -0
  398. package/Tests/Server/Services/ProjectServiceDataResidency.test.ts +369 -0
  399. package/Tests/Server/Services/ProjectServiceDataResidencySelfHosted.test.ts +176 -0
  400. package/Tests/Server/Services/ProjectServicePastDueMonitoring.test.ts +289 -0
  401. package/Tests/Server/Services/ResourceFeedServices.test.ts +24 -8
  402. package/Tests/Server/Services/RuleRun/IncidentAlertMaintenanceRuleEnginesRun.test.ts +1396 -0
  403. package/Tests/Server/Services/RuleRun/LabelRuleEnginesGroupARun.test.ts +917 -0
  404. package/Tests/Server/Services/RuleRun/LabelRuleEnginesGroupBRun.test.ts +1262 -0
  405. package/Tests/Server/Services/RuleRun/OwnerRuleEnginesGroupARun.test.ts +902 -0
  406. package/Tests/Server/Services/RuleRun/OwnerRuleEnginesGroupBRun.test.ts +1163 -0
  407. package/Tests/Server/Services/RuleRun/PrivacyRuleEnginesRun.test.ts +843 -0
  408. package/Tests/Server/Services/ScheduledMaintenanceSubscriberTemplateFormats.test.ts +465 -0
  409. package/Tests/Server/Services/SecurityEventConnectionService.test.ts +1754 -0
  410. package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +77 -23
  411. package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleFeedWrites.test.ts +777 -0
  412. package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleOptions.test.ts +1399 -0
  413. package/Tests/Server/Services/ServiceLevelObjectiveBurnRateRuleService.test.ts +67 -74
  414. package/Tests/Server/Services/ServiceLevelObjectiveChildRowTenancy.test.ts +906 -0
  415. package/Tests/Server/Services/ServiceLevelObjectiveDeleteTenancy.test.ts +1029 -0
  416. package/Tests/Server/Services/ServiceLevelObjectiveFeedService.test.ts +313 -0
  417. package/Tests/Server/Services/ServiceLevelObjectiveFeedWrites.test.ts +1214 -0
  418. package/Tests/Server/Services/ServiceLevelObjectiveMarkdownLink.test.ts +289 -0
  419. package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.test.ts +1455 -430
  420. package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleLegacyLabelAdoption.test.ts +634 -0
  421. package/Tests/Server/Services/ServiceLevelObjectiveMonitorRuleService.test.ts +1193 -0
  422. package/Tests/Server/Services/{SloMonitorLabelRuleHooks.test.ts → ServiceLevelObjectiveMonitorRuleTriggers.test.ts} +135 -41
  423. package/Tests/Server/Services/ServiceLevelObjectiveOwnerFeedWrites.test.ts +671 -0
  424. package/Tests/Server/Services/ServiceLevelObjectiveService.test.ts +180 -85
  425. package/Tests/Server/Services/ServiceLevelObjectiveServiceArchive.test.ts +537 -0
  426. package/Tests/Server/Services/ServiceLevelObjectiveServiceLegacyMonitorLabelWrite.test.ts +870 -0
  427. package/Tests/Server/Services/ServiceLevelObjectiveServiceMonitorRuleGuard.test.ts +343 -0
  428. package/Tests/Server/Services/ServiceLevelObjectiveServiceReEvaluation.test.ts +246 -0
  429. package/Tests/Server/Services/SloAffectedResourceCreatedFeed.test.ts +501 -0
  430. package/Tests/Server/Services/SloAffectedResourceLinkContract.test.ts +86 -0
  431. package/Tests/Server/Services/SloAffectedResourceMetricAttributes.test.ts +547 -0
  432. package/Tests/Server/Services/StaticRuleCriteriaRuntimeCoverage.test.ts +10 -4
  433. package/Tests/Server/Services/StatusPageMonitorRuleHooks.test.ts +7 -2
  434. package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateCompile.test.ts +174 -0
  435. package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateServiceVariables.test.ts +40 -0
  436. package/Tests/Server/Services/SubscriberUpdateNotificationHooks.test.ts +541 -0
  437. package/Tests/Server/Services/TelemetryIngestionKeyValidation.test.ts +53 -0
  438. package/Tests/Server/Services/TelemetryResourceFacetCounting.test.ts +218 -0
  439. package/Tests/Server/Services/TelemetryResourceFacetFilters.test.ts +155 -1
  440. package/Tests/Server/Services/TelemetryUsageBillingSloExclusion.test.ts +288 -0
  441. package/Tests/Server/Services/TraceAggregationExceptionScope.test.ts +142 -0
  442. package/Tests/Server/Services/TraceAnalyticsResourceDisplayNames.test.ts +85 -24
  443. package/Tests/Server/TestingUtils/PastDueMonitoringClaimSql.ts +177 -0
  444. package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +51 -10
  445. package/Tests/Server/TestingUtils/__mocks__/Stripe.mock.ts +16 -1
  446. package/Tests/Server/Types/Database/Permissions/ProjectDataResidencyColumn.test.ts +386 -0
  447. package/Tests/Server/Types/Database/Permissions/SecurityRoleAccess.test.ts +34 -11
  448. package/Tests/Server/Utils/AI/InvestigationEvidence.test.ts +1395 -0
  449. package/Tests/Server/Utils/AI/InvestigationReferences.test.ts +616 -0
  450. package/Tests/Server/Utils/AI/SloAffectedResourceAIContext.test.ts +445 -0
  451. package/Tests/Server/Utils/AI/SloTools.test.ts +423 -1
  452. package/Tests/Server/Utils/AI/SloToolsArchive.test.ts +294 -0
  453. package/Tests/Server/Utils/AI/SloToolsRuleReadPermissions.test.ts +297 -0
  454. package/Tests/Server/Utils/AI/TimelineTools.test.ts +119 -0
  455. package/Tests/Server/Utils/AI/Toolbox/AIToolbox.test.ts +151 -0
  456. package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +65 -0
  457. package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorExceptionScope.test.ts +224 -0
  458. package/Tests/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.test.ts +255 -10
  459. package/Tests/Server/Utils/Dashboard/SloTemplatePublicDashboard.test.ts +404 -750
  460. package/Tests/Server/Utils/Database/ProjectScopedReferenceValidator.test.ts +45 -0
  461. package/Tests/Server/Utils/Database/RelationValueUtil.test.ts +157 -0
  462. package/Tests/Server/Utils/Monitor/Criteria/BooleanSeriesEvaluateOverTime.test.ts +260 -0
  463. package/Tests/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.test.ts +181 -0
  464. package/Tests/Server/Utils/Monitor/Criteria/EvaluateOverTime.test.ts +147 -30
  465. package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +55 -2
  466. package/Tests/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.test.ts +17 -0
  467. package/Tests/Server/Utils/Monitor/MonitorStepsProjectValidator.test.ts +136 -0
  468. package/Tests/Server/Utils/Monitor/MonitorStepsProjectValidatorLoadOrder.test.ts +472 -0
  469. package/Tests/Server/Utils/Monitor/NetworkDeviceHydrationUtil.test.ts +48 -2
  470. package/Tests/Server/Utils/Monitor/SloTemplateMetricEmitterContract.test.ts +435 -475
  471. package/Tests/Server/Utils/Rules/MonitorRulePatternValidator.test.ts +77 -0
  472. package/Tests/Server/Utils/Rules/OwnerRuleAssignment.test.ts +177 -0
  473. package/Tests/Server/Utils/Rules/RuleRun/RuleRunPermission.test.ts +365 -0
  474. package/Tests/Server/Utils/Rules/RuleRun/RuleRunRegistry.test.ts +173 -0
  475. package/Tests/Server/Utils/Rules/RuleRun/RuleRunner.test.ts +675 -0
  476. package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +8 -8
  477. package/Tests/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.test.ts +1240 -0
  478. package/Tests/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.test.ts +1853 -0
  479. package/Tests/Server/Utils/SecurityEvent/Connectors/ConnectorFetchSummary.test.ts +261 -0
  480. package/Tests/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.test.ts +1184 -0
  481. package/Tests/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.test.ts +1066 -0
  482. package/Tests/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.test.ts +1568 -0
  483. package/Tests/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.test.ts +930 -0
  484. package/Tests/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.test.ts +1409 -0
  485. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsAuth.test.ts → Connectors/GoogleSecOps/GoogleSecOpsAuth.test.ts} +5 -5
  486. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsClient.test.ts → Connectors/GoogleSecOps/GoogleSecOpsClient.test.ts} +9 -5
  487. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.test.ts +483 -0
  488. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorCuratedAndLateAlerts.test.ts +676 -0
  489. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorFetchEvents.test.ts +1994 -0
  490. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorFixtures.ts +332 -0
  491. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorHttpIntegration.test.ts +680 -0
  492. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorRequestContract.test.ts +1206 -0
  493. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorTestConnection.test.ts +1136 -0
  494. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsCuratedRuleCounts.test.ts +407 -0
  495. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsErrorHandling.test.ts → Connectors/GoogleSecOps/GoogleSecOpsErrorHandling.test.ts} +5 -5
  496. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingAdaptiveCatchUp.test.ts +730 -0
  497. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsClickhouseIntegration.test.ts → Connectors/GoogleSecOps/GoogleSecOpsPollingClickhouseIntegration.test.ts} +130 -35
  498. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingFailureTaxonomy.test.ts +772 -0
  499. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingFixtures.ts +648 -0
  500. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsHttpIntegration.test.ts → Connectors/GoogleSecOps/GoogleSecOpsPollingHttpIntegration.test.ts} +249 -222
  501. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingIntegration.test.ts +1390 -0
  502. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingLoop.test.ts +981 -0
  503. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsPollingNothingImportedRegression.test.ts +290 -0
  504. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsRequestContract.test.ts → Connectors/GoogleSecOps/GoogleSecOpsRequestContract.test.ts} +2 -2
  505. package/Tests/Server/Utils/SecurityEvent/{GoogleSecOpsResponseParsing.test.ts → Connectors/GoogleSecOps/GoogleSecOpsResponseParsing.test.ts} +5 -5
  506. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsSearchDetections.test.ts +763 -0
  507. package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsTesterIntegration.test.ts +421 -0
  508. package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.test.ts +763 -0
  509. package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.test.ts +1296 -0
  510. package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.test.ts +1102 -0
  511. package/Tests/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.test.ts +1174 -0
  512. package/Tests/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.test.ts +1032 -0
  513. package/Tests/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.test.ts +1558 -0
  514. package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.test.ts +4483 -0
  515. package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionRunExecutor.test.ts +1178 -0
  516. package/Tests/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.test.ts +1215 -0
  517. package/Tests/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.test.ts +1068 -0
  518. package/Tests/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.test.ts +1004 -0
  519. package/Tests/Server/Utils/SessionReplay/SessionReplayOriginAllowlist.test.ts +41 -0
  520. package/Tests/Server/Utils/SessionReplay/SessionReplayReadServiceQueries.test.ts +1966 -179
  521. package/Tests/Server/Utils/Slo/SloFeedUtil.test.ts +326 -0
  522. package/Tests/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.test.ts +260 -0
  523. package/Tests/Server/Utils/Slo/SloMetricUtil.test.ts +592 -0
  524. package/Tests/Server/Utils/Slo/SloRecordReferenceValidator.test.ts +311 -0
  525. package/Tests/Server/Utils/StatusPageResource.test.ts +91 -3
  526. package/Tests/Server/Utils/Telemetry/KubernetesResourceAttributes.test.ts +162 -0
  527. package/Tests/Server/Utils/Telemetry/ResourceEntityFilter.test.ts +460 -13
  528. package/Tests/Server/Utils/Telemetry/ResourceFacetPlanner.test.ts +678 -0
  529. package/Tests/Server/Utils/Telemetry/ResourceFacetResolver.test.ts +348 -2
  530. package/Tests/Server/Utils/Telemetry/ServiceDependencyDiscovery.test.ts +525 -0
  531. package/Tests/Server/Utils/Telemetry/TraceContextPropagation.test.ts +420 -0
  532. package/Tests/Types/Billing/SubscriptionStatus.test.ts +176 -0
  533. package/Tests/Types/Billing/SubscriptionStatusPastDueMonitoring.test.ts +187 -0
  534. package/Tests/Types/Dashboard/DashboardTemplateInvariants.test.ts +53 -7
  535. package/Tests/Types/Dashboard/SloDashboardTemplate.test.ts +816 -792
  536. package/Tests/Types/Monitor/CriteriaFilter.test.ts +216 -24
  537. package/Tests/Types/Monitor/MonitorStepDnssecMonitor.test.ts +14 -1
  538. package/Tests/Types/Monitor/MonitorStepDomainMonitor.test.ts +14 -1
  539. package/Tests/Types/Monitor/MonitorStepExternalStatusPageMonitor.test.ts +14 -1
  540. package/Tests/Types/Monitor/MonitorStepRetriesParsing.test.ts +201 -0
  541. package/Tests/Types/Rules/RuleRun.test.ts +315 -0
  542. package/Tests/Types/Rum/SessionReplayApiContracts.test.ts +133 -0
  543. package/Tests/Types/Rum/SessionReplayTransportContracts.test.ts +95 -0
  544. package/Tests/Types/SecurityEvent/Connectors/ConnectorDiagnostics.test.ts +82 -0
  545. package/Tests/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.test.ts +339 -0
  546. package/Tests/Types/StatusPage/SubscriberNotificationTemplateVariables.test.ts +217 -0
  547. package/Tests/Types/StatusPage/SubscriberUpdateNotification.test.ts +200 -0
  548. package/Tests/Types/Telemetry/ExceptionSpanScope.test.ts +89 -0
  549. package/Tests/Types/Telemetry/ResourceEntityFacet.test.ts +96 -0
  550. package/Tests/Types/Telemetry/ResourceFacetCatalog.test.ts +304 -0
  551. package/Tests/UI/Components/ActiveFilterChipsLockedFilters.test.tsx +411 -0
  552. package/Tests/UI/Components/AlertBanner.test.tsx +319 -0
  553. package/Tests/UI/Components/BulkArchiveActionsCopy.test.tsx +310 -0
  554. package/Tests/UI/Components/Card.test.tsx +312 -1
  555. package/Tests/UI/Components/CardModelDetailHeaderLayout.test.tsx +253 -0
  556. package/Tests/UI/Components/CardModelDetailRefresher.test.tsx +342 -0
  557. package/Tests/UI/Components/Checkbox.test.tsx +79 -0
  558. package/Tests/UI/Components/CopyTextButton.test.tsx +142 -0
  559. package/Tests/UI/Components/Detail/DetailIdIsUnique.test.tsx +87 -0
  560. package/Tests/UI/Components/DetailCompactStyle.test.tsx +621 -0
  561. package/Tests/UI/Components/Dropdown/DropdownClearable.test.tsx +393 -0
  562. package/Tests/UI/Components/Dropdown/DropdownMultiSelectChipAccessibleName.test.tsx +64 -0
  563. package/Tests/UI/Components/EmptyState/EmptyState.test.tsx +335 -4
  564. package/Tests/UI/Components/EmptyState/EmptyStateGuideLinks.test.tsx +337 -0
  565. package/Tests/UI/Components/ErrorBoundary.test.tsx +60 -0
  566. package/Tests/UI/Components/FacetSections.test.tsx +581 -0
  567. package/Tests/UI/Components/FacetSidebarControls.test.tsx +812 -0
  568. package/Tests/UI/Components/FacetVisibility.test.ts +429 -0
  569. package/Tests/UI/Components/Forms/ModelFormJsonColumns.test.tsx +21 -20
  570. package/Tests/UI/Components/LabelRuleImportExport.test.tsx +15 -2
  571. package/Tests/UI/Components/LockedFilterChip.test.tsx +788 -0
  572. package/Tests/UI/Components/LogsEntityNames.test.ts +1769 -0
  573. package/Tests/UI/Components/LogsEntityNamesComponents.test.tsx +696 -0
  574. package/Tests/UI/Components/LogsFacetSidebarHiddenFacets.test.tsx +600 -0
  575. package/Tests/UI/Components/LogsViewerEntityNames.test.tsx +713 -0
  576. package/Tests/UI/Components/MarkdownInlineReferences.test.tsx +2079 -0
  577. package/Tests/UI/Components/MemberRoleAssignment.test.tsx +446 -0
  578. package/Tests/UI/Components/ModelDetailRefetch.test.tsx +397 -0
  579. package/Tests/UI/Components/ModelListRefetch.test.tsx +233 -0
  580. package/Tests/UI/Components/ModelPageModelChange.test.tsx +409 -0
  581. package/Tests/UI/Components/MoreMenu.test.tsx +133 -0
  582. package/Tests/UI/Components/MoreMenuMotion.test.tsx +84 -3
  583. package/Tests/UI/Components/PaginationIntegration.test.tsx +25 -0
  584. package/Tests/UI/Components/ResourceFacetConfigs.test.ts +172 -0
  585. package/Tests/UI/Components/RuleCriteria/RuleCriteriaModelTable.test.tsx +3 -3
  586. package/Tests/UI/Components/RuleRun/RuleDetailFields.test.tsx +336 -0
  587. package/Tests/UI/Components/RuleRun/RuleTable.test.tsx +304 -0
  588. package/Tests/UI/Components/RuleRun/RunRuleNowModal.test.tsx +231 -0
  589. package/Tests/UI/Components/RuleRun/RunRulesBulkAction.test.ts +213 -0
  590. package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +32 -14
  591. package/Tests/UI/Components/TableSortAndMobileColumns.test.tsx +44 -1
  592. package/Tests/UI/Components/TelemetryActiveFilterChipsLockedFilters.test.tsx +367 -0
  593. package/Tests/UI/Components/TelemetryFacetSidebarHiddenFacets.test.tsx +718 -0
  594. package/Tests/UI/Monitor/EvaluationLogList.test.tsx +303 -0
  595. package/Tests/UI/Monitor/MonitorSummarySnapshotRender.test.tsx +55 -1
  596. package/Tests/UI/Rum/FidelityNotices.test.ts +22 -0
  597. package/Tests/UI/Rum/RecordingHealthCard.test.tsx +120 -136
  598. package/Tests/UI/Rum/RecordingHealthDashboard.test.tsx +988 -0
  599. package/Tests/UI/Rum/ReplayCard.test.tsx +32 -0
  600. package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +709 -12
  601. package/Tests/UI/Rum/ReplayEngine.test.ts +154 -0
  602. package/Tests/UI/Rum/ReplayHeader.test.tsx +284 -124
  603. package/Tests/UI/Rum/ReplayPinControl.test.tsx +189 -10
  604. package/Tests/UI/Rum/ReplayPlayerChrome.test.tsx +286 -12
  605. package/Tests/UI/Rum/ReplayRail.test.tsx +294 -0
  606. package/Tests/UI/Rum/ReplayScrubber.test.tsx +213 -1
  607. package/Tests/UI/Rum/ReplayStage.test.tsx +1228 -173
  608. package/Tests/UI/Rum/ReplayStageOverlays.test.tsx +433 -3
  609. package/Tests/UI/Rum/ReplayTabSwitcher.test.tsx +1391 -0
  610. package/Tests/UI/Rum/ReplayTimeline.test.tsx +222 -0
  611. package/Tests/UI/Rum/ReplayUi.test.tsx +189 -2
  612. package/Tests/UI/Rum/ReplayUserSessionsMenu.test.tsx +91 -0
  613. package/Tests/UI/Rum/SessionReplayEmptyState.test.tsx +1 -1
  614. package/Tests/UI/Rum/SessionReplaySettingsPolicyLoading.test.tsx +585 -0
  615. package/Tests/UI/Rum/SessionReplayTable.test.tsx +844 -51
  616. package/Tests/UI/Rum/SessionReplayUsersTable.test.tsx +29 -1
  617. package/Tests/UI/Telemetry/TelemetryDetailPanel.test.tsx +288 -0
  618. package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +31 -1
  619. package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +6 -0
  620. package/Tests/UI/Utils/Clipboard.test.ts +154 -0
  621. package/Tests/UI/Utils/DashboardStackingLayers.test.ts +8 -1
  622. package/Tests/UI/Utils/Navigation.test.ts +24 -0
  623. package/Tests/UI/Utils/RuleRunClient.test.ts +303 -0
  624. package/Tests/UI/Utils/Telemetry/TelemetryEntityNames.test.ts +2206 -0
  625. package/Tests/UI/Utils/Telemetry/UseTelemetryEntityNames.test.tsx +844 -0
  626. package/Tests/Utils/AI/InvestigationReport.test.ts +2430 -0
  627. package/Tests/Utils/APIOutgoingRequestTracer.test.ts +137 -0
  628. package/Tests/Utils/Dashboard/Components/DashboardComponentDefaults.test.ts +2 -0
  629. package/Tests/Utils/Dashboard/Components/DashboardSloListComponent.test.ts +206 -0
  630. package/Tests/Utils/Dashboard/DashboardSloComponent.test.ts +36 -2
  631. package/Tests/Utils/Dashboard/SloTemplateVariableScoping.test.ts +409 -588
  632. package/Tests/Utils/Dashboard/SloWidgetSource.test.ts +351 -0
  633. package/Tests/Utils/Markdown/MarkdownEscape.test.ts +361 -0
  634. package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +1425 -118
  635. package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +188 -3
  636. package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +661 -13
  637. package/Tests/Utils/NetworkDiscovery/NetbiosNameUtil.test.ts +349 -0
  638. package/Tests/Utils/NetworkDiscovery/RunImportedDeviceNaming.test.ts +656 -0
  639. package/Tests/Utils/NetworkDiscovery/ShortDeviceNamePlanner.test.ts +1020 -0
  640. package/Tests/Utils/NetworkDiscovery/ShortHostnameUtil.test.ts +619 -0
  641. package/Tests/Utils/NetworkSite/CidrMatchUtil.test.ts +317 -0
  642. package/Tests/Utils/Project/DataResidency.test.ts +198 -0
  643. package/Tests/Utils/Rules/RuleRunSummary.test.ts +394 -0
  644. package/Tests/Utils/Rum/SessionReplayHealthDiagnosis.test.ts +40 -0
  645. package/Tests/Utils/Rum/SessionReplayRecordingEnded.test.ts +619 -0
  646. package/Tests/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.test.ts +631 -0
  647. package/Tests/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.test.ts +479 -0
  648. package/Tests/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.test.ts +507 -0
  649. package/Tests/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.test.ts +686 -0
  650. package/Tests/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.test.ts +474 -0
  651. package/Tests/Utils/SecurityEvent/Connectors/OktaNormalizer.test.ts +736 -0
  652. package/Tests/Utils/SecurityEvent/Connectors/SplunkNormalizer.test.ts +407 -0
  653. package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +129 -0
  654. package/Tests/Utils/Slo/SloAffectedResourceMarkdown.test.ts +302 -0
  655. package/Tests/Utils/Slo/SloBurnRateTemplate.test.ts +468 -0
  656. package/Tests/Utils/Slo/SloEvaluation.test.ts +20 -4
  657. package/Tests/Utils/Slo/SloFeedMarkdown.test.ts +1185 -0
  658. package/Tests/Utils/Slo/SloHealth.test.ts +262 -0
  659. package/Tests/Utils/Slo/SloHistoryMetricName.test.ts +102 -0
  660. package/Tests/Utils/Slo/SloListWidgetFormat.test.ts +522 -0
  661. package/Tests/Utils/Slo/SloMetricType.test.ts +355 -0
  662. package/Tests/Utils/Slo/SloMonitorRuleCriteria.test.ts +387 -0
  663. package/Tests/Utils/Slo/SloMonitorStatusSummary.test.ts +210 -0
  664. package/Tests/Utils/Slo/SloOverviewText.test.ts +226 -0
  665. package/Tests/Utils/Slo/SloProjection.test.ts +1039 -0
  666. package/Tests/Utils/Slo/SloWidgetFormat.test.ts +47 -0
  667. package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +57 -1
  668. package/Tests/Utils/Telemetry/EntityRelationship.test.ts +36 -0
  669. package/Tests/Utils/Telemetry/LockedFilterSearch.test.ts +521 -0
  670. package/Tests/Utils/Telemetry/NetworkHost.test.ts +48 -0
  671. package/Tests/Utils/Telemetry/OriginAllowList.test.ts +154 -0
  672. package/Tests/Utils/Traces/CriticalPath.test.ts +25 -0
  673. package/Types/AI/AIChatTypes.ts +8 -0
  674. package/Types/AI/InvestigationEvidence.ts +96 -0
  675. package/Types/BaseDatabase/EnableAuditLogOn.ts +41 -0
  676. package/Types/Billing/SubscriptionStatus.ts +39 -4
  677. package/Types/Dashboard/DashboardComponentType.ts +1 -0
  678. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +5 -0
  679. package/Types/Dashboard/DashboardComponents/DashboardSloComponent.ts +10 -0
  680. package/Types/Dashboard/DashboardComponents/DashboardSloListComponent.ts +29 -0
  681. package/Types/Dashboard/DashboardTemplates.ts +290 -297
  682. package/Types/Database/EnableAuditLog.ts +23 -1
  683. package/Types/Email/EmailTemplateType.ts +4 -0
  684. package/Types/Monitor/CriteriaFilter.ts +55 -8
  685. package/Types/Monitor/MonitorEvaluationSummary.ts +5 -0
  686. package/Types/Monitor/MonitorStep.ts +5 -2
  687. package/Types/Monitor/MonitorStepDnsMonitor.ts +3 -1
  688. package/Types/Monitor/MonitorStepDnssecMonitor.ts +3 -1
  689. package/Types/Monitor/MonitorStepDomainMonitor.ts +3 -1
  690. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.ts +3 -1
  691. package/Types/Monitor/MonitorStepRetries.ts +59 -0
  692. package/Types/Monitor/MonitorStepSnmpMonitor.ts +9 -2
  693. package/Types/NetworkDevice/NetworkDeviceDiagnosticResult.ts +104 -0
  694. package/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.ts +47 -0
  695. package/Types/NetworkDevice/NetworkDeviceDiagnosticType.ts +47 -0
  696. package/Types/NetworkDevice/NetworkDevicePingMetricNames.ts +20 -0
  697. package/Types/Permission.ts +129 -2
  698. package/Types/Rules/RuleCriteriaFieldRegistry.ts +5 -0
  699. package/Types/Rules/RuleRun.ts +518 -0
  700. package/Types/Rum/SessionReplay.ts +109 -0
  701. package/Types/Rum/SessionReplayApi.ts +49 -0
  702. package/Types/SecurityEvent/Connectors/ConnectorDiagnostics.ts +117 -0
  703. package/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.ts +113 -0
  704. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.ts +599 -0
  705. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.ts +45 -0
  706. package/Types/SecurityEvent/GoogleSecOpsRegion.ts +34 -0
  707. package/Types/ServiceLevelObjective/SloHistoryMetricName.ts +25 -0
  708. package/Types/ServiceLevelObjective/SloMetricType.ts +49 -0
  709. package/Types/StatusPage/StatusPageSubscriberNotificationEventType.ts +4 -0
  710. package/Types/StatusPage/SubscriberNotificationTemplateVariables.ts +331 -0
  711. package/Types/StatusPage/SubscriberNotificationTrigger.ts +12 -0
  712. package/Types/StatusPage/SubscriberUpdateNotification.ts +89 -0
  713. package/Types/Telemetry/EntityType.ts +14 -0
  714. package/Types/Telemetry/ExceptionSpanScope.ts +83 -0
  715. package/Types/Telemetry/LockedFilterDetail.ts +25 -0
  716. package/Types/Telemetry/ResourceEntityFacet.ts +17 -10
  717. package/Types/Telemetry/ResourceFacetCatalog.ts +171 -0
  718. package/Types/Telemetry/ServiceType.ts +7 -0
  719. package/Typings/Index.d.ts +53 -3
  720. package/UI/Components/AlertBanner/AlertBanner.tsx +85 -27
  721. package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +21 -2
  722. package/UI/Components/Card/Card.tsx +118 -83
  723. package/UI/Components/Checkbox/Checkbox.tsx +8 -5
  724. package/UI/Components/CopyTextButton/CopyTextButton.tsx +7 -1
  725. package/UI/Components/CustomFields/CustomFieldsDetail.tsx +4 -1
  726. package/UI/Components/Detail/Detail.tsx +145 -23
  727. package/UI/Components/Dropdown/Dropdown.tsx +64 -1
  728. package/UI/Components/EmptyState/EmptyState.tsx +27 -3
  729. package/UI/Components/EmptyState/EmptyStateGuideLinks.tsx +124 -0
  730. package/UI/Components/ErrorBoundary.tsx +38 -0
  731. package/UI/Components/Forms/ModelForm.tsx +6 -5
  732. package/UI/Components/LabelRule/LabelRuleTable.tsx +8 -2
  733. package/UI/Components/LogsViewer/LogsEntityNames.ts +912 -0
  734. package/UI/Components/LogsViewer/LogsViewer.tsx +152 -77
  735. package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +17 -11
  736. package/UI/Components/LogsViewer/components/FacetSection.tsx +66 -79
  737. package/UI/Components/LogsViewer/components/FacetValueRow.tsx +17 -2
  738. package/UI/Components/LogsViewer/components/LogDetailsPanel.tsx +45 -5
  739. package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +100 -19
  740. package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +156 -39
  741. package/UI/Components/LogsViewer/components/LogsTable.tsx +30 -8
  742. package/UI/Components/LogsViewer/types.ts +6 -0
  743. package/UI/Components/Markdown.tsx/InlineReferences.tsx +628 -0
  744. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +385 -312
  745. package/UI/Components/MemberRoleAssignment/MemberRoleAssignment.tsx +50 -22
  746. package/UI/Components/ModelDetail/CardModelDetail.tsx +15 -0
  747. package/UI/Components/ModelDetail/ModelDetail.tsx +64 -19
  748. package/UI/Components/ModelList/ModelList.tsx +33 -8
  749. package/UI/Components/MoreMenu/MoreMenu.tsx +14 -3
  750. package/UI/Components/Page/ModelPage.tsx +119 -54
  751. package/UI/Components/RuleRun/RuleDetailFields.tsx +359 -0
  752. package/UI/Components/RuleRun/RuleTable.tsx +183 -0
  753. package/UI/Components/RuleRun/RuleView.tsx +170 -0
  754. package/UI/Components/RuleRun/RunRuleNowModal.tsx +147 -0
  755. package/UI/Components/RuleRun/RunRulesBulkAction.ts +103 -0
  756. package/UI/Components/Table/Table.tsx +8 -0
  757. package/UI/Components/Table/TableRow.tsx +13 -5
  758. package/UI/Components/TelemetryViewer/FacetVisibility.ts +229 -0
  759. package/UI/Components/TelemetryViewer/ResourceFacetConfigs.ts +46 -0
  760. package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +7 -0
  761. package/UI/Components/TelemetryViewer/components/FacetSearchInput.tsx +79 -0
  762. package/UI/Components/TelemetryViewer/components/FacetSectionHeader.tsx +69 -0
  763. package/UI/Components/TelemetryViewer/components/FacetShowMoreButton.tsx +36 -0
  764. package/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.tsx +88 -0
  765. package/UI/Components/TelemetryViewer/components/LockedFilterChip.tsx +430 -0
  766. package/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.tsx +14 -10
  767. package/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.tsx +203 -10
  768. package/UI/Components/TelemetryViewer/components/TelemetryFacetSection.tsx +60 -73
  769. package/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.tsx +94 -7
  770. package/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.tsx +17 -2
  771. package/UI/Components/TelemetryViewer/types.ts +19 -0
  772. package/UI/Components/TelemetryViewer/useFacetSearchExemptions.ts +158 -0
  773. package/UI/Components/TelemetryViewer/useFacetSectionSearch.ts +102 -0
  774. package/UI/Utils/Clipboard.ts +68 -2
  775. package/UI/Utils/Navigation.ts +17 -2
  776. package/UI/Utils/Rules/RuleRunClient.ts +178 -0
  777. package/UI/Utils/Telemetry/TelemetryEntityNames.ts +628 -0
  778. package/UI/Utils/Telemetry/UseTelemetryEntityNames.ts +151 -0
  779. package/Utils/AI/InvestigationReport.ts +1789 -0
  780. package/Utils/API.ts +90 -1
  781. package/Utils/Dashboard/Components/DashboardSloComponent.ts +19 -2
  782. package/Utils/Dashboard/Components/DashboardSloListComponent.ts +126 -0
  783. package/Utils/Dashboard/Components/Index.ts +7 -0
  784. package/Utils/Dashboard/SloWidgetSource.ts +188 -0
  785. package/Utils/Markdown/MarkdownEscape.ts +63 -0
  786. package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +161 -36
  787. package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +25 -0
  788. package/Utils/NetworkDiscovery/NetbiosNameUtil.ts +146 -0
  789. package/Utils/NetworkDiscovery/RunImportedDeviceNaming.ts +390 -0
  790. package/Utils/NetworkDiscovery/ShortDeviceNamePlanner.ts +291 -0
  791. package/Utils/NetworkDiscovery/ShortHostnameUtil.ts +91 -0
  792. package/Utils/NetworkSite/CidrMatchUtil.ts +37 -12
  793. package/Utils/Project/DataResidency.ts +63 -0
  794. package/Utils/Rules/RuleRunSummary.ts +323 -0
  795. package/Utils/Rum/SessionReplayHealth.ts +11 -0
  796. package/Utils/Rum/SessionReplayRecordingEnded.ts +134 -0
  797. package/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.ts +427 -0
  798. package/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.ts +197 -0
  799. package/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.ts +464 -0
  800. package/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.ts +567 -0
  801. package/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.ts +299 -0
  802. package/Utils/SecurityEvent/Connectors/OktaNormalizer.ts +467 -0
  803. package/Utils/SecurityEvent/Connectors/SplunkNormalizer.ts +439 -0
  804. package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +124 -12
  805. package/Utils/Slo/SloAffectedResourceMarkdown.ts +123 -0
  806. package/Utils/Slo/SloBurnRateTemplate.ts +373 -0
  807. package/Utils/Slo/SloFeedMarkdown.ts +1507 -0
  808. package/Utils/Slo/SloHealth.ts +96 -9
  809. package/Utils/Slo/SloListWidgetFormat.ts +370 -0
  810. package/Utils/Slo/SloMetricType.ts +237 -0
  811. package/Utils/Slo/SloMonitorRuleCriteria.ts +364 -0
  812. package/Utils/Slo/SloMonitorStatusSummary.ts +210 -0
  813. package/Utils/Slo/SloOverviewText.ts +265 -0
  814. package/Utils/Slo/SloProjection.ts +967 -0
  815. package/Utils/Slo/SloWidgetFormat.ts +12 -2
  816. package/Utils/Telemetry/CrossSignalScope.ts +22 -8
  817. package/Utils/Telemetry/EntityRelationship.ts +8 -0
  818. package/Utils/Telemetry/LockedFilterSearch.ts +366 -0
  819. package/Utils/Telemetry/NetworkHost.ts +43 -0
  820. package/Utils/Telemetry/OriginAllowList.ts +139 -4
  821. package/Utils/Traces/CriticalPath.ts +10 -4
  822. package/build/dist/Models/AnalyticsModels/AuditLog.js +70 -1
  823. package/build/dist/Models/AnalyticsModels/AuditLog.js.map +1 -1
  824. package/build/dist/Models/AnalyticsModels/SecurityEvent.js +4 -4
  825. package/build/dist/Models/DatabaseModels/Alert.js +60 -0
  826. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  827. package/build/dist/Models/DatabaseModels/GlobalConfig.js +1 -1
  828. package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
  829. package/build/dist/Models/DatabaseModels/Incident.js +64 -0
  830. package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
  831. package/build/dist/Models/DatabaseModels/IncidentEpisodePublicNote.js +75 -0
  832. package/build/dist/Models/DatabaseModels/IncidentEpisodePublicNote.js.map +1 -1
  833. package/build/dist/Models/DatabaseModels/IncidentPublicNote.js +75 -0
  834. package/build/dist/Models/DatabaseModels/IncidentPublicNote.js.map +1 -1
  835. package/build/dist/Models/DatabaseModels/Index.js +10 -4
  836. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  837. package/build/dist/Models/DatabaseModels/NetworkDevice.js +68 -0
  838. package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
  839. package/build/dist/Models/DatabaseModels/NetworkDeviceDiagnostic.js +772 -0
  840. package/build/dist/Models/DatabaseModels/NetworkDeviceDiagnostic.js.map +1 -0
  841. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +140 -0
  842. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
  843. package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js +1 -1
  844. package/build/dist/Models/DatabaseModels/NetworkSiteAssignmentRule.js.map +1 -1
  845. package/build/dist/Models/DatabaseModels/Project.js +42 -0
  846. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  847. package/build/dist/Models/DatabaseModels/RumApplication.js +1 -1
  848. package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
  849. package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +75 -0
  850. package/build/dist/Models/DatabaseModels/ScheduledMaintenancePublicNote.js.map +1 -1
  851. package/build/dist/Models/DatabaseModels/{GoogleSecOpsConnection.js → SecurityEventConnection.js} +87 -75
  852. package/build/dist/Models/DatabaseModels/SecurityEventConnection.js.map +1 -0
  853. package/build/dist/Models/DatabaseModels/{GoogleSecOpsConnectionRun.js → SecurityEventConnectionRun.js} +37 -37
  854. package/build/dist/Models/DatabaseModels/SecurityEventConnectionRun.js.map +1 -0
  855. package/build/dist/Models/DatabaseModels/ServiceLevelObjective.js +192 -10
  856. package/build/dist/Models/DatabaseModels/ServiceLevelObjective.js.map +1 -1
  857. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +798 -96
  858. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js.map +1 -1
  859. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveFeed.js +596 -0
  860. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveFeed.js.map +1 -0
  861. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.js +590 -0
  862. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveMonitorRule.js.map +1 -0
  863. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.js +16 -0
  864. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerTeam.js.map +1 -1
  865. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.js +16 -0
  866. package/build/dist/Models/DatabaseModels/ServiceLevelObjectiveOwnerUser.js.map +1 -1
  867. package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js +75 -0
  868. package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js.map +1 -1
  869. package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js +2 -2
  870. package/build/dist/Models/DatabaseModels/TelemetryIngestionKey.js.map +1 -1
  871. package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +1 -1
  872. package/build/dist/Server/API/AIInvestigationAPI.js +336 -27
  873. package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
  874. package/build/dist/Server/API/BaseAPI.js +14 -0
  875. package/build/dist/Server/API/BaseAPI.js.map +1 -1
  876. package/build/dist/Server/API/BillingInvoiceAPI.js +233 -19
  877. package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
  878. package/build/dist/Server/API/BillingPaymentMethodAPI.js +86 -5
  879. package/build/dist/Server/API/BillingPaymentMethodAPI.js.map +1 -1
  880. package/build/dist/Server/API/DashboardAPI.js +72 -2
  881. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  882. package/build/dist/Server/API/SecurityEventConnectionAPI.js +263 -0
  883. package/build/dist/Server/API/SecurityEventConnectionAPI.js.map +1 -0
  884. package/build/dist/Server/API/StatusPageAPI.js +236 -154
  885. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  886. package/build/dist/Server/API/TelemetryAPI.js +248 -170
  887. package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
  888. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.js +40 -0
  889. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792700000000-AddSecurityEventConnections.js.map +1 -0
  890. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.js +34 -0
  891. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792800000000-AddNetworkDeviceDiagnostic.js.map +1 -0
  892. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.js +24 -0
  893. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1792900000000-AddNetworkDeviceDnsNameAndShortDeviceNames.js.map +1 -0
  894. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.js +21 -0
  895. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793000000000-AddNetbiosLookupToNetworkDeviceDiscoveryScan.js.map +1 -0
  896. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.js +207 -0
  897. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793100000000-SloProductOverhaul.js.map +1 -0
  898. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.js +72 -0
  899. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793200000000-BackfillSloMonitorRulesAndAffectedResources.js.map +1 -0
  900. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.js +20 -0
  901. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793300000000-AddDataResidencyToProject.js.map +1 -0
  902. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.js +46 -0
  903. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1793400000000-AddSubscriberUpdateNotificationStatus.js.map +1 -0
  904. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
  905. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  906. package/build/dist/Server/Middleware/TelemetryIngest.js +57 -4
  907. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  908. package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js +112 -56
  909. package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js.map +1 -1
  910. package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js +167 -68
  911. package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js.map +1 -1
  912. package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js +87 -26
  913. package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js.map +1 -1
  914. package/build/dist/Server/Services/AlertLabelRuleEngineService.js +270 -203
  915. package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
  916. package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +498 -354
  917. package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
  918. package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js +97 -34
  919. package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js.map +1 -1
  920. package/build/dist/Server/Services/AlertService.js +91 -8
  921. package/build/dist/Server/Services/AlertService.js.map +1 -1
  922. package/build/dist/Server/Services/AuditLogService.js +408 -44
  923. package/build/dist/Server/Services/AuditLogService.js.map +1 -1
  924. package/build/dist/Server/Services/BillingInvoiceService.js +94 -85
  925. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  926. package/build/dist/Server/Services/BillingService.js +406 -14
  927. package/build/dist/Server/Services/BillingService.js.map +1 -1
  928. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +141 -92
  929. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
  930. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +189 -101
  931. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
  932. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +135 -86
  933. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
  934. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +189 -100
  935. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
  936. package/build/dist/Server/Services/DashboardLabelRuleEngineService.js +117 -69
  937. package/build/dist/Server/Services/DashboardLabelRuleEngineService.js.map +1 -1
  938. package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js +171 -83
  939. package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js.map +1 -1
  940. package/build/dist/Server/Services/DatabaseService.js +125 -18
  941. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  942. package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +141 -92
  943. package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
  944. package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +189 -101
  945. package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
  946. package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +145 -91
  947. package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
  948. package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +191 -101
  949. package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
  950. package/build/dist/Server/Services/ExceptionAggregationService.js +7 -16
  951. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  952. package/build/dist/Server/Services/HostLabelRuleEngineService.js +141 -92
  953. package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
  954. package/build/dist/Server/Services/HostOwnerRuleEngineService.js +190 -102
  955. package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
  956. package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js +112 -56
  957. package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js.map +1 -1
  958. package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js +220 -63
  959. package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js.map +1 -1
  960. package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js +87 -26
  961. package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js.map +1 -1
  962. package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js +24 -0
  963. package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js.map +1 -1
  964. package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +258 -192
  965. package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
  966. package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +519 -376
  967. package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
  968. package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js +95 -32
  969. package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js.map +1 -1
  970. package/build/dist/Server/Services/IncidentPublicNoteService.js +24 -0
  971. package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
  972. package/build/dist/Server/Services/IncidentService.js +90 -5
  973. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  974. package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js +113 -65
  975. package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js.map +1 -1
  976. package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js +171 -83
  977. package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js.map +1 -1
  978. package/build/dist/Server/Services/Index.js +10 -4
  979. package/build/dist/Server/Services/Index.js.map +1 -1
  980. package/build/dist/Server/Services/InventoryItemService.js +22 -0
  981. package/build/dist/Server/Services/InventoryItemService.js.map +1 -1
  982. package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js +117 -69
  983. package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -1
  984. package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +171 -83
  985. package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -1
  986. package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +145 -91
  987. package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
  988. package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +191 -101
  989. package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
  990. package/build/dist/Server/Services/LabelService.js +20 -25
  991. package/build/dist/Server/Services/LabelService.js.map +1 -1
  992. package/build/dist/Server/Services/LogAggregationService.js +8 -17
  993. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  994. package/build/dist/Server/Services/MetricAggregationService.js +4 -14
  995. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  996. package/build/dist/Server/Services/MonitorLabelRuleEngineService.js +123 -77
  997. package/build/dist/Server/Services/MonitorLabelRuleEngineService.js.map +1 -1
  998. package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js +167 -82
  999. package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js.map +1 -1
  1000. package/build/dist/Server/Services/MonitorProbeService.js +18 -2
  1001. package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
  1002. package/build/dist/Server/Services/MonitorService.js +11 -9
  1003. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  1004. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +287 -5
  1005. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
  1006. package/build/dist/Server/Services/NetworkDeviceDiagnosticService.js +333 -0
  1007. package/build/dist/Server/Services/NetworkDeviceDiagnosticService.js.map +1 -0
  1008. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +117 -69
  1009. package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -1
  1010. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +171 -83
  1011. package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -1
  1012. package/build/dist/Server/Services/NetworkDeviceService.js +36 -2
  1013. package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
  1014. package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js +117 -64
  1015. package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js.map +1 -1
  1016. package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js +173 -83
  1017. package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js.map +1 -1
  1018. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js +116 -65
  1019. package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js.map +1 -1
  1020. package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js +171 -83
  1021. package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js.map +1 -1
  1022. package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +141 -92
  1023. package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
  1024. package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +189 -101
  1025. package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
  1026. package/build/dist/Server/Services/ProjectService.js +82 -10
  1027. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  1028. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +141 -92
  1029. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
  1030. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +189 -101
  1031. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
  1032. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +111 -63
  1033. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -1
  1034. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +161 -77
  1035. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -1
  1036. package/build/dist/Server/Services/RunbookLabelRuleEngineService.js +117 -69
  1037. package/build/dist/Server/Services/RunbookLabelRuleEngineService.js.map +1 -1
  1038. package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js +171 -83
  1039. package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js.map +1 -1
  1040. package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +280 -209
  1041. package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
  1042. package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +521 -376
  1043. package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
  1044. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +24 -0
  1045. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
  1046. package/build/dist/Server/Services/ScheduledMaintenanceService.js +24 -8
  1047. package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
  1048. package/build/dist/Server/Services/{GoogleSecOpsConnectionRunService.js → SecurityEventConnectionRunService.js} +2 -2
  1049. package/build/dist/Server/Services/SecurityEventConnectionRunService.js.map +1 -0
  1050. package/build/dist/Server/Services/SecurityEventConnectionService.js +396 -0
  1051. package/build/dist/Server/Services/SecurityEventConnectionService.js.map +1 -0
  1052. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +115 -62
  1053. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -1
  1054. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +163 -77
  1055. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -1
  1056. package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +141 -92
  1057. package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
  1058. package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js +769 -18
  1059. package/build/dist/Server/Services/ServiceLevelObjectiveBurnRateRuleService.js.map +1 -1
  1060. package/build/dist/Server/Services/ServiceLevelObjectiveFeedService.js +96 -0
  1061. package/build/dist/Server/Services/ServiceLevelObjectiveFeedService.js.map +1 -0
  1062. package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.js +614 -87
  1063. package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleEngineService.js.map +1 -1
  1064. package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleService.js +844 -0
  1065. package/build/dist/Server/Services/ServiceLevelObjectiveMonitorRuleService.js.map +1 -0
  1066. package/build/dist/Server/Services/ServiceLevelObjectiveOwnerTeamService.js +207 -1
  1067. package/build/dist/Server/Services/ServiceLevelObjectiveOwnerTeamService.js.map +1 -1
  1068. package/build/dist/Server/Services/ServiceLevelObjectiveOwnerUserService.js +221 -1
  1069. package/build/dist/Server/Services/ServiceLevelObjectiveOwnerUserService.js.map +1 -1
  1070. package/build/dist/Server/Services/ServiceLevelObjectiveService.js +997 -50
  1071. package/build/dist/Server/Services/ServiceLevelObjectiveService.js.map +1 -1
  1072. package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +191 -102
  1073. package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
  1074. package/build/dist/Server/Services/StatusPageAnnouncementService.js +12 -0
  1075. package/build/dist/Server/Services/StatusPageAnnouncementService.js.map +1 -1
  1076. package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js +118 -70
  1077. package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js.map +1 -1
  1078. package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js +158 -76
  1079. package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js.map +1 -1
  1080. package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js +19 -215
  1081. package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js.map +1 -1
  1082. package/build/dist/Server/Services/StatusPageSubscriberService.js +6 -0
  1083. package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
  1084. package/build/dist/Server/Services/TelemetryUsageBillingService.js +27 -5
  1085. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  1086. package/build/dist/Server/Services/ThreatIntelFeedService.js +1 -1
  1087. package/build/dist/Server/Services/TraceAggregationService.js +51 -25
  1088. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  1089. package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js +141 -92
  1090. package/build/dist/Server/Services/VMwareVCenterLabelRuleEngineService.js.map +1 -1
  1091. package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js +189 -101
  1092. package/build/dist/Server/Services/VMwareVCenterOwnerRuleEngineService.js.map +1 -1
  1093. package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js +117 -69
  1094. package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js.map +1 -1
  1095. package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js +171 -83
  1096. package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js.map +1 -1
  1097. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -0
  1098. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
  1099. package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js +17 -0
  1100. package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js.map +1 -1
  1101. package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +3 -0
  1102. package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -1
  1103. package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js +31 -0
  1104. package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js.map +1 -1
  1105. package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +14 -7
  1106. package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
  1107. package/build/dist/Server/Utils/AI/SRE/InvestigationEvidence.js +468 -0
  1108. package/build/dist/Server/Utils/AI/SRE/InvestigationEvidence.js.map +1 -0
  1109. package/build/dist/Server/Utils/AI/SRE/InvestigationReferences.js +230 -0
  1110. package/build/dist/Server/Utils/AI/SRE/InvestigationReferences.js.map +1 -0
  1111. package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +24 -1
  1112. package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -1
  1113. package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js +21 -1
  1114. package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js.map +1 -1
  1115. package/build/dist/Server/Utils/AI/Toolbox/Index.js +32 -0
  1116. package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
  1117. package/build/dist/Server/Utils/AI/Toolbox/SloTools.js +337 -53
  1118. package/build/dist/Server/Utils/AI/Toolbox/SloTools.js.map +1 -1
  1119. package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js +6 -2
  1120. package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js.map +1 -1
  1121. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +59 -0
  1122. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  1123. package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js +108 -15
  1124. package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js.map +1 -1
  1125. package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js +2 -2
  1126. package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js.map +1 -1
  1127. package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js +115 -6
  1128. package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js.map +1 -1
  1129. package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +13 -0
  1130. package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -1
  1131. package/build/dist/Server/Utils/Database/RelationValueUtil.js +82 -0
  1132. package/build/dist/Server/Utils/Database/RelationValueUtil.js.map +1 -0
  1133. package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js +10 -6
  1134. package/build/dist/Server/Utils/Monitor/Criteria/CompareCriteria.js.map +1 -1
  1135. package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +17 -21
  1136. package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
  1137. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +5 -3
  1138. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  1139. package/build/dist/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.js +5 -4
  1140. package/build/dist/Server/Utils/Monitor/MonitorCriteriaExpectationBuilder.js.map +1 -1
  1141. package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js +50 -10
  1142. package/build/dist/Server/Utils/Monitor/MonitorStepsProjectValidator.js.map +1 -1
  1143. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +13 -1
  1144. package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
  1145. package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +6 -10
  1146. package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
  1147. package/build/dist/Server/Utils/Rules/MonitorRulePatternValidator.js +34 -0
  1148. package/build/dist/Server/Utils/Rules/MonitorRulePatternValidator.js.map +1 -0
  1149. package/build/dist/Server/Utils/Rules/OwnerRuleAssignment.js +69 -0
  1150. package/build/dist/Server/Utils/Rules/OwnerRuleAssignment.js.map +1 -0
  1151. package/build/dist/Server/Utils/Rules/RuleRun/RuleApplication.js +25 -0
  1152. package/build/dist/Server/Utils/Rules/RuleRun/RuleApplication.js.map +1 -0
  1153. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunPermission.js +128 -0
  1154. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunPermission.js.map +1 -0
  1155. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js +746 -0
  1156. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunRegistry.js.map +1 -0
  1157. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunner.js +221 -0
  1158. package/build/dist/Server/Utils/Rules/RuleRun/RuleRunner.js.map +1 -0
  1159. package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +3 -2
  1160. package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -1
  1161. package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.js +752 -0
  1162. package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubClient.js.map +1 -0
  1163. package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.js +493 -0
  1164. package/build/dist/Server/Utils/SecurityEvent/Connectors/AwsSecurityHub/AwsSecurityHubConnector.js.map +1 -0
  1165. package/build/dist/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.js +354 -0
  1166. package/build/dist/Server/Utils/SecurityEvent/Connectors/ConnectorPlatformHealth.js.map +1 -0
  1167. package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.js +405 -0
  1168. package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconClient.js.map +1 -0
  1169. package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.js +466 -0
  1170. package/build/dist/Server/Utils/SecurityEvent/Connectors/CrowdStrikeFalcon/CrowdStrikeFalconConnector.js.map +1 -0
  1171. package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.js +344 -0
  1172. package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityClient.js.map +1 -0
  1173. package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.js +511 -0
  1174. package/build/dist/Server/Utils/SecurityEvent/Connectors/ElasticSecurity/ElasticSecurityConnector.js.map +1 -0
  1175. package/build/dist/Server/Utils/SecurityEvent/{GoogleSecOps → Connectors/GoogleSecOps}/GoogleSecOpsClient.js +401 -68
  1176. package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
  1177. package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.js +1417 -0
  1178. package/build/dist/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnector.js.map +1 -0
  1179. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.js +406 -0
  1180. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrClient.js.map +1 -0
  1181. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.js +336 -0
  1182. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdr/MicrosoftDefenderXdrConnector.js.map +1 -0
  1183. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.js +474 -0
  1184. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelClient.js.map +1 -0
  1185. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.js +417 -0
  1186. package/build/dist/Server/Utils/SecurityEvent/Connectors/MicrosoftSentinel/MicrosoftSentinelConnector.js.map +1 -0
  1187. package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.js +314 -0
  1188. package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaClient.js.map +1 -0
  1189. package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.js +494 -0
  1190. package/build/dist/Server/Utils/SecurityEvent/Connectors/Okta/OktaConnector.js.map +1 -0
  1191. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.js +839 -0
  1192. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionPoller.js.map +1 -0
  1193. package/build/dist/Server/Utils/SecurityEvent/{GoogleSecOps/GoogleSecOpsRunExecutor.js → Connectors/SecurityEventConnectionRunExecutor.js} +77 -50
  1194. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionRunExecutor.js.map +1 -0
  1195. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.js +214 -0
  1196. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectionTester.js.map +1 -0
  1197. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.js +42 -0
  1198. package/build/dist/Server/Utils/SecurityEvent/Connectors/SecurityEventConnectorRegistry.js.map +1 -0
  1199. package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.js +494 -0
  1200. package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkClient.js.map +1 -0
  1201. package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.js +379 -0
  1202. package/build/dist/Server/Utils/SecurityEvent/Connectors/Splunk/SplunkConnector.js.map +1 -0
  1203. package/build/dist/Server/Utils/SecurityEvent/Connectors/Types.js +122 -0
  1204. package/build/dist/Server/Utils/SecurityEvent/Connectors/Types.js.map +1 -0
  1205. package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +1 -1
  1206. package/build/dist/Server/Utils/SecurityEvent/SecurityEventDedupe.js +52 -0
  1207. package/build/dist/Server/Utils/SecurityEvent/SecurityEventDedupe.js.map +1 -0
  1208. package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +2 -2
  1209. package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js +599 -32
  1210. package/build/dist/Server/Utils/SessionReplay/SessionReplayReadService.js.map +1 -1
  1211. package/build/dist/Server/Utils/Slo/SloFeedUtil.js +150 -0
  1212. package/build/dist/Server/Utils/Slo/SloFeedUtil.js.map +1 -0
  1213. package/build/dist/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.js +136 -0
  1214. package/build/dist/Server/Utils/Slo/SloLegacyMonitorLabelAdoption.js.map +1 -0
  1215. package/build/dist/Server/Utils/Slo/SloMetricUtil.js +269 -0
  1216. package/build/dist/Server/Utils/Slo/SloMetricUtil.js.map +1 -0
  1217. package/build/dist/Server/Utils/Slo/SloOwnerReferenceValidator.js +134 -0
  1218. package/build/dist/Server/Utils/Slo/SloOwnerReferenceValidator.js.map +1 -0
  1219. package/build/dist/Server/Utils/Slo/SloRecordReferenceValidator.js +137 -0
  1220. package/build/dist/Server/Utils/Slo/SloRecordReferenceValidator.js.map +1 -0
  1221. package/build/dist/Server/Utils/StartServer.js +10 -0
  1222. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  1223. package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js +6 -26
  1224. package/build/dist/Server/Utils/StatusPage/MonitorRulePatternValidator.js.map +1 -1
  1225. package/build/dist/Server/Utils/StatusPageResource.js +31 -5
  1226. package/build/dist/Server/Utils/StatusPageResource.js.map +1 -1
  1227. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +8 -0
  1228. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
  1229. package/build/dist/Server/Utils/Telemetry/KubernetesResourceAttributes.js +80 -0
  1230. package/build/dist/Server/Utils/Telemetry/KubernetesResourceAttributes.js.map +1 -0
  1231. package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js +122 -67
  1232. package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js.map +1 -1
  1233. package/build/dist/Server/Utils/Telemetry/ResourceFacetPlanner.js +146 -0
  1234. package/build/dist/Server/Utils/Telemetry/ResourceFacetPlanner.js.map +1 -0
  1235. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +174 -248
  1236. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
  1237. package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js +492 -0
  1238. package/build/dist/Server/Utils/Telemetry/ServiceDependencyDiscovery.js.map +1 -0
  1239. package/build/dist/Server/Utils/Telemetry/TraceContextPropagation.js +259 -0
  1240. package/build/dist/Server/Utils/Telemetry/TraceContextPropagation.js.map +1 -0
  1241. package/build/dist/Server/Utils/Telemetry.js +11 -5
  1242. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  1243. package/build/dist/Types/AI/InvestigationEvidence.js +2 -0
  1244. package/build/dist/Types/AI/InvestigationEvidence.js.map +1 -0
  1245. package/build/dist/Types/Billing/SubscriptionStatus.js +37 -3
  1246. package/build/dist/Types/Billing/SubscriptionStatus.js.map +1 -1
  1247. package/build/dist/Types/Dashboard/DashboardComponentType.js +1 -0
  1248. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  1249. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +5 -0
  1250. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  1251. package/build/dist/Types/Dashboard/DashboardComponents/DashboardSloListComponent.js +2 -0
  1252. package/build/dist/Types/Dashboard/DashboardComponents/DashboardSloListComponent.js.map +1 -0
  1253. package/build/dist/Types/Dashboard/DashboardTemplates.js +275 -286
  1254. package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
  1255. package/build/dist/Types/Database/EnableAuditLog.js +19 -1
  1256. package/build/dist/Types/Database/EnableAuditLog.js.map +1 -1
  1257. package/build/dist/Types/Email/EmailTemplateType.js +4 -0
  1258. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  1259. package/build/dist/Types/Monitor/CriteriaFilter.js +45 -6
  1260. package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
  1261. package/build/dist/Types/Monitor/MonitorStep.js +2 -0
  1262. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  1263. package/build/dist/Types/Monitor/MonitorStepDnsMonitor.js +3 -1
  1264. package/build/dist/Types/Monitor/MonitorStepDnsMonitor.js.map +1 -1
  1265. package/build/dist/Types/Monitor/MonitorStepDnssecMonitor.js +3 -1
  1266. package/build/dist/Types/Monitor/MonitorStepDnssecMonitor.js.map +1 -1
  1267. package/build/dist/Types/Monitor/MonitorStepDomainMonitor.js +3 -1
  1268. package/build/dist/Types/Monitor/MonitorStepDomainMonitor.js.map +1 -1
  1269. package/build/dist/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +3 -1
  1270. package/build/dist/Types/Monitor/MonitorStepExternalStatusPageMonitor.js.map +1 -1
  1271. package/build/dist/Types/Monitor/MonitorStepRetries.js +47 -0
  1272. package/build/dist/Types/Monitor/MonitorStepRetries.js.map +1 -0
  1273. package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js +3 -1
  1274. package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js.map +1 -1
  1275. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticResult.js +29 -0
  1276. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticResult.js.map +1 -0
  1277. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.js +37 -0
  1278. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticStatus.js.map +1 -0
  1279. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticType.js +42 -0
  1280. package/build/dist/Types/NetworkDevice/NetworkDeviceDiagnosticType.js.map +1 -0
  1281. package/build/dist/Types/NetworkDevice/NetworkDevicePingMetricNames.js +20 -0
  1282. package/build/dist/Types/NetworkDevice/NetworkDevicePingMetricNames.js.map +1 -0
  1283. package/build/dist/Types/Permission.js +116 -2
  1284. package/build/dist/Types/Permission.js.map +1 -1
  1285. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js +5 -0
  1286. package/build/dist/Types/Rules/RuleCriteriaFieldRegistry.js.map +1 -1
  1287. package/build/dist/Types/Rules/RuleRun.js +267 -0
  1288. package/build/dist/Types/Rules/RuleRun.js.map +1 -0
  1289. package/build/dist/Types/Rum/SessionReplay.js +95 -0
  1290. package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
  1291. package/build/dist/Types/Rum/SessionReplayApi.js.map +1 -1
  1292. package/build/dist/Types/SecurityEvent/Connectors/ConnectorDiagnostics.js +18 -0
  1293. package/build/dist/Types/SecurityEvent/Connectors/ConnectorDiagnostics.js.map +1 -0
  1294. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.js +17 -0
  1295. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectionDiagnostics.js.map +1 -0
  1296. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +439 -0
  1297. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js.map +1 -0
  1298. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js +39 -0
  1299. package/build/dist/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js.map +1 -0
  1300. package/build/dist/Types/SecurityEvent/GoogleSecOpsRegion.js +35 -0
  1301. package/build/dist/Types/SecurityEvent/GoogleSecOpsRegion.js.map +1 -0
  1302. package/build/dist/Types/ServiceLevelObjective/SloHistoryMetricName.js +26 -0
  1303. package/build/dist/Types/ServiceLevelObjective/SloHistoryMetricName.js.map +1 -0
  1304. package/build/dist/Types/ServiceLevelObjective/SloMetricType.js +45 -0
  1305. package/build/dist/Types/ServiceLevelObjective/SloMetricType.js.map +1 -0
  1306. package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js +4 -0
  1307. package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js.map +1 -1
  1308. package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js +295 -0
  1309. package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js.map +1 -0
  1310. package/build/dist/Types/StatusPage/SubscriberNotificationTrigger.js +13 -0
  1311. package/build/dist/Types/StatusPage/SubscriberNotificationTrigger.js.map +1 -0
  1312. package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js +67 -0
  1313. package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js.map +1 -0
  1314. package/build/dist/Types/Telemetry/EntityType.js +14 -0
  1315. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  1316. package/build/dist/Types/Telemetry/ExceptionSpanScope.js +59 -0
  1317. package/build/dist/Types/Telemetry/ExceptionSpanScope.js.map +1 -0
  1318. package/build/dist/Types/Telemetry/LockedFilterDetail.js +16 -0
  1319. package/build/dist/Types/Telemetry/LockedFilterDetail.js.map +1 -0
  1320. package/build/dist/Types/Telemetry/ResourceEntityFacet.js +16 -10
  1321. package/build/dist/Types/Telemetry/ResourceEntityFacet.js.map +1 -1
  1322. package/build/dist/Types/Telemetry/ResourceFacetCatalog.js +119 -0
  1323. package/build/dist/Types/Telemetry/ResourceFacetCatalog.js.map +1 -0
  1324. package/build/dist/Types/Telemetry/ServiceType.js +7 -0
  1325. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  1326. package/build/dist/UI/Components/AlertBanner/AlertBanner.js +48 -19
  1327. package/build/dist/UI/Components/AlertBanner/AlertBanner.js.map +1 -1
  1328. package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +10 -2
  1329. package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
  1330. package/build/dist/UI/Components/Card/Card.js +34 -17
  1331. package/build/dist/UI/Components/Card/Card.js.map +1 -1
  1332. package/build/dist/UI/Components/Checkbox/Checkbox.js +6 -4
  1333. package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
  1334. package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js +5 -1
  1335. package/build/dist/UI/Components/CopyTextButton/CopyTextButton.js.map +1 -1
  1336. package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +1 -1
  1337. package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
  1338. package/build/dist/UI/Components/Detail/Detail.js +74 -15
  1339. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  1340. package/build/dist/UI/Components/Dropdown/Dropdown.js +33 -5
  1341. package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
  1342. package/build/dist/UI/Components/EmptyState/EmptyState.js +3 -3
  1343. package/build/dist/UI/Components/EmptyState/EmptyState.js.map +1 -1
  1344. package/build/dist/UI/Components/EmptyState/EmptyStateGuideLinks.js +47 -0
  1345. package/build/dist/UI/Components/EmptyState/EmptyStateGuideLinks.js.map +1 -0
  1346. package/build/dist/UI/Components/ErrorBoundary.js +34 -0
  1347. package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
  1348. package/build/dist/UI/Components/Forms/ModelForm.js +6 -5
  1349. package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
  1350. package/build/dist/UI/Components/LabelRule/LabelRuleTable.js +6 -2
  1351. package/build/dist/UI/Components/LabelRule/LabelRuleTable.js.map +1 -1
  1352. package/build/dist/UI/Components/LogsViewer/LogsEntityNames.js +535 -0
  1353. package/build/dist/UI/Components/LogsViewer/LogsEntityNames.js.map +1 -0
  1354. package/build/dist/UI/Components/LogsViewer/LogsViewer.js +117 -57
  1355. package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
  1356. package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +3 -7
  1357. package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
  1358. package/build/dist/UI/Components/LogsViewer/components/FacetSection.js +31 -44
  1359. package/build/dist/UI/Components/LogsViewer/components/FacetSection.js.map +1 -1
  1360. package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js +17 -3
  1361. package/build/dist/UI/Components/LogsViewer/components/FacetValueRow.js.map +1 -1
  1362. package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js +19 -3
  1363. package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js.map +1 -1
  1364. package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +64 -18
  1365. package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
  1366. package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +100 -41
  1367. package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
  1368. package/build/dist/UI/Components/LogsViewer/components/LogsTable.js +13 -5
  1369. package/build/dist/UI/Components/LogsViewer/components/LogsTable.js.map +1 -1
  1370. package/build/dist/UI/Components/LogsViewer/types.js.map +1 -1
  1371. package/build/dist/UI/Components/Markdown.tsx/InlineReferences.js +403 -0
  1372. package/build/dist/UI/Components/Markdown.tsx/InlineReferences.js.map +1 -0
  1373. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +197 -179
  1374. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  1375. package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js +30 -21
  1376. package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js.map +1 -1
  1377. package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +12 -0
  1378. package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
  1379. package/build/dist/UI/Components/ModelDetail/ModelDetail.js +46 -12
  1380. package/build/dist/UI/Components/ModelDetail/ModelDetail.js.map +1 -1
  1381. package/build/dist/UI/Components/ModelList/ModelList.js +26 -7
  1382. package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
  1383. package/build/dist/UI/Components/MoreMenu/MoreMenu.js +3 -1
  1384. package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
  1385. package/build/dist/UI/Components/Page/ModelPage.js +62 -34
  1386. package/build/dist/UI/Components/Page/ModelPage.js.map +1 -1
  1387. package/build/dist/UI/Components/RuleRun/RuleDetailFields.js +226 -0
  1388. package/build/dist/UI/Components/RuleRun/RuleDetailFields.js.map +1 -0
  1389. package/build/dist/UI/Components/RuleRun/RuleTable.js +97 -0
  1390. package/build/dist/UI/Components/RuleRun/RuleTable.js.map +1 -0
  1391. package/build/dist/UI/Components/RuleRun/RuleView.js +83 -0
  1392. package/build/dist/UI/Components/RuleRun/RuleView.js.map +1 -0
  1393. package/build/dist/UI/Components/RuleRun/RunRuleNowModal.js +74 -0
  1394. package/build/dist/UI/Components/RuleRun/RunRuleNowModal.js.map +1 -0
  1395. package/build/dist/UI/Components/RuleRun/RunRulesBulkAction.js +78 -0
  1396. package/build/dist/UI/Components/RuleRun/RunRulesBulkAction.js.map +1 -0
  1397. package/build/dist/UI/Components/Table/Table.js +3 -1
  1398. package/build/dist/UI/Components/Table/Table.js.map +1 -1
  1399. package/build/dist/UI/Components/Table/TableRow.js +8 -1
  1400. package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
  1401. package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js +111 -0
  1402. package/build/dist/UI/Components/TelemetryViewer/FacetVisibility.js.map +1 -0
  1403. package/build/dist/UI/Components/TelemetryViewer/ResourceFacetConfigs.js +22 -0
  1404. package/build/dist/UI/Components/TelemetryViewer/ResourceFacetConfigs.js.map +1 -0
  1405. package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +1 -1
  1406. package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
  1407. package/build/dist/UI/Components/TelemetryViewer/components/FacetSearchInput.js +36 -0
  1408. package/build/dist/UI/Components/TelemetryViewer/components/FacetSearchInput.js.map +1 -0
  1409. package/build/dist/UI/Components/TelemetryViewer/components/FacetSectionHeader.js +21 -0
  1410. package/build/dist/UI/Components/TelemetryViewer/components/FacetSectionHeader.js.map +1 -0
  1411. package/build/dist/UI/Components/TelemetryViewer/components/FacetShowMoreButton.js +14 -0
  1412. package/build/dist/UI/Components/TelemetryViewer/components/FacetShowMoreButton.js.map +1 -0
  1413. package/build/dist/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.js +27 -0
  1414. package/build/dist/UI/Components/TelemetryViewer/components/HiddenFacetsFooter.js.map +1 -0
  1415. package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js +202 -0
  1416. package/build/dist/UI/Components/TelemetryViewer/components/LockedFilterChip.js.map +1 -0
  1417. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js +2 -6
  1418. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryActiveFilterChips.js.map +1 -1
  1419. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js +111 -12
  1420. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryDetailPanel.js.map +1 -1
  1421. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js +27 -40
  1422. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSection.js.map +1 -1
  1423. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js +70 -10
  1424. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetSidebar.js.map +1 -1
  1425. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js +17 -3
  1426. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryFacetValueRow.js.map +1 -1
  1427. package/build/dist/UI/Components/TelemetryViewer/types.js +0 -4
  1428. package/build/dist/UI/Components/TelemetryViewer/types.js.map +1 -1
  1429. package/build/dist/UI/Components/TelemetryViewer/useFacetSearchExemptions.js +70 -0
  1430. package/build/dist/UI/Components/TelemetryViewer/useFacetSearchExemptions.js.map +1 -0
  1431. package/build/dist/UI/Components/TelemetryViewer/useFacetSectionSearch.js +52 -0
  1432. package/build/dist/UI/Components/TelemetryViewer/useFacetSectionSearch.js.map +1 -0
  1433. package/build/dist/UI/Utils/Clipboard.js +59 -2
  1434. package/build/dist/UI/Utils/Clipboard.js.map +1 -1
  1435. package/build/dist/UI/Utils/Navigation.js +11 -2
  1436. package/build/dist/UI/Utils/Navigation.js.map +1 -1
  1437. package/build/dist/UI/Utils/Rules/RuleRunClient.js +98 -0
  1438. package/build/dist/UI/Utils/Rules/RuleRunClient.js.map +1 -0
  1439. package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js +479 -0
  1440. package/build/dist/UI/Utils/Telemetry/TelemetryEntityNames.js.map +1 -0
  1441. package/build/dist/UI/Utils/Telemetry/UseTelemetryEntityNames.js +113 -0
  1442. package/build/dist/UI/Utils/Telemetry/UseTelemetryEntityNames.js.map +1 -0
  1443. package/build/dist/Utils/AI/InvestigationReport.js +1241 -0
  1444. package/build/dist/Utils/AI/InvestigationReport.js.map +1 -0
  1445. package/build/dist/Utils/API.js +25 -0
  1446. package/build/dist/Utils/API.js.map +1 -1
  1447. package/build/dist/Utils/Dashboard/Components/DashboardSloComponent.js +16 -2
  1448. package/build/dist/Utils/Dashboard/Components/DashboardSloComponent.js.map +1 -1
  1449. package/build/dist/Utils/Dashboard/Components/DashboardSloListComponent.js +94 -0
  1450. package/build/dist/Utils/Dashboard/Components/DashboardSloListComponent.js.map +1 -0
  1451. package/build/dist/Utils/Dashboard/Components/Index.js +4 -0
  1452. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  1453. package/build/dist/Utils/Dashboard/SloWidgetSource.js +125 -0
  1454. package/build/dist/Utils/Dashboard/SloWidgetSource.js.map +1 -0
  1455. package/build/dist/Utils/Markdown/MarkdownEscape.js +49 -0
  1456. package/build/dist/Utils/Markdown/MarkdownEscape.js.map +1 -0
  1457. package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +112 -34
  1458. package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
  1459. package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +22 -0
  1460. package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -1
  1461. package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js +129 -0
  1462. package/build/dist/Utils/NetworkDiscovery/NetbiosNameUtil.js.map +1 -0
  1463. package/build/dist/Utils/NetworkDiscovery/RunImportedDeviceNaming.js +255 -0
  1464. package/build/dist/Utils/NetworkDiscovery/RunImportedDeviceNaming.js.map +1 -0
  1465. package/build/dist/Utils/NetworkDiscovery/ShortDeviceNamePlanner.js +184 -0
  1466. package/build/dist/Utils/NetworkDiscovery/ShortDeviceNamePlanner.js.map +1 -0
  1467. package/build/dist/Utils/NetworkDiscovery/ShortHostnameUtil.js +79 -0
  1468. package/build/dist/Utils/NetworkDiscovery/ShortHostnameUtil.js.map +1 -0
  1469. package/build/dist/Utils/NetworkSite/CidrMatchUtil.js +21 -12
  1470. package/build/dist/Utils/NetworkSite/CidrMatchUtil.js.map +1 -1
  1471. package/build/dist/Utils/Project/DataResidency.js +51 -0
  1472. package/build/dist/Utils/Project/DataResidency.js.map +1 -0
  1473. package/build/dist/Utils/Rules/RuleRunSummary.js +197 -0
  1474. package/build/dist/Utils/Rules/RuleRunSummary.js.map +1 -0
  1475. package/build/dist/Utils/Rum/SessionReplayHealth.js +10 -0
  1476. package/build/dist/Utils/Rum/SessionReplayHealth.js.map +1 -1
  1477. package/build/dist/Utils/Rum/SessionReplayRecordingEnded.js +54 -0
  1478. package/build/dist/Utils/Rum/SessionReplayRecordingEnded.js.map +1 -0
  1479. package/build/dist/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.js +311 -0
  1480. package/build/dist/Utils/SecurityEvent/Connectors/AwsSecurityHubNormalizer.js.map +1 -0
  1481. package/build/dist/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.js +150 -0
  1482. package/build/dist/Utils/SecurityEvent/Connectors/CrowdStrikeFalconNormalizer.js.map +1 -0
  1483. package/build/dist/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.js +328 -0
  1484. package/build/dist/Utils/SecurityEvent/Connectors/ElasticSecurityNormalizer.js.map +1 -0
  1485. package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.js +405 -0
  1486. package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftDefenderXdrNormalizer.js.map +1 -0
  1487. package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.js +212 -0
  1488. package/build/dist/Utils/SecurityEvent/Connectors/MicrosoftSentinelNormalizer.js.map +1 -0
  1489. package/build/dist/Utils/SecurityEvent/Connectors/OktaNormalizer.js +351 -0
  1490. package/build/dist/Utils/SecurityEvent/Connectors/OktaNormalizer.js.map +1 -0
  1491. package/build/dist/Utils/SecurityEvent/Connectors/SplunkNormalizer.js +348 -0
  1492. package/build/dist/Utils/SecurityEvent/Connectors/SplunkNormalizer.js.map +1 -0
  1493. package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +103 -10
  1494. package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -1
  1495. package/build/dist/Utils/Slo/SloAffectedResourceMarkdown.js +51 -0
  1496. package/build/dist/Utils/Slo/SloAffectedResourceMarkdown.js.map +1 -0
  1497. package/build/dist/Utils/Slo/SloBurnRateTemplate.js +228 -0
  1498. package/build/dist/Utils/Slo/SloBurnRateTemplate.js.map +1 -0
  1499. package/build/dist/Utils/Slo/SloFeedMarkdown.js +934 -0
  1500. package/build/dist/Utils/Slo/SloFeedMarkdown.js.map +1 -0
  1501. package/build/dist/Utils/Slo/SloHealth.js +75 -9
  1502. package/build/dist/Utils/Slo/SloHealth.js.map +1 -1
  1503. package/build/dist/Utils/Slo/SloListWidgetFormat.js +217 -0
  1504. package/build/dist/Utils/Slo/SloListWidgetFormat.js.map +1 -0
  1505. package/build/dist/Utils/Slo/SloMetricType.js +212 -0
  1506. package/build/dist/Utils/Slo/SloMetricType.js.map +1 -0
  1507. package/build/dist/Utils/Slo/SloMonitorRuleCriteria.js +216 -0
  1508. package/build/dist/Utils/Slo/SloMonitorRuleCriteria.js.map +1 -0
  1509. package/build/dist/Utils/Slo/SloMonitorStatusSummary.js +129 -0
  1510. package/build/dist/Utils/Slo/SloMonitorStatusSummary.js.map +1 -0
  1511. package/build/dist/Utils/Slo/SloOverviewText.js +110 -0
  1512. package/build/dist/Utils/Slo/SloOverviewText.js.map +1 -0
  1513. package/build/dist/Utils/Slo/SloProjection.js +448 -0
  1514. package/build/dist/Utils/Slo/SloProjection.js.map +1 -0
  1515. package/build/dist/Utils/Slo/SloWidgetFormat.js +4 -2
  1516. package/build/dist/Utils/Slo/SloWidgetFormat.js.map +1 -1
  1517. package/build/dist/Utils/Telemetry/CrossSignalScope.js +16 -5
  1518. package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
  1519. package/build/dist/Utils/Telemetry/EntityRelationship.js +7 -0
  1520. package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
  1521. package/build/dist/Utils/Telemetry/LockedFilterSearch.js +252 -0
  1522. package/build/dist/Utils/Telemetry/LockedFilterSearch.js.map +1 -0
  1523. package/build/dist/Utils/Telemetry/NetworkHost.js +39 -0
  1524. package/build/dist/Utils/Telemetry/NetworkHost.js.map +1 -0
  1525. package/build/dist/Utils/Telemetry/OriginAllowList.js +105 -4
  1526. package/build/dist/Utils/Telemetry/OriginAllowList.js.map +1 -1
  1527. package/build/dist/Utils/Traces/CriticalPath.js +9 -4
  1528. package/build/dist/Utils/Traces/CriticalPath.js.map +1 -1
  1529. package/package.json +1 -1
  1530. package/Server/API/GoogleSecOpsConnectionAPI.ts +0 -79
  1531. package/Server/Services/GoogleSecOpsConnectionService.ts +0 -101
  1532. package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +0 -774
  1533. package/Tests/App/Dashboard/GoogleSecOpsConnectionsErrors.test.tsx +0 -423
  1534. package/Tests/App/Dashboard/GoogleSecOpsDiagnostics.test.tsx +0 -724
  1535. package/Tests/Server/API/GoogleSecOpsConnectionAPI.test.ts +0 -248
  1536. package/Tests/Server/Services/GoogleSecOpsDiagnosticsModel.test.ts +0 -153
  1537. package/Tests/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.test.ts +0 -711
  1538. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsDiagnostics.test.ts +0 -838
  1539. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +0 -716
  1540. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +0 -860
  1541. package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerHardening.test.ts +0 -1231
  1542. package/Tests/UI/Rum/RecordingHealthStrip.test.tsx +0 -600
  1543. package/Types/SecurityEvent/GoogleSecOpsDiagnostics.ts +0 -56
  1544. package/UI/Components/GanttChart/Bar/BarLabel.tsx +0 -17
  1545. package/UI/Components/GanttChart/Bar/Index.tsx +0 -149
  1546. package/UI/Components/GanttChart/ChartContainer.tsx +0 -50
  1547. package/UI/Components/GanttChart/Index.tsx +0 -90
  1548. package/UI/Components/GanttChart/Row/Index.tsx +0 -22
  1549. package/UI/Components/GanttChart/Row/Row.tsx +0 -231
  1550. package/UI/Components/GanttChart/Row/RowLabel.tsx +0 -30
  1551. package/UI/Components/GanttChart/Rows.tsx +0 -59
  1552. package/UI/Components/GanttChart/Timeline/Index.tsx +0 -46
  1553. package/UI/Components/GanttChart/Timeline/TimelineInterval.tsx +0 -33
  1554. package/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.tsx +0 -43
  1555. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +0 -1
  1556. package/build/dist/Models/DatabaseModels/GoogleSecOpsConnectionRun.js.map +0 -1
  1557. package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js +0 -56
  1558. package/build/dist/Server/API/GoogleSecOpsConnectionAPI.js.map +0 -1
  1559. package/build/dist/Server/Services/GoogleSecOpsConnectionRunService.js.map +0 -1
  1560. package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +0 -62
  1561. package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +0 -1
  1562. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +0 -1
  1563. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +0 -577
  1564. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +0 -1
  1565. package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsRunExecutor.js.map +0 -1
  1566. package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js +0 -2
  1567. package/build/dist/Types/SecurityEvent/GoogleSecOpsDiagnostics.js.map +0 -1
  1568. package/build/dist/UI/Components/GanttChart/Bar/BarLabel.js +0 -8
  1569. package/build/dist/UI/Components/GanttChart/Bar/BarLabel.js.map +0 -1
  1570. package/build/dist/UI/Components/GanttChart/Bar/Index.js +0 -77
  1571. package/build/dist/UI/Components/GanttChart/Bar/Index.js.map +0 -1
  1572. package/build/dist/UI/Components/GanttChart/ChartContainer.js +0 -33
  1573. package/build/dist/UI/Components/GanttChart/ChartContainer.js.map +0 -1
  1574. package/build/dist/UI/Components/GanttChart/Index.js +0 -39
  1575. package/build/dist/UI/Components/GanttChart/Index.js.map +0 -1
  1576. package/build/dist/UI/Components/GanttChart/Row/Index.js +0 -7
  1577. package/build/dist/UI/Components/GanttChart/Row/Index.js.map +0 -1
  1578. package/build/dist/UI/Components/GanttChart/Row/Row.js +0 -106
  1579. package/build/dist/UI/Components/GanttChart/Row/Row.js.map +0 -1
  1580. package/build/dist/UI/Components/GanttChart/Row/RowLabel.js +0 -10
  1581. package/build/dist/UI/Components/GanttChart/Row/RowLabel.js.map +0 -1
  1582. package/build/dist/UI/Components/GanttChart/Rows.js +0 -19
  1583. package/build/dist/UI/Components/GanttChart/Rows.js.map +0 -1
  1584. package/build/dist/UI/Components/GanttChart/Timeline/Index.js +0 -16
  1585. package/build/dist/UI/Components/GanttChart/Timeline/Index.js.map +0 -1
  1586. package/build/dist/UI/Components/GanttChart/Timeline/TimelineInterval.js +0 -13
  1587. package/build/dist/UI/Components/GanttChart/Timeline/TimelineInterval.js.map +0 -1
  1588. package/build/dist/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.js +0 -13
  1589. package/build/dist/UI/Components/GanttChart/Timeline/TimelineIntervalMarks.js.map +0 -1
@@ -0,0 +1,2206 @@
1
+ import {
2
+ afterEach,
3
+ beforeEach,
4
+ describe,
5
+ expect,
6
+ jest,
7
+ test,
8
+ } from "@jest/globals";
9
+ import getJestMockFunction, { MockFunction } from "../../../MockType";
10
+
11
+ /*
12
+ * A telemetry row's primaryEntityId is polymorphic: it can be a Service,
13
+ * a RUM application, a host, a cluster, an incident, … Every viewer used
14
+ * to resolve it against the Service table only, so a RUM application's
15
+ * metrics page showed "Service: 84858d6c-…" as its locked filter. The
16
+ * resolver under test is the single place that knows every table an id
17
+ * can live in and how to label it, so these tests pin the registry, the
18
+ * query plan (Service first, then fan out), hints, restrictions, failure
19
+ * isolation, caching (hits, short-lived misses, expired hits refreshed
20
+ * from their own table), non-UUID input and in-flight dedup.
21
+ */
22
+
23
+ const getListMock: MockFunction = getJestMockFunction();
24
+
25
+ /*
26
+ * The arrow wrapper is load bearing: jest.mock is hoisted above the
27
+ * compiled requires, so getListMock is still unassigned when the factory
28
+ * runs.
29
+ */
30
+ jest.mock("../../../../UI/Utils/ModelAPI/ModelAPI", () => {
31
+ return {
32
+ __esModule: true,
33
+ default: {
34
+ getList: (...args: Array<any>) => {
35
+ return getListMock(...args);
36
+ },
37
+ },
38
+ };
39
+ });
40
+
41
+ import TelemetryEntityNameResolver, {
42
+ DEFAULT_TELEMETRY_ENTITY_LABEL,
43
+ getTelemetryEntityDisplay,
44
+ getTelemetryEntityTypeLabel,
45
+ MISS_CACHE_TTL_IN_MS,
46
+ ResolvedTelemetryEntity,
47
+ TELEMETRY_ENTITY_RESOLUTION_ORDER,
48
+ TELEMETRY_ENTITY_TYPES,
49
+ TelemetryEntityNameMap,
50
+ } from "../../../../UI/Utils/Telemetry/TelemetryEntityNames";
51
+ import { UNKNOWN_SERVICE_NAME } from "../../../../UI/Utils/TelemetryService";
52
+ import Alert from "../../../../Models/DatabaseModels/Alert";
53
+ import BaseModel from "../../../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
54
+ import Host from "../../../../Models/DatabaseModels/Host";
55
+ import Incident from "../../../../Models/DatabaseModels/Incident";
56
+ import IoTFleet from "../../../../Models/DatabaseModels/IoTFleet";
57
+ import RumApplication from "../../../../Models/DatabaseModels/RumApplication";
58
+ import ScheduledMaintenance from "../../../../Models/DatabaseModels/ScheduledMaintenance";
59
+ import Service from "../../../../Models/DatabaseModels/Service";
60
+ import Includes from "../../../../Types/BaseDatabase/Includes";
61
+ import ObjectID from "../../../../Types/ObjectID";
62
+ import ServiceType from "../../../../Types/Telemetry/ServiceType";
63
+
64
+ const PROJECT_ID: string = "9e1b6b0e-0000-4000-8000-000000000001";
65
+ const SERVICE_ID: string = "11111111-0000-4000-8000-000000000001";
66
+ const SERVICE_ID_2: string = "11111111-0000-4000-8000-000000000002";
67
+ const RUM_ID: string = "22222222-0000-4000-8000-000000000001";
68
+ const HOST_ID: string = "33333333-0000-4000-8000-000000000001";
69
+ const CLUSTER_ID: string = "44444444-0000-4000-8000-000000000001";
70
+ const INCIDENT_ID: string = "55555555-0000-4000-8000-000000000001";
71
+ const MISSING_ID: string = "99999999-0000-4000-8000-000000000001";
72
+
73
+ type ModelType = { new (): BaseModel };
74
+
75
+ interface FakeRow {
76
+ id: ObjectID;
77
+ [field: string]: unknown;
78
+ }
79
+
80
+ interface GetListArgs {
81
+ modelType: ModelType;
82
+ query: { projectId: ObjectID; _id: Includes };
83
+ limit: number;
84
+ skip: number;
85
+ select: Record<string, boolean>;
86
+ sort: Record<string, unknown>;
87
+ }
88
+
89
+ interface IssuedRequest {
90
+ entityType: ServiceType;
91
+ ids: Array<string>;
92
+ }
93
+
94
+ // Rows each fake table holds, keyed by the entity type that owns the table.
95
+ let tables: Partial<Record<ServiceType, Array<FakeRow>>> = {};
96
+ // Tables whose getList rejects (e.g. the role cannot read that model).
97
+ let failingTypes: Set<ServiceType> = new Set();
98
+
99
+ const row: (id: string, fields: Record<string, unknown>) => FakeRow = (
100
+ id: string,
101
+ fields: Record<string, unknown>,
102
+ ): FakeRow => {
103
+ return { id: new ObjectID(id), ...fields };
104
+ };
105
+
106
+ const entityTypeForModel: (modelType: ModelType) => ServiceType = (
107
+ modelType: ModelType,
108
+ ): ServiceType => {
109
+ const match: [string, { modelType?: ModelType | undefined }] | undefined =
110
+ Object.entries(TELEMETRY_ENTITY_TYPES).find(
111
+ (entry: [string, { modelType?: ModelType | undefined }]): boolean => {
112
+ return entry[1].modelType === modelType;
113
+ },
114
+ );
115
+ if (!match) {
116
+ throw new Error(`Unexpected model queried: ${modelType.name}`);
117
+ }
118
+ return match[0] as ServiceType;
119
+ };
120
+
121
+ const includedIds: (includes: Includes) => Array<string> = (
122
+ includes: Includes,
123
+ ): Array<string> => {
124
+ return (includes.values as Array<string | ObjectID>).map(
125
+ (value: string | ObjectID): string => {
126
+ return value.toString();
127
+ },
128
+ );
129
+ };
130
+
131
+ const argsOf: (callIndex: number) => GetListArgs = (
132
+ callIndex: number,
133
+ ): GetListArgs => {
134
+ return getListMock.mock.calls[callIndex]![0] as GetListArgs;
135
+ };
136
+
137
+ const issuedRequests: () => Array<IssuedRequest> = (): Array<IssuedRequest> => {
138
+ return getListMock.mock.calls.map((call: Array<unknown>): IssuedRequest => {
139
+ const args: GetListArgs = call[0] as GetListArgs;
140
+ return {
141
+ entityType: entityTypeForModel(args.modelType),
142
+ ids: includedIds(args.query._id),
143
+ };
144
+ });
145
+ };
146
+
147
+ const requestedTypes: () => Array<ServiceType> = (): Array<ServiceType> => {
148
+ return issuedRequests().map((request: IssuedRequest): ServiceType => {
149
+ return request.entityType;
150
+ });
151
+ };
152
+
153
+ const fakeGetList: (
154
+ args: GetListArgs,
155
+ ) => Promise<{ data: Array<FakeRow> }> = async (
156
+ args: GetListArgs,
157
+ ): Promise<{ data: Array<FakeRow> }> => {
158
+ const entityType: ServiceType = entityTypeForModel(args.modelType);
159
+ if (failingTypes.has(entityType)) {
160
+ throw new Error(`403: cannot read ${entityType}`);
161
+ }
162
+ const ids: Array<string> = includedIds(args.query._id);
163
+ return {
164
+ data: (tables[entityType] || []).filter((item: FakeRow): boolean => {
165
+ return ids.includes(item.id.toString());
166
+ }),
167
+ };
168
+ };
169
+
170
+ interface Deferred<T> {
171
+ promise: Promise<T>;
172
+ resolve: (value: T) => void;
173
+ }
174
+
175
+ const deferred: <T>() => Deferred<T> = <T>(): Deferred<T> => {
176
+ let resolve: (value: T) => void = (): void => {};
177
+ const promise: Promise<T> = new Promise<T>((res: (value: T) => void) => {
178
+ resolve = res;
179
+ });
180
+ return { promise, resolve };
181
+ };
182
+
183
+ const flushPromises: () => Promise<void> = async (): Promise<void> => {
184
+ for (let i: number = 0; i < 10; i++) {
185
+ await Promise.resolve();
186
+ }
187
+ };
188
+
189
+ // Hit TTL of the resolver's positive cache (not exported by the module).
190
+ const HIT_CACHE_TTL_IN_MS: number = 60 * 1000;
191
+ const START_TIME: number = 1_800_000_000_000;
192
+
193
+ /*
194
+ * Named structurally: jest.spyOn from @jest/globals returns jest-mock's
195
+ * SpyInstance, which does not assign to the global jest.SpiedFunction.
196
+ */
197
+ interface NowSpy {
198
+ mockReturnValue: (value: number) => unknown;
199
+ }
200
+
201
+ // Freeze Date.now at `at`; move the clock with the returned spy.
202
+ const freezeNow: (at: number) => NowSpy = (at: number): NowSpy => {
203
+ return jest.spyOn(Date, "now").mockReturnValue(at) as unknown as NowSpy;
204
+ };
205
+
206
+ const missCacheKeys: () => Array<string> = (): Array<string> => {
207
+ return Object.keys(
208
+ (
209
+ TelemetryEntityNameResolver as unknown as {
210
+ missCache: Record<string, number>;
211
+ }
212
+ ).missCache,
213
+ );
214
+ };
215
+
216
+ const requestsFor: (entityType: ServiceType) => Array<IssuedRequest> = (
217
+ entityType: ServiceType,
218
+ ): Array<IssuedRequest> => {
219
+ return issuedRequests().filter((request: IssuedRequest): boolean => {
220
+ return request.entityType === entityType;
221
+ });
222
+ };
223
+
224
+ beforeEach(() => {
225
+ TelemetryEntityNameResolver.clearCache();
226
+ getListMock.mockReset();
227
+ tables = {
228
+ [ServiceType.OpenTelemetry]: [
229
+ row(SERVICE_ID, { name: "checkout-api" }),
230
+ row(SERVICE_ID_2, { name: "payments-api" }),
231
+ ],
232
+ [ServiceType.RealUserMonitor]: [row(RUM_ID, { name: "checkout-web" })],
233
+ [ServiceType.Host]: [row(HOST_ID, { name: "prod-db-1" })],
234
+ [ServiceType.KubernetesCluster]: [
235
+ row(CLUSTER_ID, { name: "prod-eu-west" }),
236
+ ],
237
+ [ServiceType.Incident]: [row(INCIDENT_ID, { title: "API is down" })],
238
+ };
239
+ failingTypes = new Set();
240
+ getListMock.mockImplementation((...args: Array<unknown>) => {
241
+ return fakeGetList(args[0] as GetListArgs);
242
+ });
243
+ });
244
+
245
+ afterEach(() => {
246
+ jest.restoreAllMocks();
247
+ });
248
+
249
+ describe("TELEMETRY_ENTITY_TYPES registry", () => {
250
+ const allServiceTypes: Array<ServiceType> = Object.values(
251
+ ServiceType,
252
+ ) as Array<ServiceType>;
253
+
254
+ test("has an entry for every ServiceType", () => {
255
+ expect(Object.keys(TELEMETRY_ENTITY_TYPES).sort()).toEqual(
256
+ [...allServiceTypes].sort(),
257
+ );
258
+ });
259
+
260
+ test.each(allServiceTypes)(
261
+ "%s has a non-empty label",
262
+ (type: ServiceType) => {
263
+ expect(TELEMETRY_ENTITY_TYPES[type].label.trim().length).toBeGreaterThan(
264
+ 0,
265
+ );
266
+ },
267
+ );
268
+
269
+ test.each(
270
+ allServiceTypes.filter((type: ServiceType): boolean => {
271
+ return type !== ServiceType.Unknown;
272
+ }),
273
+ )(
274
+ "%s has a modelType and name fields that are real columns on it",
275
+ (type: ServiceType) => {
276
+ const config: (typeof TELEMETRY_ENTITY_TYPES)[ServiceType] =
277
+ TELEMETRY_ENTITY_TYPES[type];
278
+ expect(config.modelType).toBeDefined();
279
+ expect(config.nameFields.length).toBeGreaterThan(0);
280
+ const model: BaseModel = new config.modelType!();
281
+ for (const field of config.nameFields) {
282
+ expect({ type, field, isColumn: model.isTableColumn(field) }).toEqual({
283
+ type,
284
+ field,
285
+ isColumn: true,
286
+ });
287
+ }
288
+ },
289
+ );
290
+
291
+ test("Unknown has no table and no name fields (its id is the projectId)", () => {
292
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Unknown].modelType).toBe(
293
+ undefined,
294
+ );
295
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Unknown].nameFields).toEqual([]);
296
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Unknown].label).toBe("Service");
297
+ });
298
+
299
+ test("maps the core entity types to the expected models and labels", () => {
300
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.OpenTelemetry]).toMatchObject({
301
+ label: "Service",
302
+ modelType: Service,
303
+ nameFields: ["name"],
304
+ });
305
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.RealUserMonitor]).toMatchObject({
306
+ label: "RUM Application",
307
+ modelType: RumApplication,
308
+ nameFields: ["name", "appIdentifier"],
309
+ });
310
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Host]).toMatchObject({
311
+ label: "Host",
312
+ modelType: Host,
313
+ nameFields: ["name", "hostIdentifier"],
314
+ });
315
+ });
316
+
317
+ test("IoTDevice telemetry resolves against the IoT fleet table", () => {
318
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.IoTDevice].modelType).toBe(
319
+ IoTFleet,
320
+ );
321
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.IoTDevice].label).toBe(
322
+ "IoT Fleet",
323
+ );
324
+ });
325
+
326
+ test("Incident, Alert and ScheduledMaintenance are named by title", () => {
327
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Incident]).toMatchObject({
328
+ modelType: Incident,
329
+ nameFields: ["title"],
330
+ });
331
+ expect(TELEMETRY_ENTITY_TYPES[ServiceType.Alert]).toMatchObject({
332
+ modelType: Alert,
333
+ nameFields: ["title"],
334
+ });
335
+ expect(
336
+ TELEMETRY_ENTITY_TYPES[ServiceType.ScheduledMaintenance],
337
+ ).toMatchObject({
338
+ modelType: ScheduledMaintenance,
339
+ nameFields: ["title"],
340
+ });
341
+ });
342
+
343
+ test("every model type is used by exactly one entity type", () => {
344
+ const models: Array<ModelType> = allServiceTypes
345
+ .map((type: ServiceType): ModelType | undefined => {
346
+ return TELEMETRY_ENTITY_TYPES[type].modelType;
347
+ })
348
+ .filter((model: ModelType | undefined): boolean => {
349
+ return Boolean(model);
350
+ }) as Array<ModelType>;
351
+ expect(new Set(models).size).toBe(models.length);
352
+ });
353
+ });
354
+
355
+ describe("TELEMETRY_ENTITY_RESOLUTION_ORDER", () => {
356
+ test("starts with Service (the common case resolves in one request)", () => {
357
+ expect(TELEMETRY_ENTITY_RESOLUTION_ORDER[0]).toBe(
358
+ ServiceType.OpenTelemetry,
359
+ );
360
+ });
361
+
362
+ test("covers every table-backed type exactly once and never Unknown", () => {
363
+ const expected: Array<ServiceType> = (
364
+ Object.values(ServiceType) as Array<ServiceType>
365
+ ).filter((type: ServiceType): boolean => {
366
+ return type !== ServiceType.Unknown;
367
+ });
368
+ expect([...TELEMETRY_ENTITY_RESOLUTION_ORDER].sort()).toEqual(
369
+ expected.sort(),
370
+ );
371
+ expect(new Set(TELEMETRY_ENTITY_RESOLUTION_ORDER).size).toBe(
372
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
373
+ );
374
+ expect(TELEMETRY_ENTITY_RESOLUTION_ORDER).not.toContain(
375
+ ServiceType.Unknown,
376
+ );
377
+ });
378
+ });
379
+
380
+ describe("getTelemetryEntityTypeLabel", () => {
381
+ test.each([
382
+ [ServiceType.OpenTelemetry, "Service"],
383
+ [ServiceType.RealUserMonitor, "RUM Application"],
384
+ [ServiceType.Host, "Host"],
385
+ [ServiceType.DockerHost, "Docker Host"],
386
+ [ServiceType.PodmanHost, "Podman Host"],
387
+ [ServiceType.KubernetesCluster, "Kubernetes Cluster"],
388
+ [ServiceType.ProxmoxCluster, "Proxmox Cluster"],
389
+ [ServiceType.CephCluster, "Ceph Cluster"],
390
+ [ServiceType.DockerSwarmCluster, "Docker Swarm Cluster"],
391
+ [ServiceType.VMwareVCenter, "vCenter"],
392
+ [ServiceType.IoTDevice, "IoT Fleet"],
393
+ [ServiceType.ServerlessFunction, "Serverless Function"],
394
+ [ServiceType.CloudResource, "Cloud Resource"],
395
+ [ServiceType.NetworkDevice, "Network Device"],
396
+ [ServiceType.Monitor, "Monitor"],
397
+ [ServiceType.Incident, "Incident"],
398
+ [ServiceType.Alert, "Alert"],
399
+ [ServiceType.ScheduledMaintenance, "Scheduled Maintenance"],
400
+ [ServiceType.ServiceLevelObjective, "SLO"],
401
+ [ServiceType.Unknown, "Service"],
402
+ ])("%s -> %s", (type: ServiceType, label: string) => {
403
+ expect(getTelemetryEntityTypeLabel(type)).toBe(label);
404
+ });
405
+
406
+ test("accepts the enum's string value", () => {
407
+ expect(getTelemetryEntityTypeLabel("RealUserMonitor")).toBe(
408
+ "RUM Application",
409
+ );
410
+ });
411
+
412
+ test.each([
413
+ ["null", null],
414
+ ["undefined", undefined],
415
+ ["empty string", ""],
416
+ ["unknown string", "NotAType"],
417
+ ["prototype key", "toString"],
418
+ ["prototype key __proto__", "__proto__"],
419
+ ["wrong case", "realusermonitor"],
420
+ ])(
421
+ "falls back to the default label for %s",
422
+ (_name: string, value: string | null | undefined) => {
423
+ expect(getTelemetryEntityTypeLabel(value)).toBe(
424
+ DEFAULT_TELEMETRY_ENTITY_LABEL,
425
+ );
426
+ },
427
+ );
428
+
429
+ test("the default label is Service so Service pages keep their chip key", () => {
430
+ expect(DEFAULT_TELEMETRY_ENTITY_LABEL).toBe("Service");
431
+ });
432
+ });
433
+
434
+ describe("getTelemetryEntityDisplay", () => {
435
+ const nameMap: TelemetryEntityNameMap = {
436
+ [RUM_ID]: {
437
+ id: RUM_ID,
438
+ name: "checkout-web",
439
+ entityType: ServiceType.RealUserMonitor,
440
+ typeLabel: "RUM Application",
441
+ },
442
+ [SERVICE_ID]: {
443
+ id: SERVICE_ID,
444
+ name: "checkout-api",
445
+ entityType: ServiceType.OpenTelemetry,
446
+ typeLabel: "Service",
447
+ },
448
+ };
449
+
450
+ test("resolved entity: key is the type label, value is the name", () => {
451
+ expect(getTelemetryEntityDisplay({ id: RUM_ID, nameMap })).toEqual({
452
+ key: "RUM Application",
453
+ value: "checkout-web",
454
+ });
455
+ });
456
+
457
+ test("resolved entity wins over caller fallbacks", () => {
458
+ expect(
459
+ getTelemetryEntityDisplay({
460
+ id: RUM_ID,
461
+ nameMap,
462
+ fallbackKey: "Service",
463
+ fallbackValue: "stale-name",
464
+ }),
465
+ ).toEqual({ key: "RUM Application", value: "checkout-web" });
466
+ });
467
+
468
+ test("resolved Service keeps the Service key", () => {
469
+ expect(
470
+ getTelemetryEntityDisplay({
471
+ id: SERVICE_ID,
472
+ nameMap,
473
+ fallbackKey: "Service",
474
+ }),
475
+ ).toEqual({ key: "Service", value: "checkout-api" });
476
+ });
477
+
478
+ test("resolved entity with a blank type label uses the fallback key", () => {
479
+ expect(
480
+ getTelemetryEntityDisplay({
481
+ id: HOST_ID,
482
+ nameMap: {
483
+ [HOST_ID]: {
484
+ id: HOST_ID,
485
+ name: "prod-db-1",
486
+ entityType: ServiceType.Host,
487
+ typeLabel: "",
488
+ },
489
+ },
490
+ fallbackKey: "Resource",
491
+ }),
492
+ ).toEqual({ key: "Resource", value: "prod-db-1" });
493
+ });
494
+
495
+ test("unresolved id: fallback key and fallback value", () => {
496
+ expect(
497
+ getTelemetryEntityDisplay({
498
+ id: MISSING_ID,
499
+ nameMap,
500
+ fallbackKey: "Service",
501
+ fallbackValue: "legacy-name",
502
+ }),
503
+ ).toEqual({ key: "Service", value: "legacy-name" });
504
+ });
505
+
506
+ test("unresolved id without fallbacks: default key and the raw id", () => {
507
+ expect(getTelemetryEntityDisplay({ id: MISSING_ID, nameMap })).toEqual({
508
+ key: DEFAULT_TELEMETRY_ENTITY_LABEL,
509
+ value: MISSING_ID,
510
+ });
511
+ });
512
+
513
+ test("undefined name map behaves like unresolved", () => {
514
+ expect(
515
+ getTelemetryEntityDisplay({ id: RUM_ID, nameMap: undefined }),
516
+ ).toEqual({ key: "Service", value: RUM_ID });
517
+ });
518
+
519
+ test("empty-string fallbacks are treated as absent", () => {
520
+ expect(
521
+ getTelemetryEntityDisplay({
522
+ id: MISSING_ID,
523
+ nameMap: {},
524
+ fallbackKey: "",
525
+ fallbackValue: "",
526
+ }),
527
+ ).toEqual({ key: DEFAULT_TELEMETRY_ENTITY_LABEL, value: MISSING_ID });
528
+ });
529
+ });
530
+
531
+ describe("TelemetryEntityNameResolver.resolve — inputs", () => {
532
+ test("empty id list returns {} without any request", async () => {
533
+ await expect(
534
+ TelemetryEntityNameResolver.resolve({ ids: [], projectId: PROJECT_ID }),
535
+ ).resolves.toEqual({});
536
+ expect(getListMock).not.toHaveBeenCalled();
537
+ });
538
+
539
+ test("blank, null and undefined ids are ignored", async () => {
540
+ await expect(
541
+ TelemetryEntityNameResolver.resolve({
542
+ ids: ["", " ", null, undefined],
543
+ projectId: PROJECT_ID,
544
+ }),
545
+ ).resolves.toEqual({});
546
+ expect(getListMock).not.toHaveBeenCalled();
547
+ });
548
+
549
+ test.each([
550
+ ["null", null],
551
+ ["undefined", undefined],
552
+ ["empty string", ""],
553
+ ])(
554
+ "missing projectId (%s) returns {} and issues no request",
555
+ async (_name: string, projectId: string | null | undefined) => {
556
+ await expect(
557
+ TelemetryEntityNameResolver.resolve({
558
+ ids: [SERVICE_ID, RUM_ID],
559
+ projectId,
560
+ }),
561
+ ).resolves.toEqual({});
562
+ expect(getListMock).not.toHaveBeenCalled();
563
+ },
564
+ );
565
+
566
+ test("accepts ObjectID instances for ids and projectId", async () => {
567
+ const result: TelemetryEntityNameMap =
568
+ await TelemetryEntityNameResolver.resolve({
569
+ ids: [new ObjectID(SERVICE_ID)],
570
+ projectId: new ObjectID(PROJECT_ID),
571
+ });
572
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
573
+ });
574
+
575
+ test("duplicate ids (strings, ObjectIDs, padded) are queried once", async () => {
576
+ await TelemetryEntityNameResolver.resolve({
577
+ ids: [SERVICE_ID, new ObjectID(SERVICE_ID), ` ${SERVICE_ID} `],
578
+ projectId: PROJECT_ID,
579
+ });
580
+ expect(issuedRequests()).toEqual([
581
+ { entityType: ServiceType.OpenTelemetry, ids: [SERVICE_ID] },
582
+ ]);
583
+ expect(argsOf(0).limit).toBe(1);
584
+ });
585
+
586
+ test("the projectId id resolves to Unknown Service without a request", async () => {
587
+ const result: TelemetryEntityNameMap =
588
+ await TelemetryEntityNameResolver.resolve({
589
+ ids: [PROJECT_ID],
590
+ projectId: PROJECT_ID,
591
+ });
592
+ expect(result).toEqual({
593
+ [PROJECT_ID]: {
594
+ id: PROJECT_ID,
595
+ name: UNKNOWN_SERVICE_NAME,
596
+ entityType: ServiceType.Unknown,
597
+ typeLabel: "Service",
598
+ },
599
+ });
600
+ expect(UNKNOWN_SERVICE_NAME).toBe("Unknown Service");
601
+ expect(getListMock).not.toHaveBeenCalled();
602
+ });
603
+
604
+ test("the projectId id is never sent to a table alongside real ids", async () => {
605
+ const result: TelemetryEntityNameMap =
606
+ await TelemetryEntityNameResolver.resolve({
607
+ ids: [PROJECT_ID, SERVICE_ID],
608
+ projectId: new ObjectID(PROJECT_ID),
609
+ });
610
+ expect(result[PROJECT_ID]?.name).toBe(UNKNOWN_SERVICE_NAME);
611
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
612
+ expect(issuedRequests()).toEqual([
613
+ { entityType: ServiceType.OpenTelemetry, ids: [SERVICE_ID] },
614
+ ]);
615
+ });
616
+ });
617
+
618
+ describe("TelemetryEntityNameResolver.resolve — query plan", () => {
619
+ test("Service ids resolve with a single Service request", async () => {
620
+ const result: TelemetryEntityNameMap =
621
+ await TelemetryEntityNameResolver.resolve({
622
+ ids: [SERVICE_ID_2, SERVICE_ID],
623
+ projectId: PROJECT_ID,
624
+ });
625
+ expect(result).toEqual({
626
+ [SERVICE_ID]: {
627
+ id: SERVICE_ID,
628
+ name: "checkout-api",
629
+ entityType: ServiceType.OpenTelemetry,
630
+ typeLabel: "Service",
631
+ },
632
+ [SERVICE_ID_2]: {
633
+ id: SERVICE_ID_2,
634
+ name: "payments-api",
635
+ entityType: ServiceType.OpenTelemetry,
636
+ typeLabel: "Service",
637
+ },
638
+ });
639
+ expect(getListMock).toHaveBeenCalledTimes(1);
640
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
641
+ });
642
+
643
+ test("query shape: projectId + Includes of sorted ids, limit, select with name fields", async () => {
644
+ await TelemetryEntityNameResolver.resolve({
645
+ ids: [SERVICE_ID_2, SERVICE_ID],
646
+ projectId: PROJECT_ID,
647
+ });
648
+ const args: GetListArgs = argsOf(0);
649
+ expect(args.modelType).toBe(Service);
650
+ expect(args.query.projectId).toBeInstanceOf(ObjectID);
651
+ expect(args.query.projectId.toString()).toBe(PROJECT_ID);
652
+ expect(args.query._id).toBeInstanceOf(Includes);
653
+ expect(includedIds(args.query._id)).toEqual([SERVICE_ID, SERVICE_ID_2]);
654
+ expect(args.limit).toBe(2);
655
+ expect(args.skip).toBe(0);
656
+ expect(args.select).toEqual({ _id: true, name: true });
657
+ expect(args.sort).toEqual({});
658
+ });
659
+
660
+ test("select includes every name fallback field of the queried table", async () => {
661
+ await TelemetryEntityNameResolver.resolve({
662
+ ids: [RUM_ID],
663
+ projectId: PROJECT_ID,
664
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
665
+ });
666
+ expect(argsOf(0).select).toEqual({
667
+ _id: true,
668
+ name: true,
669
+ appIdentifier: true,
670
+ });
671
+
672
+ getListMock.mockClear();
673
+ await TelemetryEntityNameResolver.resolve({
674
+ ids: [INCIDENT_ID],
675
+ projectId: PROJECT_ID,
676
+ typeHints: { [INCIDENT_ID]: ServiceType.Incident },
677
+ });
678
+ expect(argsOf(0).select).toEqual({ _id: true, title: true });
679
+ });
680
+
681
+ test("unresolved ids fan out after Service to every other table, in resolution order", async () => {
682
+ const result: TelemetryEntityNameMap =
683
+ await TelemetryEntityNameResolver.resolve({
684
+ ids: [SERVICE_ID, RUM_ID, HOST_ID],
685
+ projectId: PROJECT_ID,
686
+ });
687
+
688
+ expect(result[SERVICE_ID]).toMatchObject({
689
+ name: "checkout-api",
690
+ entityType: ServiceType.OpenTelemetry,
691
+ typeLabel: "Service",
692
+ });
693
+ expect(result[RUM_ID]).toEqual({
694
+ id: RUM_ID,
695
+ name: "checkout-web",
696
+ entityType: ServiceType.RealUserMonitor,
697
+ typeLabel: "RUM Application",
698
+ });
699
+ expect(result[HOST_ID]).toEqual({
700
+ id: HOST_ID,
701
+ name: "prod-db-1",
702
+ entityType: ServiceType.Host,
703
+ typeLabel: "Host",
704
+ });
705
+
706
+ const requests: Array<IssuedRequest> = issuedRequests();
707
+ // Service first with every id…
708
+ expect(requests[0]).toEqual({
709
+ entityType: ServiceType.OpenTelemetry,
710
+ ids: [SERVICE_ID, RUM_ID, HOST_ID].sort(),
711
+ });
712
+ // …then every other table, with only what Service did not resolve.
713
+ expect(
714
+ requests.slice(1).map((request: IssuedRequest): ServiceType => {
715
+ return request.entityType;
716
+ }),
717
+ ).toEqual(TELEMETRY_ENTITY_RESOLUTION_ORDER.slice(1));
718
+ for (const request of requests.slice(1)) {
719
+ expect(request.ids).toEqual([RUM_ID, HOST_ID].sort());
720
+ }
721
+ expect(argsOf(1).limit).toBe(2);
722
+ });
723
+
724
+ test("the fan-out waits for Service, then runs the other tables in parallel", async () => {
725
+ const serviceResponse: Deferred<{ data: Array<FakeRow> }> = deferred();
726
+ const rumResponse: Deferred<{ data: Array<FakeRow> }> = deferred();
727
+
728
+ getListMock.mockImplementation((...callArgs: Array<unknown>) => {
729
+ const args: GetListArgs = callArgs[0] as GetListArgs;
730
+ const type: ServiceType = entityTypeForModel(args.modelType);
731
+ if (type === ServiceType.OpenTelemetry) {
732
+ return serviceResponse.promise;
733
+ }
734
+ if (type === ServiceType.RealUserMonitor) {
735
+ return rumResponse.promise;
736
+ }
737
+ return fakeGetList(args);
738
+ });
739
+
740
+ const pending: Promise<TelemetryEntityNameMap> =
741
+ TelemetryEntityNameResolver.resolve({
742
+ ids: [RUM_ID],
743
+ projectId: PROJECT_ID,
744
+ });
745
+
746
+ await flushPromises();
747
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
748
+
749
+ serviceResponse.resolve({ data: [] });
750
+ await flushPromises();
751
+
752
+ // Every other table has been asked although RUM has not answered yet.
753
+ expect(requestedTypes()).toEqual(TELEMETRY_ENTITY_RESOLUTION_ORDER);
754
+
755
+ rumResponse.resolve({ data: [row(RUM_ID, { name: "checkout-web" })] });
756
+ const result: TelemetryEntityNameMap = await pending;
757
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
758
+ });
759
+
760
+ test("an id that exists nowhere is simply absent from the result", async () => {
761
+ const result: TelemetryEntityNameMap =
762
+ await TelemetryEntityNameResolver.resolve({
763
+ ids: [MISSING_ID, SERVICE_ID],
764
+ projectId: PROJECT_ID,
765
+ });
766
+ expect(Object.keys(result)).toEqual([SERVICE_ID]);
767
+ expect(getListMock).toHaveBeenCalledTimes(
768
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
769
+ );
770
+ });
771
+
772
+ test("results only contain requested ids even if a table returns extra rows", async () => {
773
+ getListMock.mockImplementation((...callArgs: Array<unknown>) => {
774
+ const args: GetListArgs = callArgs[0] as GetListArgs;
775
+ const type: ServiceType = entityTypeForModel(args.modelType);
776
+ // A misbehaving backend that ignores the _id filter.
777
+ return Promise.resolve({ data: tables[type] || [] });
778
+ });
779
+
780
+ const result: TelemetryEntityNameMap =
781
+ await TelemetryEntityNameResolver.resolve({
782
+ ids: [SERVICE_ID],
783
+ projectId: PROJECT_ID,
784
+ });
785
+ expect(Object.keys(result)).toEqual([SERVICE_ID]);
786
+ });
787
+
788
+ test("a row without an id is ignored", async () => {
789
+ getListMock.mockResolvedValue({
790
+ data: [{ id: null, name: "ghost" }, row(SERVICE_ID, { name: "real" })],
791
+ });
792
+ const result: TelemetryEntityNameMap =
793
+ await TelemetryEntityNameResolver.resolve({
794
+ ids: [SERVICE_ID],
795
+ projectId: PROJECT_ID,
796
+ });
797
+ expect(result).toEqual({
798
+ [SERVICE_ID]: {
799
+ id: SERVICE_ID,
800
+ name: "real",
801
+ entityType: ServiceType.OpenTelemetry,
802
+ typeLabel: "Service",
803
+ },
804
+ });
805
+ });
806
+
807
+ test("a response without data is treated as empty", async () => {
808
+ getListMock.mockResolvedValue({});
809
+ await expect(
810
+ TelemetryEntityNameResolver.resolve({
811
+ ids: [SERVICE_ID],
812
+ projectId: PROJECT_ID,
813
+ entityTypes: [ServiceType.OpenTelemetry],
814
+ }),
815
+ ).resolves.toEqual({});
816
+ });
817
+
818
+ test("works with real model instances, not just plain rows", async () => {
819
+ const app: RumApplication = new RumApplication();
820
+ app._id = RUM_ID;
821
+ app.name = "checkout-web";
822
+ tables[ServiceType.RealUserMonitor] = [app as unknown as FakeRow];
823
+
824
+ const host: Host = new Host();
825
+ host._id = HOST_ID;
826
+ host.hostIdentifier = "ip-10-0-0-1";
827
+ tables[ServiceType.Host] = [host as unknown as FakeRow];
828
+
829
+ const result: TelemetryEntityNameMap =
830
+ await TelemetryEntityNameResolver.resolve({
831
+ ids: [RUM_ID, HOST_ID],
832
+ projectId: PROJECT_ID,
833
+ });
834
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
835
+ expect(result[HOST_ID]?.name).toBe("ip-10-0-0-1");
836
+ });
837
+ });
838
+
839
+ describe("TelemetryEntityNameResolver.resolve — typeHints", () => {
840
+ test("a hinted RUM id is resolved with exactly one RumApplication request", async () => {
841
+ const result: TelemetryEntityNameMap =
842
+ await TelemetryEntityNameResolver.resolve({
843
+ ids: [RUM_ID],
844
+ projectId: PROJECT_ID,
845
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
846
+ });
847
+ expect(result).toEqual({
848
+ [RUM_ID]: {
849
+ id: RUM_ID,
850
+ name: "checkout-web",
851
+ entityType: ServiceType.RealUserMonitor,
852
+ typeLabel: "RUM Application",
853
+ },
854
+ });
855
+ expect(issuedRequests()).toEqual([
856
+ { entityType: ServiceType.RealUserMonitor, ids: [RUM_ID] },
857
+ ]);
858
+ });
859
+
860
+ test("hinted ids are grouped per table; unhinted ids still go Service-first", async () => {
861
+ const result: TelemetryEntityNameMap =
862
+ await TelemetryEntityNameResolver.resolve({
863
+ ids: [RUM_ID, HOST_ID, SERVICE_ID],
864
+ projectId: PROJECT_ID,
865
+ typeHints: {
866
+ [RUM_ID]: ServiceType.RealUserMonitor,
867
+ [HOST_ID]: ServiceType.Host,
868
+ },
869
+ });
870
+ expect(result[RUM_ID]?.typeLabel).toBe("RUM Application");
871
+ expect(result[HOST_ID]?.typeLabel).toBe("Host");
872
+ expect(result[SERVICE_ID]?.typeLabel).toBe("Service");
873
+
874
+ const requests: Array<IssuedRequest> = issuedRequests();
875
+ expect(requests).toHaveLength(3);
876
+ // The hinted requests are issued together, before the Service pass.
877
+ expect(
878
+ requests
879
+ .slice(0, 2)
880
+ .map((request: IssuedRequest): string => {
881
+ return request.entityType;
882
+ })
883
+ .sort(),
884
+ ).toEqual([ServiceType.Host, ServiceType.RealUserMonitor].sort());
885
+ expect(requests).toContainEqual({
886
+ entityType: ServiceType.RealUserMonitor,
887
+ ids: [RUM_ID],
888
+ });
889
+ expect(requests).toContainEqual({
890
+ entityType: ServiceType.Host,
891
+ ids: [HOST_ID],
892
+ });
893
+ expect(requests[2]).toEqual({
894
+ entityType: ServiceType.OpenTelemetry,
895
+ ids: [SERVICE_ID],
896
+ });
897
+ });
898
+
899
+ test("several ids hinted to the same table share one request", async () => {
900
+ tables[ServiceType.OpenTelemetry] = [
901
+ row(SERVICE_ID, { name: "a" }),
902
+ row(SERVICE_ID_2, { name: "b" }),
903
+ ];
904
+ await TelemetryEntityNameResolver.resolve({
905
+ ids: [SERVICE_ID, SERVICE_ID_2],
906
+ projectId: PROJECT_ID,
907
+ typeHints: {
908
+ [SERVICE_ID]: ServiceType.OpenTelemetry,
909
+ [SERVICE_ID_2]: ServiceType.OpenTelemetry,
910
+ },
911
+ });
912
+ expect(issuedRequests()).toEqual([
913
+ {
914
+ entityType: ServiceType.OpenTelemetry,
915
+ ids: [SERVICE_ID, SERVICE_ID_2],
916
+ },
917
+ ]);
918
+ });
919
+
920
+ test("a hinted id that misses its table falls through to the general pass", async () => {
921
+ // Hinted as RUM, but it is actually a Host.
922
+ const result: TelemetryEntityNameMap =
923
+ await TelemetryEntityNameResolver.resolve({
924
+ ids: [HOST_ID],
925
+ projectId: PROJECT_ID,
926
+ typeHints: { [HOST_ID]: ServiceType.RealUserMonitor },
927
+ });
928
+ expect(result[HOST_ID]).toEqual({
929
+ id: HOST_ID,
930
+ name: "prod-db-1",
931
+ entityType: ServiceType.Host,
932
+ typeLabel: "Host",
933
+ });
934
+ const types: Array<ServiceType> = requestedTypes();
935
+ expect(types[0]).toBe(ServiceType.RealUserMonitor);
936
+ expect(types[1]).toBe(ServiceType.OpenTelemetry);
937
+ expect(types).toContain(ServiceType.Host);
938
+ });
939
+
940
+ test("a hinted id that misses is never asked of its hinted table again", async () => {
941
+ await TelemetryEntityNameResolver.resolve({
942
+ ids: [HOST_ID, MISSING_ID],
943
+ projectId: PROJECT_ID,
944
+ typeHints: { [HOST_ID]: ServiceType.RealUserMonitor },
945
+ });
946
+ const rumRequests: Array<IssuedRequest> = issuedRequests().filter(
947
+ (request: IssuedRequest): boolean => {
948
+ return request.entityType === ServiceType.RealUserMonitor;
949
+ },
950
+ );
951
+ // One hinted request for HOST_ID, one fan-out request for MISSING_ID only.
952
+ expect(rumRequests).toEqual([
953
+ { entityType: ServiceType.RealUserMonitor, ids: [HOST_ID] },
954
+ { entityType: ServiceType.RealUserMonitor, ids: [MISSING_ID] },
955
+ ]);
956
+ });
957
+
958
+ test("a hinted Service id that misses skips the Service pass for that id", async () => {
959
+ await TelemetryEntityNameResolver.resolve({
960
+ ids: [RUM_ID],
961
+ projectId: PROJECT_ID,
962
+ typeHints: { [RUM_ID]: ServiceType.OpenTelemetry },
963
+ });
964
+ const serviceRequests: Array<IssuedRequest> = issuedRequests().filter(
965
+ (request: IssuedRequest): boolean => {
966
+ return request.entityType === ServiceType.OpenTelemetry;
967
+ },
968
+ );
969
+ expect(serviceRequests).toEqual([
970
+ { entityType: ServiceType.OpenTelemetry, ids: [RUM_ID] },
971
+ ]);
972
+ expect(requestedTypes()).toContain(ServiceType.RealUserMonitor);
973
+ });
974
+
975
+ test("a hinted id whose table fails falls through to the general pass", async () => {
976
+ failingTypes.add(ServiceType.KubernetesCluster);
977
+ tables[ServiceType.OpenTelemetry] = [
978
+ row(CLUSTER_ID, { name: "actually-a-service" }),
979
+ ];
980
+ const result: TelemetryEntityNameMap =
981
+ await TelemetryEntityNameResolver.resolve({
982
+ ids: [CLUSTER_ID],
983
+ projectId: PROJECT_ID,
984
+ typeHints: { [CLUSTER_ID]: ServiceType.KubernetesCluster },
985
+ });
986
+ expect(result[CLUSTER_ID]).toMatchObject({
987
+ name: "actually-a-service",
988
+ entityType: ServiceType.OpenTelemetry,
989
+ });
990
+ });
991
+
992
+ test("hints outside the allowed entityTypes are ignored", async () => {
993
+ const result: TelemetryEntityNameMap =
994
+ await TelemetryEntityNameResolver.resolve({
995
+ ids: [RUM_ID],
996
+ projectId: PROJECT_ID,
997
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
998
+ entityTypes: [ServiceType.OpenTelemetry],
999
+ });
1000
+ expect(result).toEqual({});
1001
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
1002
+ });
1003
+
1004
+ test("undefined hints and hints for ids not requested are ignored", async () => {
1005
+ await TelemetryEntityNameResolver.resolve({
1006
+ ids: [SERVICE_ID],
1007
+ projectId: PROJECT_ID,
1008
+ typeHints: {
1009
+ [SERVICE_ID]: undefined,
1010
+ [RUM_ID]: ServiceType.RealUserMonitor,
1011
+ },
1012
+ });
1013
+ expect(issuedRequests()).toEqual([
1014
+ { entityType: ServiceType.OpenTelemetry, ids: [SERVICE_ID] },
1015
+ ]);
1016
+ });
1017
+
1018
+ test("an Unknown hint never queries a table", async () => {
1019
+ const result: TelemetryEntityNameMap =
1020
+ await TelemetryEntityNameResolver.resolve({
1021
+ ids: [PROJECT_ID],
1022
+ projectId: PROJECT_ID,
1023
+ typeHints: { [PROJECT_ID]: ServiceType.Unknown },
1024
+ });
1025
+ expect(result[PROJECT_ID]?.name).toBe(UNKNOWN_SERVICE_NAME);
1026
+ expect(getListMock).not.toHaveBeenCalled();
1027
+ });
1028
+ });
1029
+
1030
+ describe("TelemetryEntityNameResolver.resolve — entityTypes restriction", () => {
1031
+ test("Service-only never queries RumApplication (or any other table)", async () => {
1032
+ const result: TelemetryEntityNameMap =
1033
+ await TelemetryEntityNameResolver.resolve({
1034
+ ids: [SERVICE_ID, RUM_ID],
1035
+ projectId: PROJECT_ID,
1036
+ entityTypes: [ServiceType.OpenTelemetry],
1037
+ });
1038
+ expect(Object.keys(result)).toEqual([SERVICE_ID]);
1039
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
1040
+ });
1041
+
1042
+ test("a cached RUM entity is not returned to a Service-only caller", async () => {
1043
+ await TelemetryEntityNameResolver.resolve({
1044
+ ids: [RUM_ID],
1045
+ projectId: PROJECT_ID,
1046
+ });
1047
+ getListMock.mockClear();
1048
+
1049
+ const serviceOnly: TelemetryEntityNameMap =
1050
+ await TelemetryEntityNameResolver.resolve({
1051
+ ids: [RUM_ID],
1052
+ projectId: PROJECT_ID,
1053
+ entityTypes: [ServiceType.OpenTelemetry],
1054
+ });
1055
+ expect(serviceOnly).toEqual({});
1056
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
1057
+
1058
+ // The unrestricted caller still gets it from cache.
1059
+ getListMock.mockClear();
1060
+ const unrestricted: TelemetryEntityNameMap =
1061
+ await TelemetryEntityNameResolver.resolve({
1062
+ ids: [RUM_ID],
1063
+ projectId: PROJECT_ID,
1064
+ });
1065
+ expect(unrestricted[RUM_ID]?.name).toBe("checkout-web");
1066
+ expect(getListMock).not.toHaveBeenCalled();
1067
+ });
1068
+
1069
+ test("the first allowed type (in resolution order) is queried first, the rest in parallel", async () => {
1070
+ // Given out of order on purpose.
1071
+ const result: TelemetryEntityNameMap =
1072
+ await TelemetryEntityNameResolver.resolve({
1073
+ ids: [HOST_ID],
1074
+ projectId: PROJECT_ID,
1075
+ entityTypes: [ServiceType.Host, ServiceType.RealUserMonitor],
1076
+ });
1077
+ expect(result[HOST_ID]?.name).toBe("prod-db-1");
1078
+ expect(requestedTypes()).toEqual([
1079
+ ServiceType.RealUserMonitor,
1080
+ ServiceType.Host,
1081
+ ]);
1082
+ });
1083
+
1084
+ test("a single non-Service type issues exactly one request", async () => {
1085
+ await TelemetryEntityNameResolver.resolve({
1086
+ ids: [MISSING_ID],
1087
+ projectId: PROJECT_ID,
1088
+ entityTypes: [ServiceType.KubernetesCluster],
1089
+ });
1090
+ expect(requestedTypes()).toEqual([ServiceType.KubernetesCluster]);
1091
+ });
1092
+
1093
+ test("an empty entityTypes array means no restriction", async () => {
1094
+ const result: TelemetryEntityNameMap =
1095
+ await TelemetryEntityNameResolver.resolve({
1096
+ ids: [CLUSTER_ID],
1097
+ projectId: PROJECT_ID,
1098
+ entityTypes: [],
1099
+ });
1100
+ expect(result[CLUSTER_ID]?.typeLabel).toBe("Kubernetes Cluster");
1101
+ expect(getListMock).toHaveBeenCalledTimes(
1102
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
1103
+ );
1104
+ });
1105
+
1106
+ test("the Unknown bucket is available to Service-only callers", async () => {
1107
+ const result: TelemetryEntityNameMap =
1108
+ await TelemetryEntityNameResolver.resolve({
1109
+ ids: [PROJECT_ID],
1110
+ projectId: PROJECT_ID,
1111
+ entityTypes: [ServiceType.OpenTelemetry],
1112
+ });
1113
+ expect(result[PROJECT_ID]?.entityType).toBe(ServiceType.Unknown);
1114
+ });
1115
+
1116
+ test("entityTypes [Unknown] resolves the projectId only and queries nothing", async () => {
1117
+ const result: TelemetryEntityNameMap =
1118
+ await TelemetryEntityNameResolver.resolve({
1119
+ ids: [PROJECT_ID, SERVICE_ID],
1120
+ projectId: PROJECT_ID,
1121
+ entityTypes: [ServiceType.Unknown],
1122
+ });
1123
+ expect(Object.keys(result)).toEqual([PROJECT_ID]);
1124
+ expect(getListMock).not.toHaveBeenCalled();
1125
+ });
1126
+
1127
+ test("the Unknown bucket is not returned when neither Unknown nor Service is allowed", async () => {
1128
+ const result: TelemetryEntityNameMap =
1129
+ await TelemetryEntityNameResolver.resolve({
1130
+ ids: [PROJECT_ID],
1131
+ projectId: PROJECT_ID,
1132
+ entityTypes: [ServiceType.Host],
1133
+ });
1134
+ expect(result).toEqual({});
1135
+ });
1136
+ });
1137
+
1138
+ describe("TelemetryEntityNameResolver.resolve — failure isolation", () => {
1139
+ test("a failing Service table does not stop the fan-out", async () => {
1140
+ failingTypes.add(ServiceType.OpenTelemetry);
1141
+ const result: TelemetryEntityNameMap =
1142
+ await TelemetryEntityNameResolver.resolve({
1143
+ ids: [SERVICE_ID, RUM_ID],
1144
+ projectId: PROJECT_ID,
1145
+ });
1146
+ expect(result[SERVICE_ID]).toBeUndefined();
1147
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
1148
+ });
1149
+
1150
+ test("one failing table in the fan-out leaves the others resolved", async () => {
1151
+ failingTypes.add(ServiceType.RealUserMonitor);
1152
+ const result: TelemetryEntityNameMap =
1153
+ await TelemetryEntityNameResolver.resolve({
1154
+ ids: [SERVICE_ID, RUM_ID, HOST_ID, CLUSTER_ID, INCIDENT_ID],
1155
+ projectId: PROJECT_ID,
1156
+ });
1157
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
1158
+ expect(result[RUM_ID]).toBeUndefined();
1159
+ expect(result[HOST_ID]?.name).toBe("prod-db-1");
1160
+ expect(result[CLUSTER_ID]?.name).toBe("prod-eu-west");
1161
+ expect(result[INCIDENT_ID]?.name).toBe("API is down");
1162
+ });
1163
+
1164
+ test("a synchronous throw from getList is isolated as well", async () => {
1165
+ getListMock.mockImplementation((...callArgs: Array<unknown>) => {
1166
+ const args: GetListArgs = callArgs[0] as GetListArgs;
1167
+ if (entityTypeForModel(args.modelType) === ServiceType.Host) {
1168
+ throw new Error("boom");
1169
+ }
1170
+ return fakeGetList(args);
1171
+ });
1172
+ const result: TelemetryEntityNameMap =
1173
+ await TelemetryEntityNameResolver.resolve({
1174
+ ids: [HOST_ID, CLUSTER_ID],
1175
+ projectId: PROJECT_ID,
1176
+ });
1177
+ expect(result[HOST_ID]).toBeUndefined();
1178
+ expect(result[CLUSTER_ID]?.name).toBe("prod-eu-west");
1179
+ });
1180
+
1181
+ test("every table failing resolves to {} instead of rejecting", async () => {
1182
+ getListMock.mockRejectedValue(new Error("offline"));
1183
+ await expect(
1184
+ TelemetryEntityNameResolver.resolve({
1185
+ ids: [SERVICE_ID, RUM_ID],
1186
+ projectId: PROJECT_ID,
1187
+ }),
1188
+ ).resolves.toEqual({});
1189
+ });
1190
+
1191
+ test("failures are only remembered briefly: the call after the miss TTL retries", async () => {
1192
+ /*
1193
+ * A failed table leaves its ids in the short-lived miss cache (so a
1194
+ * live view does not hammer a table the role cannot read), but never
1195
+ * as a hit: once the miss TTL passes the lookup is retried.
1196
+ */
1197
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1198
+ failingTypes.add(ServiceType.OpenTelemetry);
1199
+ await TelemetryEntityNameResolver.resolve({
1200
+ ids: [SERVICE_ID],
1201
+ projectId: PROJECT_ID,
1202
+ entityTypes: [ServiceType.OpenTelemetry],
1203
+ });
1204
+ failingTypes.clear();
1205
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1206
+ const result: TelemetryEntityNameMap =
1207
+ await TelemetryEntityNameResolver.resolve({
1208
+ ids: [SERVICE_ID],
1209
+ projectId: PROJECT_ID,
1210
+ entityTypes: [ServiceType.OpenTelemetry],
1211
+ });
1212
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
1213
+ expect(getListMock).toHaveBeenCalledTimes(2);
1214
+ });
1215
+ });
1216
+
1217
+ describe("TelemetryEntityNameResolver.resolve — name fields", () => {
1218
+ test("RumApplication without a name falls back to appIdentifier", async () => {
1219
+ tables[ServiceType.RealUserMonitor] = [
1220
+ row(RUM_ID, { name: undefined, appIdentifier: "checkout-web-prod" }),
1221
+ ];
1222
+ const result: TelemetryEntityNameMap =
1223
+ await TelemetryEntityNameResolver.resolve({
1224
+ ids: [RUM_ID],
1225
+ projectId: PROJECT_ID,
1226
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
1227
+ });
1228
+ expect(result[RUM_ID]).toEqual({
1229
+ id: RUM_ID,
1230
+ name: "checkout-web-prod",
1231
+ entityType: ServiceType.RealUserMonitor,
1232
+ typeLabel: "RUM Application",
1233
+ });
1234
+ });
1235
+
1236
+ test("Host without a name falls back to hostIdentifier", async () => {
1237
+ tables[ServiceType.Host] = [
1238
+ row(HOST_ID, { name: null, hostIdentifier: "ip-10-0-0-12" }),
1239
+ ];
1240
+ const result: TelemetryEntityNameMap =
1241
+ await TelemetryEntityNameResolver.resolve({
1242
+ ids: [HOST_ID],
1243
+ projectId: PROJECT_ID,
1244
+ typeHints: { [HOST_ID]: ServiceType.Host },
1245
+ });
1246
+ expect(result[HOST_ID]?.name).toBe("ip-10-0-0-12");
1247
+ });
1248
+
1249
+ test("KubernetesCluster without a name falls back to clusterIdentifier", async () => {
1250
+ tables[ServiceType.KubernetesCluster] = [
1251
+ row(CLUSTER_ID, { clusterIdentifier: "eks-prod" }),
1252
+ ];
1253
+ const result: TelemetryEntityNameMap =
1254
+ await TelemetryEntityNameResolver.resolve({
1255
+ ids: [CLUSTER_ID],
1256
+ projectId: PROJECT_ID,
1257
+ typeHints: { [CLUSTER_ID]: ServiceType.KubernetesCluster },
1258
+ });
1259
+ expect(result[CLUSTER_ID]?.name).toBe("eks-prod");
1260
+ });
1261
+
1262
+ test("a blank name is skipped in favour of the next field", async () => {
1263
+ tables[ServiceType.RealUserMonitor] = [
1264
+ row(RUM_ID, { name: " ", appIdentifier: "web-app" }),
1265
+ ];
1266
+ const result: TelemetryEntityNameMap =
1267
+ await TelemetryEntityNameResolver.resolve({
1268
+ ids: [RUM_ID],
1269
+ projectId: PROJECT_ID,
1270
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
1271
+ });
1272
+ expect(result[RUM_ID]?.name).toBe("web-app");
1273
+ });
1274
+
1275
+ test("the name wins over the fallback field when both are present", async () => {
1276
+ tables[ServiceType.Host] = [
1277
+ row(HOST_ID, { name: "Primary DB", hostIdentifier: "ip-10-0-0-12" }),
1278
+ ];
1279
+ const result: TelemetryEntityNameMap =
1280
+ await TelemetryEntityNameResolver.resolve({
1281
+ ids: [HOST_ID],
1282
+ projectId: PROJECT_ID,
1283
+ typeHints: { [HOST_ID]: ServiceType.Host },
1284
+ });
1285
+ expect(result[HOST_ID]?.name).toBe("Primary DB");
1286
+ });
1287
+
1288
+ test("names are trimmed", async () => {
1289
+ tables[ServiceType.OpenTelemetry] = [
1290
+ row(SERVICE_ID, { name: " checkout-api \n" }),
1291
+ ];
1292
+ const result: TelemetryEntityNameMap =
1293
+ await TelemetryEntityNameResolver.resolve({
1294
+ ids: [SERVICE_ID],
1295
+ projectId: PROJECT_ID,
1296
+ });
1297
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
1298
+ });
1299
+
1300
+ test("a row with no usable name in any field is not resolved (and not cached as a hit)", async () => {
1301
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1302
+ tables[ServiceType.OpenTelemetry] = [row(SERVICE_ID, { name: "" })];
1303
+ const first: TelemetryEntityNameMap =
1304
+ await TelemetryEntityNameResolver.resolve({
1305
+ ids: [SERVICE_ID],
1306
+ projectId: PROJECT_ID,
1307
+ entityTypes: [ServiceType.OpenTelemetry],
1308
+ });
1309
+ expect(first).toEqual({});
1310
+
1311
+ tables[ServiceType.OpenTelemetry] = [row(SERVICE_ID, { name: "renamed" })];
1312
+ // Past the (short) miss TTL, but well inside the hit TTL.
1313
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1314
+ const second: TelemetryEntityNameMap =
1315
+ await TelemetryEntityNameResolver.resolve({
1316
+ ids: [SERVICE_ID],
1317
+ projectId: PROJECT_ID,
1318
+ entityTypes: [ServiceType.OpenTelemetry],
1319
+ });
1320
+ expect(second[SERVICE_ID]?.name).toBe("renamed");
1321
+ });
1322
+
1323
+ test("Incident is named by its title, not a name column", async () => {
1324
+ tables[ServiceType.Incident] = [
1325
+ row(INCIDENT_ID, { name: "ignored", title: "Checkout latency spike" }),
1326
+ ];
1327
+ const result: TelemetryEntityNameMap =
1328
+ await TelemetryEntityNameResolver.resolve({
1329
+ ids: [INCIDENT_ID],
1330
+ projectId: PROJECT_ID,
1331
+ typeHints: { [INCIDENT_ID]: ServiceType.Incident },
1332
+ });
1333
+ expect(result[INCIDENT_ID]).toEqual({
1334
+ id: INCIDENT_ID,
1335
+ name: "Checkout latency spike",
1336
+ entityType: ServiceType.Incident,
1337
+ typeLabel: "Incident",
1338
+ });
1339
+ });
1340
+
1341
+ test("non-string names are stringified", async () => {
1342
+ tables[ServiceType.OpenTelemetry] = [row(SERVICE_ID, { name: 42 })];
1343
+ const result: TelemetryEntityNameMap =
1344
+ await TelemetryEntityNameResolver.resolve({
1345
+ ids: [SERVICE_ID],
1346
+ projectId: PROJECT_ID,
1347
+ });
1348
+ expect(result[SERVICE_ID]?.name).toBe("42");
1349
+ });
1350
+ });
1351
+
1352
+ describe("TelemetryEntityNameResolver — cache", () => {
1353
+ test("a cache hit avoids a second request", async () => {
1354
+ const first: TelemetryEntityNameMap =
1355
+ await TelemetryEntityNameResolver.resolve({
1356
+ ids: [SERVICE_ID, RUM_ID],
1357
+ projectId: PROJECT_ID,
1358
+ });
1359
+ const requestsAfterFirst: number = getListMock.mock.calls.length;
1360
+ expect(requestsAfterFirst).toBeGreaterThan(0);
1361
+
1362
+ const second: TelemetryEntityNameMap =
1363
+ await TelemetryEntityNameResolver.resolve({
1364
+ ids: [RUM_ID, SERVICE_ID],
1365
+ projectId: PROJECT_ID,
1366
+ });
1367
+ expect(second).toEqual(first);
1368
+ expect(getListMock.mock.calls.length).toBe(requestsAfterFirst);
1369
+ });
1370
+
1371
+ test("only the uncached ids are queried on a partial cache hit", async () => {
1372
+ await TelemetryEntityNameResolver.resolve({
1373
+ ids: [SERVICE_ID],
1374
+ projectId: PROJECT_ID,
1375
+ });
1376
+ getListMock.mockClear();
1377
+
1378
+ const result: TelemetryEntityNameMap =
1379
+ await TelemetryEntityNameResolver.resolve({
1380
+ ids: [SERVICE_ID, SERVICE_ID_2],
1381
+ projectId: PROJECT_ID,
1382
+ });
1383
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
1384
+ expect(result[SERVICE_ID_2]?.name).toBe("payments-api");
1385
+ expect(issuedRequests()).toEqual([
1386
+ { entityType: ServiceType.OpenTelemetry, ids: [SERVICE_ID_2] },
1387
+ ]);
1388
+ });
1389
+
1390
+ test("a hint for a cached id does not trigger a request", async () => {
1391
+ await TelemetryEntityNameResolver.resolve({
1392
+ ids: [RUM_ID],
1393
+ projectId: PROJECT_ID,
1394
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
1395
+ });
1396
+ getListMock.mockClear();
1397
+ await TelemetryEntityNameResolver.resolve({
1398
+ ids: [RUM_ID],
1399
+ projectId: PROJECT_ID,
1400
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
1401
+ });
1402
+ expect(getListMock).not.toHaveBeenCalled();
1403
+ });
1404
+
1405
+ test("misses are only cached briefly, so a newly created resource resolves once the miss TTL passes", async () => {
1406
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1407
+ await TelemetryEntityNameResolver.resolve({
1408
+ ids: [MISSING_ID],
1409
+ projectId: PROJECT_ID,
1410
+ entityTypes: [ServiceType.OpenTelemetry],
1411
+ });
1412
+ tables[ServiceType.OpenTelemetry]!.push(
1413
+ row(MISSING_ID, { name: "brand-new" }),
1414
+ );
1415
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1416
+ const result: TelemetryEntityNameMap =
1417
+ await TelemetryEntityNameResolver.resolve({
1418
+ ids: [MISSING_ID],
1419
+ projectId: PROJECT_ID,
1420
+ entityTypes: [ServiceType.OpenTelemetry],
1421
+ });
1422
+ expect(result[MISSING_ID]?.name).toBe("brand-new");
1423
+ expect(getListMock).toHaveBeenCalledTimes(2);
1424
+ });
1425
+
1426
+ test("the cache is scoped per project", async () => {
1427
+ const otherProject: string = "9e1b6b0e-0000-4000-8000-000000000002";
1428
+ await TelemetryEntityNameResolver.resolve({
1429
+ ids: [SERVICE_ID],
1430
+ projectId: PROJECT_ID,
1431
+ });
1432
+ getListMock.mockClear();
1433
+ await TelemetryEntityNameResolver.resolve({
1434
+ ids: [SERVICE_ID],
1435
+ projectId: otherProject,
1436
+ entityTypes: [ServiceType.OpenTelemetry],
1437
+ });
1438
+ expect(getListMock).toHaveBeenCalledTimes(1);
1439
+ expect(argsOf(0).query.projectId.toString()).toBe(otherProject);
1440
+ });
1441
+
1442
+ test("clearCache forces a fresh request", async () => {
1443
+ await TelemetryEntityNameResolver.resolve({
1444
+ ids: [SERVICE_ID],
1445
+ projectId: PROJECT_ID,
1446
+ });
1447
+ TelemetryEntityNameResolver.clearCache();
1448
+ tables[ServiceType.OpenTelemetry] = [
1449
+ row(SERVICE_ID, { name: "checkout-api-renamed" }),
1450
+ ];
1451
+ const result: TelemetryEntityNameMap =
1452
+ await TelemetryEntityNameResolver.resolve({
1453
+ ids: [SERVICE_ID],
1454
+ projectId: PROJECT_ID,
1455
+ });
1456
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api-renamed");
1457
+ expect(getListMock).toHaveBeenCalledTimes(2);
1458
+ });
1459
+
1460
+ test("entries expire after the TTL (60s)", async () => {
1461
+ const start: number = 1_800_000_000_000;
1462
+ /*
1463
+ * Named structurally: jest.spyOn from @jest/globals returns jest-mock's
1464
+ * SpyInstance, which does not assign to the global jest.SpiedFunction.
1465
+ */
1466
+ const nowSpy: { mockReturnValue: (value: number) => unknown } = jest
1467
+ .spyOn(Date, "now")
1468
+ .mockReturnValue(start);
1469
+
1470
+ await TelemetryEntityNameResolver.resolve({
1471
+ ids: [SERVICE_ID],
1472
+ projectId: PROJECT_ID,
1473
+ });
1474
+ expect(getListMock).toHaveBeenCalledTimes(1);
1475
+
1476
+ nowSpy.mockReturnValue(start + 59 * 1000);
1477
+ await TelemetryEntityNameResolver.resolve({
1478
+ ids: [SERVICE_ID],
1479
+ projectId: PROJECT_ID,
1480
+ });
1481
+ expect(getListMock).toHaveBeenCalledTimes(1);
1482
+
1483
+ nowSpy.mockReturnValue(start + 61 * 1000);
1484
+ await TelemetryEntityNameResolver.resolve({
1485
+ ids: [SERVICE_ID],
1486
+ projectId: PROJECT_ID,
1487
+ });
1488
+ expect(getListMock).toHaveBeenCalledTimes(2);
1489
+ });
1490
+
1491
+ test("callers get the same entity values from cache as from the network", async () => {
1492
+ const fromNetwork: ResolvedTelemetryEntity | undefined = (
1493
+ await TelemetryEntityNameResolver.resolve({
1494
+ ids: [HOST_ID],
1495
+ projectId: PROJECT_ID,
1496
+ })
1497
+ )[HOST_ID];
1498
+ const fromCache: ResolvedTelemetryEntity | undefined = (
1499
+ await TelemetryEntityNameResolver.resolve({
1500
+ ids: [HOST_ID],
1501
+ projectId: PROJECT_ID,
1502
+ })
1503
+ )[HOST_ID];
1504
+ expect(fromCache).toEqual(fromNetwork);
1505
+ });
1506
+ });
1507
+
1508
+ describe("TelemetryEntityNameResolver — in-flight dedup", () => {
1509
+ test("concurrent identical calls share one set of requests", async () => {
1510
+ const results: Array<TelemetryEntityNameMap> = await Promise.all([
1511
+ TelemetryEntityNameResolver.resolve({
1512
+ ids: [SERVICE_ID, RUM_ID],
1513
+ projectId: PROJECT_ID,
1514
+ }),
1515
+ TelemetryEntityNameResolver.resolve({
1516
+ ids: [SERVICE_ID, RUM_ID],
1517
+ projectId: PROJECT_ID,
1518
+ }),
1519
+ // Same set in a different order, as ObjectIDs.
1520
+ TelemetryEntityNameResolver.resolve({
1521
+ ids: [new ObjectID(RUM_ID), new ObjectID(SERVICE_ID)],
1522
+ projectId: new ObjectID(PROJECT_ID),
1523
+ }),
1524
+ ]);
1525
+ expect(results[0]![RUM_ID]?.name).toBe("checkout-web");
1526
+ expect(results[0]![SERVICE_ID]?.name).toBe("checkout-api");
1527
+ expect(results[1]).toEqual(results[0]);
1528
+ expect(results[2]).toEqual(results[0]);
1529
+ expect(getListMock).toHaveBeenCalledTimes(
1530
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
1531
+ );
1532
+ expect(
1533
+ requestedTypes().filter((type: ServiceType): boolean => {
1534
+ return type === ServiceType.OpenTelemetry;
1535
+ }),
1536
+ ).toHaveLength(1);
1537
+ });
1538
+
1539
+ test("concurrent calls with different options are not merged", async () => {
1540
+ await Promise.all([
1541
+ TelemetryEntityNameResolver.resolve({
1542
+ ids: [RUM_ID],
1543
+ projectId: PROJECT_ID,
1544
+ entityTypes: [ServiceType.OpenTelemetry],
1545
+ }),
1546
+ TelemetryEntityNameResolver.resolve({
1547
+ ids: [RUM_ID],
1548
+ projectId: PROJECT_ID,
1549
+ typeHints: { [RUM_ID]: ServiceType.RealUserMonitor },
1550
+ }),
1551
+ ]);
1552
+ expect(requestedTypes().sort()).toEqual(
1553
+ [ServiceType.OpenTelemetry, ServiceType.RealUserMonitor].sort(),
1554
+ );
1555
+ });
1556
+
1557
+ test("once a call settles, the next identical call is served by the cache, not the stale promise", async () => {
1558
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1559
+ await TelemetryEntityNameResolver.resolve({
1560
+ ids: [MISSING_ID],
1561
+ projectId: PROJECT_ID,
1562
+ entityTypes: [ServiceType.OpenTelemetry],
1563
+ });
1564
+ tables[ServiceType.OpenTelemetry]!.push(
1565
+ row(MISSING_ID, { name: "appeared" }),
1566
+ );
1567
+ /*
1568
+ * Past the miss TTL the identical call must issue a new request; a
1569
+ * settled promise left in the in-flight map would replay the miss.
1570
+ */
1571
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1572
+ const result: TelemetryEntityNameMap =
1573
+ await TelemetryEntityNameResolver.resolve({
1574
+ ids: [MISSING_ID],
1575
+ projectId: PROJECT_ID,
1576
+ entityTypes: [ServiceType.OpenTelemetry],
1577
+ });
1578
+ expect(result[MISSING_ID]?.name).toBe("appeared");
1579
+ });
1580
+
1581
+ test("clearCache also drops in-flight entries", async () => {
1582
+ const serviceResponse: Deferred<{ data: Array<FakeRow> }> = deferred();
1583
+ getListMock.mockImplementationOnce(() => {
1584
+ return serviceResponse.promise;
1585
+ });
1586
+
1587
+ const stuck: Promise<TelemetryEntityNameMap> =
1588
+ TelemetryEntityNameResolver.resolve({
1589
+ ids: [SERVICE_ID],
1590
+ projectId: PROJECT_ID,
1591
+ entityTypes: [ServiceType.OpenTelemetry],
1592
+ });
1593
+ TelemetryEntityNameResolver.clearCache();
1594
+
1595
+ const fresh: TelemetryEntityNameMap =
1596
+ await TelemetryEntityNameResolver.resolve({
1597
+ ids: [SERVICE_ID],
1598
+ projectId: PROJECT_ID,
1599
+ entityTypes: [ServiceType.OpenTelemetry],
1600
+ });
1601
+ expect(fresh[SERVICE_ID]?.name).toBe("checkout-api");
1602
+ expect(getListMock).toHaveBeenCalledTimes(2);
1603
+
1604
+ serviceResponse.resolve({ data: [] });
1605
+ await expect(stuck).resolves.toEqual({});
1606
+ });
1607
+ });
1608
+
1609
+ describe("TelemetryEntityNameResolver — miss cache", () => {
1610
+ /*
1611
+ * An id that resolves nowhere (a deleted service still in retention, a
1612
+ * table the role cannot read) used to be searched across every table
1613
+ * each time a live view's id set changed. Misses are now remembered for
1614
+ * a short TTL, keyed by project + id + the tables that were searched.
1615
+ */
1616
+
1617
+ test("the miss TTL is positive and shorter than the hit TTL", () => {
1618
+ expect(MISS_CACHE_TTL_IN_MS).toBeGreaterThan(0);
1619
+ expect(MISS_CACHE_TTL_IN_MS).toBeLessThan(HIT_CACHE_TTL_IN_MS);
1620
+ });
1621
+
1622
+ test("an id that resolved nowhere is not searched again within the miss TTL", async () => {
1623
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1624
+ await expect(
1625
+ TelemetryEntityNameResolver.resolve({
1626
+ ids: [MISSING_ID],
1627
+ projectId: PROJECT_ID,
1628
+ }),
1629
+ ).resolves.toEqual({});
1630
+ expect(getListMock).toHaveBeenCalledTimes(
1631
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
1632
+ );
1633
+
1634
+ getListMock.mockClear();
1635
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS - 1);
1636
+ await expect(
1637
+ TelemetryEntityNameResolver.resolve({
1638
+ ids: [MISSING_ID],
1639
+ projectId: PROJECT_ID,
1640
+ }),
1641
+ ).resolves.toEqual({});
1642
+ expect(getListMock).not.toHaveBeenCalled();
1643
+ });
1644
+
1645
+ test("after the miss TTL the id is searched across every table again", async () => {
1646
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1647
+ await TelemetryEntityNameResolver.resolve({
1648
+ ids: [MISSING_ID],
1649
+ projectId: PROJECT_ID,
1650
+ });
1651
+ getListMock.mockClear();
1652
+
1653
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1654
+ await TelemetryEntityNameResolver.resolve({
1655
+ ids: [MISSING_ID],
1656
+ projectId: PROJECT_ID,
1657
+ });
1658
+ expect(requestedTypes()).toEqual(TELEMETRY_ENTITY_RESOLUTION_ORDER);
1659
+ for (const request of issuedRequests()) {
1660
+ expect(request.ids).toEqual([MISSING_ID]);
1661
+ }
1662
+ });
1663
+
1664
+ test("a remembered miss is left out of the next batch without holding back the other ids", async () => {
1665
+ freezeNow(START_TIME);
1666
+ await TelemetryEntityNameResolver.resolve({
1667
+ ids: [MISSING_ID],
1668
+ projectId: PROJECT_ID,
1669
+ });
1670
+ getListMock.mockClear();
1671
+
1672
+ const result: TelemetryEntityNameMap =
1673
+ await TelemetryEntityNameResolver.resolve({
1674
+ ids: [MISSING_ID, SERVICE_ID_2],
1675
+ projectId: PROJECT_ID,
1676
+ });
1677
+ expect(Object.keys(result)).toEqual([SERVICE_ID_2]);
1678
+ expect(result[SERVICE_ID_2]?.name).toBe("payments-api");
1679
+ expect(issuedRequests()).toEqual([
1680
+ { entityType: ServiceType.OpenTelemetry, ids: [SERVICE_ID_2] },
1681
+ ]);
1682
+ });
1683
+
1684
+ test("the miss key includes the allowed types: a Service-only miss does not block an unrestricted lookup", async () => {
1685
+ freezeNow(START_TIME);
1686
+ await expect(
1687
+ TelemetryEntityNameResolver.resolve({
1688
+ ids: [RUM_ID],
1689
+ projectId: PROJECT_ID,
1690
+ entityTypes: [ServiceType.OpenTelemetry],
1691
+ }),
1692
+ ).resolves.toEqual({});
1693
+ expect(requestedTypes()).toEqual([ServiceType.OpenTelemetry]);
1694
+
1695
+ // The same Service-only lookup is remembered…
1696
+ getListMock.mockClear();
1697
+ await TelemetryEntityNameResolver.resolve({
1698
+ ids: [RUM_ID],
1699
+ projectId: PROJECT_ID,
1700
+ entityTypes: [ServiceType.OpenTelemetry],
1701
+ });
1702
+ expect(getListMock).not.toHaveBeenCalled();
1703
+
1704
+ // …but a lookup allowed to search every table still finds the RUM app.
1705
+ getListMock.mockClear();
1706
+ const unrestricted: TelemetryEntityNameMap =
1707
+ await TelemetryEntityNameResolver.resolve({
1708
+ ids: [RUM_ID],
1709
+ projectId: PROJECT_ID,
1710
+ });
1711
+ expect(unrestricted[RUM_ID]).toEqual({
1712
+ id: RUM_ID,
1713
+ name: "checkout-web",
1714
+ entityType: ServiceType.RealUserMonitor,
1715
+ typeLabel: "RUM Application",
1716
+ });
1717
+ expect(requestsFor(ServiceType.RealUserMonitor)).toEqual([
1718
+ { entityType: ServiceType.RealUserMonitor, ids: [RUM_ID] },
1719
+ ]);
1720
+ });
1721
+
1722
+ test("misses are remembered per project", async () => {
1723
+ const otherProject: string = "9e1b6b0e-0000-4000-8000-000000000002";
1724
+ freezeNow(START_TIME);
1725
+ await TelemetryEntityNameResolver.resolve({
1726
+ ids: [MISSING_ID],
1727
+ projectId: PROJECT_ID,
1728
+ entityTypes: [ServiceType.OpenTelemetry],
1729
+ });
1730
+ getListMock.mockClear();
1731
+
1732
+ await TelemetryEntityNameResolver.resolve({
1733
+ ids: [MISSING_ID],
1734
+ projectId: otherProject,
1735
+ entityTypes: [ServiceType.OpenTelemetry],
1736
+ });
1737
+ expect(getListMock).toHaveBeenCalledTimes(1);
1738
+ expect(argsOf(0).query.projectId.toString()).toBe(otherProject);
1739
+ });
1740
+
1741
+ test("a hit that lands while a miss for the same lookup is remembered clears that miss", async () => {
1742
+ freezeNow(START_TIME);
1743
+ const plainResponse: Deferred<{ data: Array<FakeRow> }> = deferred();
1744
+ const hintedResponse: Deferred<{ data: Array<FakeRow> }> = deferred();
1745
+ getListMock
1746
+ .mockImplementationOnce(() => {
1747
+ return plainResponse.promise;
1748
+ })
1749
+ .mockImplementationOnce(() => {
1750
+ return hintedResponse.promise;
1751
+ });
1752
+
1753
+ /*
1754
+ * Two concurrent lookups over the same tables (so the same miss key)
1755
+ * that are not deduplicated because their hints differ.
1756
+ */
1757
+ const plain: Promise<TelemetryEntityNameMap> =
1758
+ TelemetryEntityNameResolver.resolve({
1759
+ ids: [MISSING_ID],
1760
+ projectId: PROJECT_ID,
1761
+ entityTypes: [ServiceType.OpenTelemetry],
1762
+ });
1763
+ const hinted: Promise<TelemetryEntityNameMap> =
1764
+ TelemetryEntityNameResolver.resolve({
1765
+ ids: [MISSING_ID],
1766
+ projectId: PROJECT_ID,
1767
+ entityTypes: [ServiceType.OpenTelemetry],
1768
+ typeHints: { [MISSING_ID]: ServiceType.OpenTelemetry },
1769
+ });
1770
+ await flushPromises();
1771
+ expect(getListMock).toHaveBeenCalledTimes(2);
1772
+
1773
+ plainResponse.resolve({ data: [] });
1774
+ await expect(plain).resolves.toEqual({});
1775
+ expect(
1776
+ missCacheKeys().filter((key: string): boolean => {
1777
+ return key.includes(MISSING_ID);
1778
+ }),
1779
+ ).toHaveLength(1);
1780
+
1781
+ hintedResponse.resolve({
1782
+ data: [row(MISSING_ID, { name: "just-created" })],
1783
+ });
1784
+ expect((await hinted)[MISSING_ID]?.name).toBe("just-created");
1785
+ expect(
1786
+ missCacheKeys().filter((key: string): boolean => {
1787
+ return key.includes(MISSING_ID);
1788
+ }),
1789
+ ).toEqual([]);
1790
+
1791
+ getListMock.mockClear();
1792
+ const again: TelemetryEntityNameMap =
1793
+ await TelemetryEntityNameResolver.resolve({
1794
+ ids: [MISSING_ID],
1795
+ projectId: PROJECT_ID,
1796
+ entityTypes: [ServiceType.OpenTelemetry],
1797
+ });
1798
+ expect(again[MISSING_ID]?.name).toBe("just-created");
1799
+ expect(getListMock).not.toHaveBeenCalled();
1800
+ });
1801
+
1802
+ test("a later hit after the miss TTL replaces the expired miss entry", async () => {
1803
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1804
+ await TelemetryEntityNameResolver.resolve({
1805
+ ids: [MISSING_ID],
1806
+ projectId: PROJECT_ID,
1807
+ });
1808
+ expect(missCacheKeys()).toHaveLength(1);
1809
+
1810
+ tables[ServiceType.Host]!.push(row(MISSING_ID, { name: "late-host" }));
1811
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1812
+ const result: TelemetryEntityNameMap =
1813
+ await TelemetryEntityNameResolver.resolve({
1814
+ ids: [MISSING_ID],
1815
+ projectId: PROJECT_ID,
1816
+ });
1817
+ expect(result[MISSING_ID]).toMatchObject({
1818
+ name: "late-host",
1819
+ entityType: ServiceType.Host,
1820
+ });
1821
+ expect(missCacheKeys()).toEqual([]);
1822
+ });
1823
+
1824
+ test("clearCache forgets misses", async () => {
1825
+ freezeNow(START_TIME);
1826
+ await TelemetryEntityNameResolver.resolve({
1827
+ ids: [MISSING_ID],
1828
+ projectId: PROJECT_ID,
1829
+ entityTypes: [ServiceType.OpenTelemetry],
1830
+ });
1831
+ tables[ServiceType.OpenTelemetry]!.push(
1832
+ row(MISSING_ID, { name: "brand-new" }),
1833
+ );
1834
+
1835
+ TelemetryEntityNameResolver.clearCache();
1836
+ expect(missCacheKeys()).toEqual([]);
1837
+
1838
+ // Same instant: only the cleared miss could have suppressed this.
1839
+ const result: TelemetryEntityNameMap =
1840
+ await TelemetryEntityNameResolver.resolve({
1841
+ ids: [MISSING_ID],
1842
+ projectId: PROJECT_ID,
1843
+ entityTypes: [ServiceType.OpenTelemetry],
1844
+ });
1845
+ expect(result[MISSING_ID]?.name).toBe("brand-new");
1846
+ expect(getListMock).toHaveBeenCalledTimes(2);
1847
+ });
1848
+
1849
+ test("ids left unresolved by a failing table are remembered too", async () => {
1850
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1851
+ failingTypes.add(ServiceType.RealUserMonitor);
1852
+ await expect(
1853
+ TelemetryEntityNameResolver.resolve({
1854
+ ids: [RUM_ID],
1855
+ projectId: PROJECT_ID,
1856
+ }),
1857
+ ).resolves.toEqual({});
1858
+ expect(requestedTypes()).toContain(ServiceType.RealUserMonitor);
1859
+
1860
+ getListMock.mockClear();
1861
+ failingTypes.clear();
1862
+ await expect(
1863
+ TelemetryEntityNameResolver.resolve({
1864
+ ids: [RUM_ID],
1865
+ projectId: PROJECT_ID,
1866
+ }),
1867
+ ).resolves.toEqual({});
1868
+ expect(getListMock).not.toHaveBeenCalled();
1869
+
1870
+ nowSpy.mockReturnValue(START_TIME + MISS_CACHE_TTL_IN_MS + 1);
1871
+ const result: TelemetryEntityNameMap =
1872
+ await TelemetryEntityNameResolver.resolve({
1873
+ ids: [RUM_ID],
1874
+ projectId: PROJECT_ID,
1875
+ });
1876
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
1877
+ });
1878
+
1879
+ test("a hinted id that resolved nowhere is remembered as well", async () => {
1880
+ freezeNow(START_TIME);
1881
+ await TelemetryEntityNameResolver.resolve({
1882
+ ids: [MISSING_ID],
1883
+ projectId: PROJECT_ID,
1884
+ typeHints: { [MISSING_ID]: ServiceType.RealUserMonitor },
1885
+ });
1886
+ expect(getListMock).toHaveBeenCalledTimes(
1887
+ TELEMETRY_ENTITY_RESOLUTION_ORDER.length,
1888
+ );
1889
+
1890
+ getListMock.mockClear();
1891
+ await TelemetryEntityNameResolver.resolve({
1892
+ ids: [MISSING_ID],
1893
+ projectId: PROJECT_ID,
1894
+ typeHints: { [MISSING_ID]: ServiceType.RealUserMonitor },
1895
+ });
1896
+ expect(getListMock).not.toHaveBeenCalled();
1897
+ });
1898
+ });
1899
+
1900
+ describe("TelemetryEntityNameResolver — expired hits", () => {
1901
+ /*
1902
+ * An expired hit already says which table the id lives in, so its
1903
+ * refresh goes straight there instead of probing Services and then every
1904
+ * other table again.
1905
+ */
1906
+
1907
+ test("an expired RUM hit is refreshed with exactly one RumApplication request and no Service request", async () => {
1908
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1909
+ await TelemetryEntityNameResolver.resolve({
1910
+ ids: [RUM_ID],
1911
+ projectId: PROJECT_ID,
1912
+ });
1913
+ getListMock.mockClear();
1914
+ tables[ServiceType.RealUserMonitor] = [
1915
+ row(RUM_ID, { name: "checkout-web-v2" }),
1916
+ ];
1917
+
1918
+ // Still fresh: served from cache with the old name.
1919
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS - 1);
1920
+ const fresh: TelemetryEntityNameMap =
1921
+ await TelemetryEntityNameResolver.resolve({
1922
+ ids: [RUM_ID],
1923
+ projectId: PROJECT_ID,
1924
+ });
1925
+ expect(fresh[RUM_ID]?.name).toBe("checkout-web");
1926
+ expect(getListMock).not.toHaveBeenCalled();
1927
+
1928
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
1929
+ const refreshed: TelemetryEntityNameMap =
1930
+ await TelemetryEntityNameResolver.resolve({
1931
+ ids: [RUM_ID],
1932
+ projectId: PROJECT_ID,
1933
+ });
1934
+ expect(refreshed[RUM_ID]).toEqual({
1935
+ id: RUM_ID,
1936
+ name: "checkout-web-v2",
1937
+ entityType: ServiceType.RealUserMonitor,
1938
+ typeLabel: "RUM Application",
1939
+ });
1940
+ expect(issuedRequests()).toEqual([
1941
+ { entityType: ServiceType.RealUserMonitor, ids: [RUM_ID] },
1942
+ ]);
1943
+ });
1944
+
1945
+ test("expired hits in several tables refresh in one request per table, with no fan-out", async () => {
1946
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1947
+ await TelemetryEntityNameResolver.resolve({
1948
+ ids: [SERVICE_ID, RUM_ID, HOST_ID],
1949
+ projectId: PROJECT_ID,
1950
+ });
1951
+ getListMock.mockClear();
1952
+
1953
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
1954
+ const result: TelemetryEntityNameMap =
1955
+ await TelemetryEntityNameResolver.resolve({
1956
+ ids: [SERVICE_ID, RUM_ID, HOST_ID],
1957
+ projectId: PROJECT_ID,
1958
+ });
1959
+ expect(Object.keys(result).sort()).toEqual(
1960
+ [SERVICE_ID, RUM_ID, HOST_ID].sort(),
1961
+ );
1962
+ const requests: Array<IssuedRequest> = issuedRequests();
1963
+ expect(requests).toHaveLength(3);
1964
+ expect(requests).toContainEqual({
1965
+ entityType: ServiceType.OpenTelemetry,
1966
+ ids: [SERVICE_ID],
1967
+ });
1968
+ expect(requests).toContainEqual({
1969
+ entityType: ServiceType.RealUserMonitor,
1970
+ ids: [RUM_ID],
1971
+ });
1972
+ expect(requests).toContainEqual({
1973
+ entityType: ServiceType.Host,
1974
+ ids: [HOST_ID],
1975
+ });
1976
+ });
1977
+
1978
+ test("an expired hit whose refresh misses falls through to the general pass without asking its table again", async () => {
1979
+ const nowSpy: NowSpy = freezeNow(START_TIME);
1980
+ await TelemetryEntityNameResolver.resolve({
1981
+ ids: [RUM_ID],
1982
+ projectId: PROJECT_ID,
1983
+ });
1984
+ getListMock.mockClear();
1985
+ // The RUM application is gone from its table.
1986
+ tables[ServiceType.RealUserMonitor] = [];
1987
+
1988
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
1989
+ await expect(
1990
+ TelemetryEntityNameResolver.resolve({
1991
+ ids: [RUM_ID],
1992
+ projectId: PROJECT_ID,
1993
+ }),
1994
+ ).resolves.toEqual({});
1995
+
1996
+ const types: Array<ServiceType> = requestedTypes();
1997
+ expect(types[0]).toBe(ServiceType.RealUserMonitor);
1998
+ expect(types[1]).toBe(ServiceType.OpenTelemetry);
1999
+ expect([...types].sort()).toEqual(
2000
+ [...TELEMETRY_ENTITY_RESOLUTION_ORDER].sort(),
2001
+ );
2002
+ expect(requestsFor(ServiceType.RealUserMonitor)).toHaveLength(1);
2003
+
2004
+ // …and that full miss is now remembered.
2005
+ getListMock.mockClear();
2006
+ await TelemetryEntityNameResolver.resolve({
2007
+ ids: [RUM_ID],
2008
+ projectId: PROJECT_ID,
2009
+ });
2010
+ expect(getListMock).not.toHaveBeenCalled();
2011
+ });
2012
+
2013
+ test("an expired hit whose refresh misses can still resolve in another table", async () => {
2014
+ const nowSpy: NowSpy = freezeNow(START_TIME);
2015
+ await TelemetryEntityNameResolver.resolve({
2016
+ ids: [RUM_ID],
2017
+ projectId: PROJECT_ID,
2018
+ });
2019
+ tables[ServiceType.RealUserMonitor] = [];
2020
+ tables[ServiceType.Host]!.push(row(RUM_ID, { name: "now-a-host" }));
2021
+
2022
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
2023
+ const result: TelemetryEntityNameMap =
2024
+ await TelemetryEntityNameResolver.resolve({
2025
+ ids: [RUM_ID],
2026
+ projectId: PROJECT_ID,
2027
+ });
2028
+ expect(result[RUM_ID]).toEqual({
2029
+ id: RUM_ID,
2030
+ name: "now-a-host",
2031
+ entityType: ServiceType.Host,
2032
+ typeLabel: "Host",
2033
+ });
2034
+ });
2035
+
2036
+ test("an expired hit of a type the caller does not allow is not used as a hint", async () => {
2037
+ const nowSpy: NowSpy = freezeNow(START_TIME);
2038
+ await TelemetryEntityNameResolver.resolve({
2039
+ ids: [RUM_ID],
2040
+ projectId: PROJECT_ID,
2041
+ });
2042
+ getListMock.mockClear();
2043
+
2044
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
2045
+ await expect(
2046
+ TelemetryEntityNameResolver.resolve({
2047
+ ids: [RUM_ID],
2048
+ projectId: PROJECT_ID,
2049
+ entityTypes: [ServiceType.OpenTelemetry],
2050
+ }),
2051
+ ).resolves.toEqual({});
2052
+ expect(issuedRequests()).toEqual([
2053
+ { entityType: ServiceType.OpenTelemetry, ids: [RUM_ID] },
2054
+ ]);
2055
+ });
2056
+
2057
+ test("a caller's explicit hint wins over the expired hit's table", async () => {
2058
+ const nowSpy: NowSpy = freezeNow(START_TIME);
2059
+ await TelemetryEntityNameResolver.resolve({
2060
+ ids: [RUM_ID],
2061
+ projectId: PROJECT_ID,
2062
+ });
2063
+ getListMock.mockClear();
2064
+
2065
+ nowSpy.mockReturnValue(START_TIME + HIT_CACHE_TTL_IN_MS + 1);
2066
+ const result: TelemetryEntityNameMap =
2067
+ await TelemetryEntityNameResolver.resolve({
2068
+ ids: [RUM_ID],
2069
+ projectId: PROJECT_ID,
2070
+ typeHints: { [RUM_ID]: ServiceType.Host },
2071
+ });
2072
+ expect(requestedTypes()[0]).toBe(ServiceType.Host);
2073
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
2074
+ });
2075
+ });
2076
+
2077
+ describe("TelemetryEntityNameResolver.resolve — non-UUID ids", () => {
2078
+ /*
2079
+ * Postgres rejects a malformed value in `_id IN (...)`, failing the whole
2080
+ * query. The fake below does the same, so an id such as a service *name*
2081
+ * that slipped into the id list would leave every valid id beside it
2082
+ * unresolved if the resolver sent it.
2083
+ */
2084
+ beforeEach(() => {
2085
+ getListMock.mockImplementation((...args: Array<unknown>) => {
2086
+ const getListArgs: GetListArgs = args[0] as GetListArgs;
2087
+ const invalid: Array<string> = includedIds(getListArgs.query._id).filter(
2088
+ (id: string): boolean => {
2089
+ return !ObjectID.isValidUUID(id);
2090
+ },
2091
+ );
2092
+ if (invalid.length > 0) {
2093
+ return Promise.reject(
2094
+ new Error(`invalid input syntax for type uuid: "${invalid[0]}"`),
2095
+ );
2096
+ }
2097
+ return fakeGetList(getListArgs);
2098
+ });
2099
+ });
2100
+
2101
+ test.each([
2102
+ ["a service name", "checkout"],
2103
+ ["a dashed non-uuid", "not-a-uuid"],
2104
+ ["digits", "12345"],
2105
+ ["a uuid missing a digit", "11111111-0000-4000-8000-00000000000"],
2106
+ ["a uuid without dashes", "11111111000040008000000000000001"],
2107
+ ["a braced uuid", "{11111111-0000-4000-8000-000000000001}"],
2108
+ ])("%s is dropped without any request", async (_name: string, id: string) => {
2109
+ await expect(
2110
+ TelemetryEntityNameResolver.resolve({
2111
+ ids: [id],
2112
+ projectId: PROJECT_ID,
2113
+ }),
2114
+ ).resolves.toEqual({});
2115
+ expect(getListMock).not.toHaveBeenCalled();
2116
+ expect(missCacheKeys()).toEqual([]);
2117
+ });
2118
+
2119
+ test("non-UUID ids do not poison the batch: the valid ids beside them still resolve", async () => {
2120
+ const result: TelemetryEntityNameMap =
2121
+ await TelemetryEntityNameResolver.resolve({
2122
+ ids: ["checkout", SERVICE_ID, RUM_ID, PROJECT_ID, "frontend"],
2123
+ projectId: PROJECT_ID,
2124
+ });
2125
+
2126
+ expect(Object.keys(result).sort()).toEqual(
2127
+ [SERVICE_ID, RUM_ID, PROJECT_ID].sort(),
2128
+ );
2129
+ expect(result[SERVICE_ID]?.name).toBe("checkout-api");
2130
+ expect(result[RUM_ID]?.name).toBe("checkout-web");
2131
+ expect(result[PROJECT_ID]).toEqual({
2132
+ id: PROJECT_ID,
2133
+ name: UNKNOWN_SERVICE_NAME,
2134
+ entityType: ServiceType.Unknown,
2135
+ typeLabel: "Service",
2136
+ });
2137
+
2138
+ const sentIds: Array<string> = issuedRequests().flatMap(
2139
+ (request: IssuedRequest): Array<string> => {
2140
+ return request.ids;
2141
+ },
2142
+ );
2143
+ expect(sentIds.length).toBeGreaterThan(0);
2144
+ expect(sentIds).not.toContain("checkout");
2145
+ expect(sentIds).not.toContain("frontend");
2146
+ expect(sentIds).not.toContain(PROJECT_ID);
2147
+ });
2148
+
2149
+ test("a non-UUID id with a type hint is dropped too", async () => {
2150
+ await expect(
2151
+ TelemetryEntityNameResolver.resolve({
2152
+ ids: ["checkout"],
2153
+ projectId: PROJECT_ID,
2154
+ typeHints: { checkout: ServiceType.RealUserMonitor },
2155
+ }),
2156
+ ).resolves.toEqual({});
2157
+ expect(getListMock).not.toHaveBeenCalled();
2158
+ });
2159
+
2160
+ test("a hinted valid id still resolves in one request next to a dropped one", async () => {
2161
+ const result: TelemetryEntityNameMap =
2162
+ await TelemetryEntityNameResolver.resolve({
2163
+ ids: ["checkout", RUM_ID],
2164
+ projectId: PROJECT_ID,
2165
+ typeHints: {
2166
+ checkout: ServiceType.RealUserMonitor,
2167
+ [RUM_ID]: ServiceType.RealUserMonitor,
2168
+ },
2169
+ });
2170
+ expect(Object.keys(result)).toEqual([RUM_ID]);
2171
+ expect(issuedRequests()).toEqual([
2172
+ { entityType: ServiceType.RealUserMonitor, ids: [RUM_ID] },
2173
+ ]);
2174
+ });
2175
+
2176
+ test("an upper-case UUID is still a valid id and is queried", async () => {
2177
+ await TelemetryEntityNameResolver.resolve({
2178
+ ids: [SERVICE_ID.toUpperCase()],
2179
+ projectId: PROJECT_ID,
2180
+ entityTypes: [ServiceType.OpenTelemetry],
2181
+ });
2182
+ expect(issuedRequests()).toEqual([
2183
+ {
2184
+ entityType: ServiceType.OpenTelemetry,
2185
+ ids: [SERVICE_ID.toUpperCase()],
2186
+ },
2187
+ ]);
2188
+ });
2189
+
2190
+ test("the projectId still maps to Unknown Service even when it is not UUID-shaped", async () => {
2191
+ const result: TelemetryEntityNameMap =
2192
+ await TelemetryEntityNameResolver.resolve({
2193
+ ids: ["project-slug", "checkout"],
2194
+ projectId: "project-slug",
2195
+ });
2196
+ expect(result).toEqual({
2197
+ "project-slug": {
2198
+ id: "project-slug",
2199
+ name: UNKNOWN_SERVICE_NAME,
2200
+ entityType: ServiceType.Unknown,
2201
+ typeLabel: "Service",
2202
+ },
2203
+ });
2204
+ expect(getListMock).not.toHaveBeenCalled();
2205
+ });
2206
+ });