@oneuptime/common 12.0.24 → 12.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +2 -0
- package/Models/AnalyticsModels/Span.ts +101 -0
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +413 -0
- package/Models/DatabaseModels/AlertSeverity.ts +4 -1
- package/Models/DatabaseModels/CephClusterFeed.ts +625 -0
- package/Models/DatabaseModels/CloudResourceFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +13 -0
- package/Models/DatabaseModels/DetectionRule.ts +9 -3
- package/Models/DatabaseModels/DockerHostFeed.ts +625 -0
- package/Models/DatabaseModels/DockerSwarmClusterFeed.ts +628 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +9 -3
- package/Models/DatabaseModels/HostFeed.ts +625 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +4 -1
- package/Models/DatabaseModels/Index.ts +22 -0
- package/Models/DatabaseModels/KubernetesClusterFeed.ts +628 -0
- package/Models/DatabaseModels/Monitor.ts +87 -0
- package/Models/DatabaseModels/NetworkDevice.ts +96 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +92 -6
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +301 -31
- package/Models/DatabaseModels/NetworkSite.ts +120 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +1 -0
- package/Models/DatabaseModels/PodmanHostFeed.ts +625 -0
- package/Models/DatabaseModels/ProxmoxClusterFeed.ts +626 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +67 -0
- package/Models/DatabaseModels/ServiceFeed.ts +625 -0
- package/Models/DatabaseModels/TelemetrySourceMap.ts +474 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +758 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +1 -0
- package/Models/DatabaseModels/UserTotpAuth.ts +1 -0
- package/Models/DatabaseModels/UserWebAuthn.ts +1 -0
- package/Server/API/AlertAPI.ts +23 -1
- package/Server/API/BaseAPI.ts +14 -27
- package/Server/API/IncidentAPI.ts +41 -1
- package/Server/API/IncidentEpisodeAPI.ts +23 -1
- package/Server/API/MicrosoftTeamsAPI.ts +31 -2
- package/Server/API/ScheduledMaintenanceAPI.ts +23 -1
- package/Server/API/SlackAPI.ts +48 -2
- package/Server/API/TelemetryAPI.ts +167 -42
- package/Server/API/UserOnCallLogTimelineAPI.ts +75 -61
- package/Server/API/UserTotpAuthAPI.ts +67 -1
- package/Server/API/UserWebAuthnAPI.ts +44 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.ts +129 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.ts +54 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.ts +489 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
- package/Server/Middleware/IdentityRateLimit.ts +53 -3
- package/Server/Middleware/SlackAuthorization.ts +96 -18
- package/Server/Services/AIService.ts +181 -41
- package/Server/Services/CephClusterFeedService.ts +99 -0
- package/Server/Services/CephClusterLabelRuleEngineService.ts +29 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +23 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +129 -0
- package/Server/Services/CephClusterOwnerUserService.ts +123 -0
- package/Server/Services/CephClusterService.ts +223 -2
- package/Server/Services/CloudResourceFeedService.ts +99 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +30 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +33 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +129 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +123 -0
- package/Server/Services/CloudResourceService.ts +227 -2
- package/Server/Services/DatabaseService.ts +265 -0
- package/Server/Services/DockerHostFeedService.ts +99 -0
- package/Server/Services/DockerHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/DockerHostOwnerTeamService.ts +129 -0
- package/Server/Services/DockerHostOwnerUserService.ts +123 -0
- package/Server/Services/DockerHostService.ts +227 -2
- package/Server/Services/DockerSwarmClusterFeedService.ts +102 -0
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +133 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +127 -0
- package/Server/Services/DockerSwarmClusterService.ts +229 -2
- package/Server/Services/EnterpriseLicenseService.ts +15 -7
- package/Server/Services/ExceptionAggregationService.ts +12 -2
- package/Server/Services/HostFeedService.ts +99 -0
- package/Server/Services/HostLabelRuleEngineService.ts +29 -0
- package/Server/Services/HostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/HostOwnerTeamService.ts +129 -0
- package/Server/Services/HostOwnerUserService.ts +123 -0
- package/Server/Services/HostService.ts +215 -2
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterFeedService.ts +99 -0
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/KubernetesClusterOwnerTeamService.ts +133 -0
- package/Server/Services/KubernetesClusterOwnerUserService.ts +127 -0
- package/Server/Services/KubernetesClusterService.ts +231 -2
- package/Server/Services/LogAggregationService.ts +23 -280
- package/Server/Services/MetricAggregationService.ts +98 -1
- package/Server/Services/MonitorService.ts +177 -13
- package/Server/Services/MonitorTemplateService.ts +111 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +777 -86
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +199 -16
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +1055 -14
- package/Server/Services/NetworkDeviceService.ts +750 -4
- package/Server/Services/NetworkInterfaceService.ts +415 -0
- package/Server/Services/NetworkSiteService.ts +485 -52
- package/Server/Services/PodmanHostFeedService.ts +99 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +129 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +123 -0
- package/Server/Services/PodmanHostService.ts +227 -2
- package/Server/Services/ProjectService.ts +16 -10
- package/Server/Services/ProxmoxClusterFeedService.ts +99 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +131 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +124 -0
- package/Server/Services/ProxmoxClusterService.ts +225 -2
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +61 -0
- package/Server/Services/ServiceFeedService.ts +99 -0
- package/Server/Services/ServiceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ServiceOwnerRuleEngineService.ts +26 -0
- package/Server/Services/ServiceOwnerTeamService.ts +129 -0
- package/Server/Services/ServiceOwnerUserService.ts +123 -0
- package/Server/Services/ServiceService.ts +227 -3
- package/Server/Services/StatusPageSubscriberService.ts +7 -0
- package/Server/Services/TelemetryAttributeService.ts +13 -3
- package/Server/Services/TelemetrySourceMapService.ts +307 -0
- package/Server/Services/ThreatIntelFeedService.ts +222 -0
- package/Server/Services/ThreatIntelIndicatorService.ts +428 -0
- package/Server/Services/TraceAggregationService.ts +101 -11
- package/Server/Services/UserService.ts +13 -6
- package/Server/Services/UserTwoFactorBackupCodeService.ts +127 -0
- package/Server/Services/UserWebhookService.ts +11 -2
- package/Server/Static/Brand/README.md +38 -0
- package/Server/Static/Brand/favicons/apple-touch-icon.png +0 -0
- package/Server/Static/Brand/favicons/favicon-16x16.png +0 -0
- package/Server/Static/Brand/favicons/favicon-32x32.png +0 -0
- package/Server/Static/Brand/favicons/favicon.ico +0 -0
- package/Server/Static/Brand/favicons/safari-pinned-tab.svg +31 -0
- package/Server/Static/Brand/hou-wb.svg +1 -0
- package/Server/Static/Brand/oneuptime-logo.svg +1 -0
- package/Server/Static/Brand/ou-wb.svg +1 -0
- package/Server/Static/Vendor/README.md +4 -0
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +13 -3
- package/Server/Types/Database/AggregateBy.ts +83 -0
- package/Server/Types/Database/AggregateResultUtil.ts +126 -0
- package/Server/Types/Database/JSONColumnQuery.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +40 -0
- package/Server/Types/Database/QueryUtil.ts +26 -0
- package/Server/Types/Workflow/Components/API/Utils.ts +10 -1
- package/Server/Types/Workflow/Components/JavaScript.ts +8 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +9 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +18 -0
- package/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.ts +422 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +176 -0
- package/Server/Utils/DataSource/HttpFetch.ts +18 -0
- package/Server/Utils/Database/RelationIdUtil.ts +42 -0
- package/Server/Utils/Marketing/MarketingEventUtil.ts +38 -9
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +34 -3
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +9 -1
- package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +28 -10
- package/Server/Utils/Monitor/MonitorAlert.ts +541 -332
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +330 -64
- package/Server/Utils/Monitor/MonitorIncident.ts +640 -434
- package/Server/Utils/Monitor/MonitorResource.ts +226 -49
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +46 -3
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +23 -102
- package/Server/Utils/Monitor/PerEntityCriteriaFanOut.ts +329 -0
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +427 -0
- package/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.ts +310 -0
- package/Server/Utils/OnCallNotificationContext.ts +686 -0
- package/Server/Utils/PrivateNetworkWebhookConfig.ts +549 -0
- package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +139 -0
- package/Server/Utils/Response.ts +11 -1
- package/Server/Utils/SSRFProtection.ts +230 -60
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +106 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +84 -284
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +47 -20
- package/Server/Utils/SecurityEvent/SecurityEventAlerting.ts +318 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.ts +199 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.ts +252 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +739 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +533 -0
- package/Server/Utils/StartServer.ts +83 -56
- package/Server/Utils/StatusPageSubscriberWebhook.ts +3 -0
- package/Server/Utils/Telemetry/LlmMetricSpend.ts +56 -5
- package/Server/Utils/Telemetry/LlmSpan.ts +46 -0
- package/Server/Utils/Telemetry/SourceMapResolver.ts +480 -0
- package/Server/Utils/TwoFactorBackupCodeNotification.ts +106 -0
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +27 -1
- package/Server/Utils/VendorAssets.ts +42 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +136 -6
- package/Server/Utils/Workspace/Slack/Actions/Auth.ts +0 -12
- package/Server/Views/AcknowledgeUserOnCallNotification.ejs +11 -9
- package/Server/Views/Partials/Head.ejs +9 -9
- package/Server/Views/Partials/OnCallNotificationDetails.ejs +48 -0
- package/Server/Views/ViewMessage.ejs +11 -9
- package/Tests/App/Accounts/LoginTwoFactorRecovery.test.tsx +972 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +401 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +707 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +1908 -18
- package/Tests/App/Dashboard/LlmCallsTableIdentity.test.tsx +322 -0
- package/Tests/App/Dashboard/LlmOverview.test.tsx +335 -0
- package/Tests/App/Dashboard/LlmSpanDisplay.test.ts +391 -0
- package/Tests/App/Dashboard/LlmUsageBreakdown.test.tsx +1007 -0
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +230 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +216 -0
- package/Tests/App/Dashboard/TopologyAddToMonitoring.test.tsx +192 -0
- package/Tests/App/Dashboard/WorkspaceNotificationRuleConditions.test.tsx +439 -0
- package/Tests/Models/DatabaseModels/DateColumnDeserialization.test.ts +182 -0
- package/Tests/Models/DatabaseModels/RelationColumnModelTypeCoverage.test.ts +82 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +398 -0
- package/Tests/Models/DiscoveryScanNameColumn.test.ts +151 -16
- package/Tests/Models/DiscoveryScanSnmpEnabledColumn.test.ts +593 -0
- package/Tests/Models/NetworkDeviceCreateContract.test.ts +102 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +607 -0
- package/Tests/Server/API/AIGenerationRequestBudget.test.ts +355 -0
- package/Tests/Server/API/AIKillSwitchBackstop.test.ts +602 -0
- package/Tests/Server/API/BaseAPI.test.ts +41 -0
- package/Tests/Server/API/BaseAPIUpdateDateColumns.test.ts +154 -0
- package/Tests/Server/API/BaseAPIUpdatePayloadValidation.test.ts +9 -16
- package/Tests/Server/API/MicrosoftTeamsBotTestEndpoint.test.ts +335 -0
- package/Tests/Server/API/UserOnCallLogTimelineAcknowledgePage.test.ts +611 -0
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +498 -4
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +682 -0
- package/Tests/Server/Infrastructure/ExampleDockerfiles.test.ts +595 -0
- package/Tests/Server/Middleware/SlackAuthorization.test.ts +262 -5
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +9 -0
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +6 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +18 -0
- package/Tests/Server/Services/DatabaseServiceAggregateBy.test.ts +590 -0
- package/Tests/Server/Services/DatabaseServiceUpdateWriteRouting.test.ts +12 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +162 -26
- package/Tests/Server/Services/EnterpriseLicenseServiceCreate.test.ts +292 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +119 -12
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +109 -0
- package/Tests/Server/Services/MetricAggregationAttributeOperators.test.ts +170 -0
- package/Tests/Server/Services/MonitorTemplateServiceNetworkDeviceSync.test.ts +383 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +997 -3
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +830 -0
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +528 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +3141 -1
- package/Tests/Server/Services/NetworkDeviceRegisteredHostnames.test.ts +1023 -0
- package/Tests/Server/Services/NetworkDeviceSiteAssignmentRuleSkip.test.ts +728 -0
- package/Tests/Server/Services/NetworkInterfaceServiceUpsert.test.ts +795 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +903 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +165 -24
- package/Tests/Server/Services/ProjectServiceChangePlan.test.ts +5 -3
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +5 -2
- package/Tests/Server/Services/ResourceCreationFeedWrites.test.ts +304 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +269 -0
- package/Tests/Server/Services/ResourceOwnerFeedWrites.test.ts +245 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +792 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +483 -0
- package/Tests/Server/Services/ThreatIntelFeedService.test.ts +351 -0
- package/Tests/Server/Services/ThreatIntelIndicatorService.test.ts +366 -0
- package/Tests/Server/Services/TraceAggregationAttributeOperators.test.ts +507 -0
- package/Tests/Server/Services/UserTwoFactorBackupCodeGenerateIfNone.test.ts +705 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleOnCallDutyPolicy.test.ts +306 -0
- package/Tests/Server/Types/Database/AggregateResultUtil.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SelectRejectionMessageContract.test.ts +424 -0
- package/Tests/Server/Types/Database/QueryHelperWildcard.test.ts +142 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentPrivateNetwork.test.ts +163 -0
- package/Tests/Server/Types/Workflow/Components/JavaScriptPrivateNetwork.test.ts +124 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +5 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +39 -1
- package/Tests/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.test.ts +338 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWildcard.test.ts +383 -0
- package/Tests/Server/Utils/Marketing/EmittedMarketingEvent.ts +23 -0
- package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +51 -0
- package/Tests/Server/Utils/Monitor/Criteria/SyntheticMonitorCriteria.test.ts +259 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +557 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +12 -2
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +404 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +8 -2
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +125 -98
- package/Tests/Server/Utils/Monitor/PerEntityCriteriaFanOut.test.ts +444 -0
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1112 -0
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +717 -0
- package/Tests/Server/Utils/NetworkDevice/RulePatternValidator.test.ts +78 -0
- package/Tests/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.test.ts +363 -0
- package/Tests/Server/Utils/OfflineAssetHygiene.test.ts +35 -0
- package/Tests/Server/Utils/OnCallNotificationContext.test.ts +908 -0
- package/Tests/Server/Utils/PrivateNetworkWebhookConfig.test.ts +423 -0
- package/Tests/Server/Utils/ResourceFeed/ResourceFeedUtil.test.ts +191 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +597 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +381 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +417 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventAlerting.test.ts +246 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.test.ts +282 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.test.ts +312 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.test.ts +854 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.test.ts +437 -0
- package/Tests/Server/Utils/StartServerErrorStatus.test.ts +225 -0
- package/Tests/Server/Utils/StatusPage/MonitorRulePatternValidator.test.ts +62 -0
- package/Tests/Server/Utils/StatusPageSubscriberWebhookPrivateNetwork.test.ts +119 -0
- package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +37 -18
- package/Tests/Server/Utils/Telemetry/LlmMetricSpend.test.ts +143 -2
- package/Tests/Server/Utils/Telemetry/LlmSpan.test.ts +804 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +542 -0
- package/Tests/Server/Utils/TwoFactorBackupCodeNotification.test.ts +272 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +111 -0
- package/Tests/Server/Utils/VendorAssets.test.ts +117 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +101 -4
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstallStateDiagnostics.test.ts +922 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsRosterDiagnosticMessages.test.ts +642 -0
- package/Tests/Server/Views/OnCallAcknowledgePage.test.ts +430 -0
- package/Tests/Types/API/URLQueryString.test.ts +472 -0
- package/Tests/Types/BaseDatabase/Wildcard.test.ts +163 -0
- package/Tests/Types/BaseDatabase/WildcardPattern.test.ts +149 -0
- package/Tests/Types/Database/DateColumnValue.test.ts +265 -0
- package/Tests/Types/DateToIsoStringOrNull.test.ts +67 -0
- package/Tests/Types/Log/LogQueryToFilter.test.ts +218 -43
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +225 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +296 -0
- package/Tests/Types/NetworkAutomation/RuleRunResult.test.ts +102 -0
- package/Tests/Types/NetworkAutomation/RuleRunResultDescribe.test.ts +145 -0
- package/Tests/Types/NetworkSite/SiteHealthRollupPolicy.test.ts +58 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +15 -0
- package/Tests/Types/Telemetry/LlmMetricConventions.test.ts +391 -0
- package/Tests/Types/Telemetry/TelemetrySearchQuery.test.ts +620 -0
- package/Tests/Types/WhatsApp/WhatsAppTemplates.test.ts +110 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +76 -6
- package/Tests/Types/Workspace/NotificationRules/NotificationRuleCondition.test.ts +16 -4
- package/Tests/Types/Workspace/NotificationRules/OnCallDutyPolicyConditions.test.ts +669 -0
- package/Tests/UI/Components/DictionaryFilterOperatorWildcard.test.ts +175 -0
- package/Tests/UI/Components/IconOpticalSize.test.tsx +377 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +332 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsInstallGuidanceContent.test.tsx +643 -0
- package/Tests/Utils/Monitor/InterfaceInventoryUtil.test.ts +824 -0
- package/Tests/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.test.ts +626 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +718 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +59 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +287 -2
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +73 -0
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilder.test.ts +317 -0
- package/Tests/Utils/NetworkDiscovery/RescanIntervalUtil.test.ts +262 -0
- package/Tests/Utils/NetworkDiscovery/ScanModeUtil.test.ts +474 -0
- package/Tests/Utils/NetworkDiscovery/SnmpScanConfigUtil.test.ts +2442 -0
- package/Tests/Utils/NetworkSite/SiteMaintenanceUtil.test.ts +188 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +522 -0
- package/Tests/Utils/NetworkSite/SiteUptimeUtil.test.ts +694 -0
- package/Tests/Utils/SecurityEvent/ThreatIntel/StixPatternParser.test.ts +281 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +87 -67
- package/Tests/Utils/Telemetry/LlmMetricQuery.test.ts +298 -0
- package/Types/API/URL.ts +45 -10
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +8 -0
- package/Types/BaseDatabase/NotWildcard.ts +86 -0
- package/Types/BaseDatabase/Wildcard.ts +89 -0
- package/Types/BaseDatabase/WildcardPattern.ts +176 -0
- package/Types/Database/DateColumnValue.ts +184 -0
- package/Types/Database/TableColumn.ts +40 -5
- package/Types/Date.ts +37 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/JSON.ts +8 -0
- package/Types/Log/LogQueryToFilter.ts +167 -129
- package/Types/Monitor/DockerAlertTemplates.ts +43 -12
- package/Types/Monitor/HostAlertTemplates.ts +31 -3
- package/Types/Monitor/KubernetesAlertTemplates.ts +98 -0
- package/Types/Monitor/MonitorStep.ts +49 -0
- package/Types/Monitor/PodmanAlertTemplates.ts +39 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +14 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +11 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +11 -4
- package/Types/NetworkAutomation/RuleRunResult.ts +191 -2
- package/Types/NetworkSite/SiteHealthRollupPolicy.ts +96 -0
- package/Types/Permission.ts +411 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +42 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +118 -0
- package/Types/SerializableObjectDictionary.ts +8 -0
- package/Types/Telemetry/LlmConventions.ts +255 -0
- package/Types/Telemetry/LlmMetricConventions.ts +212 -7
- package/Types/Telemetry/SourceMap.ts +56 -0
- package/Types/Telemetry/TelemetrySearchQuery.ts +949 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +12 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +15 -2
- package/Utils/Metrics/MetricExplorerUrl.ts +77 -15
- package/Utils/Monitor/InterfaceInventoryUtil.ts +251 -0
- package/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.ts +333 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +249 -28
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +14 -6
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +2 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +49 -18
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +215 -0
- package/Utils/NetworkDiscovery/RescanIntervalUtil.ts +148 -0
- package/Utils/NetworkDiscovery/ScanModeUtil.ts +105 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.ts +827 -0
- package/Utils/NetworkSite/SiteMaintenanceUtil.ts +110 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +350 -19
- package/Utils/NetworkSite/SiteUptimeUtil.ts +422 -21
- package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.ts +383 -0
- package/Utils/Telemetry/CrossSignalScope.ts +37 -39
- package/Utils/Telemetry/LlmMetricQuery.ts +83 -0
- package/build/dist/Models/AnalyticsModels/Index.js +2 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Span.js +89 -0
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +325 -0
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +11 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +9 -3
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +9 -3
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/HostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/HostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +22 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Monitor.js +81 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +103 -7
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +91 -6
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +276 -31
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +124 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +66 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ServiceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js +496 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +800 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js +1 -0
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +18 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +11 -20
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +35 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +18 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +30 -2
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +18 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +45 -2
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +100 -35
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +64 -59
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +65 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +42 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js +88 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js +61 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js +179 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +40 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Middleware/SlackAuthorization.js +58 -7
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +177 -30
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterFeedService.js +89 -0
- package/build/dist/Server/Services/CephClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +175 -1
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceFeedService.js +89 -0
- package/build/dist/Server/Services/CloudResourceFeedService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +28 -3
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +177 -1
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +201 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostFeedService.js +89 -0
- package/build/dist/Server/Services/DockerHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +177 -1
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js +90 -0
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +175 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +40 -30
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +8 -2
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostFeedService.js +89 -0
- package/build/dist/Server/Services/HostFeedService.js.map +1 -0
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/HostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/HostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +175 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +10 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +24 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterFeedService.js +89 -0
- package/build/dist/Server/Services/KubernetesClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +177 -1
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +19 -196
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +59 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +115 -13
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +86 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +561 -67
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +130 -16
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +850 -8
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +594 -5
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkInterfaceService.js +306 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +408 -47
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostFeedService.js +89 -0
- package/build/dist/Server/Services/PodmanHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +177 -1
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +40 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js +89 -0
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +175 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +56 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceFeedService.js +89 -0
- package/build/dist/Server/Services/ServiceFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +24 -0
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ServiceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ServiceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +173 -2
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +7 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +9 -3
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +265 -0
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js +157 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js +276 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js.map +1 -0
- package/build/dist/Server/Services/TraceAggregationService.js +62 -6
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +22 -13
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js +120 -0
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +11 -2
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +12 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/AggregateBy.js +2 -0
- package/build/dist/Server/Types/Database/AggregateBy.js.map +1 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js +90 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js.map +1 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js +14 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +42 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +18 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +10 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +8 -0
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +8 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +15 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js +266 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +134 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +8 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationIdUtil.js +31 -0
- package/build/dist/Server/Utils/Database/RelationIdUtil.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +26 -8
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +42 -17
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +9 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +15 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +386 -271
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +278 -64
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +469 -350
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +183 -44
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +46 -3
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +18 -91
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js +194 -0
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js.map +1 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +332 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js +279 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js.map +1 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js +415 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js.map +1 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js +424 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js.map +1 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +108 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +12 -1
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +160 -58
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +89 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +75 -234
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +41 -16
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js +217 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js +103 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js +168 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +527 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +376 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +70 -44
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +3 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LlmMetricSpend.js +52 -3
- package/build/dist/Server/Utils/Telemetry/LlmMetricSpend.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js +24 -1
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +327 -0
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js +84 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +10 -1
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/VendorAssets.js +29 -0
- package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +121 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +0 -10
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
- package/build/dist/Types/API/URL.js +40 -10
- package/build/dist/Types/API/URL.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +8 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/NotWildcard.js +72 -0
- package/build/dist/Types/BaseDatabase/NotWildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js +75 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js +137 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js.map +1 -0
- package/build/dist/Types/Database/DateColumnValue.js +125 -0
- package/build/dist/Types/Database/DateColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js +18 -2
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +31 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/JSON.js +2 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Log/LogQueryToFilter.js +111 -108
- package/build/dist/Types/Log/LogQueryToFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +40 -16
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +29 -7
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +98 -4
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +40 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +36 -16
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js +90 -0
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js +84 -0
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +354 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +100 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -0
- package/build/dist/Types/SerializableObjectDictionary.js +8 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmConventions.js +236 -0
- package/build/dist/Types/Telemetry/LlmConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmMetricConventions.js +197 -5
- package/build/dist/Types/Telemetry/LlmMetricConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/SourceMap.js +9 -0
- package/build/dist/Types/Telemetry/SourceMap.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js +661 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +12 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +67 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +28 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +25 -4
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js +36 -16
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +54 -9
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -1
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js +128 -0
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js +190 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +206 -28
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +14 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +34 -18
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +163 -0
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js +99 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js +85 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +560 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js +56 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +185 -10
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js +248 -21
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +255 -0
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +27 -30
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/LlmMetricQuery.js +57 -1
- package/build/dist/Utils/Telemetry/LlmMetricQuery.js.map +1 -1
- package/package.json +2 -1
- package/Tests/Types/Log/LogQueryParser.test.ts +0 -186
- package/Types/Log/LogQueryParser.ts +0 -252
- package/build/dist/Types/Log/LogQueryParser.js +0 -200
- package/build/dist/Types/Log/LogQueryParser.js.map +0 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import OcsfSeverity from "./OcsfSeverity";
|
|
2
|
+
/*
|
|
3
|
+
* The contract between the threat-intel engine and everything that watches
|
|
4
|
+
* its output — the sibling of DetectionFindingConstants for IOC matches.
|
|
5
|
+
* The matcher stamps every Threat Intel finding row with these attribute
|
|
6
|
+
* keys, the ingest-time enricher stamps matched events with the threat.*
|
|
7
|
+
* keys, and the dashboard's "create a monitor from this feed" flow builds
|
|
8
|
+
* its filters from the same constants — one source, so a renamed attribute
|
|
9
|
+
* cannot silently orphan every monitor and Sigma rule built on it.
|
|
10
|
+
*/
|
|
11
|
+
// Telemetry service the matcher's findings are attributed to.
|
|
12
|
+
export const THREAT_INTEL_SERVICE_NAME = "OneUptime Threat Intel";
|
|
13
|
+
/*
|
|
14
|
+
* productName stamped on finding rows, so IOC findings are filterable
|
|
15
|
+
* apart from Sigma findings ("OneUptime Detections").
|
|
16
|
+
*/
|
|
17
|
+
export const THREAT_INTEL_PRODUCT_NAME = "OneUptime Threat Intel";
|
|
18
|
+
/*
|
|
19
|
+
* Flattened attributes carried by every Threat Intel finding row
|
|
20
|
+
* (oneuptime.threat.*, mirroring the Sigma engine's oneuptime.detection.*).
|
|
21
|
+
*/
|
|
22
|
+
export const THREAT_FEED_ID_ATTRIBUTE = "oneuptime.threat.feed_id";
|
|
23
|
+
export const THREAT_FEED_NAME_ATTRIBUTE = "oneuptime.threat.feed_name";
|
|
24
|
+
export const THREAT_INDICATOR_ID_ATTRIBUTE = "oneuptime.threat.indicator_id";
|
|
25
|
+
export const THREAT_INDICATOR_TYPE_ATTRIBUTE = "oneuptime.threat.indicator_type";
|
|
26
|
+
export const THREAT_INDICATOR_VALUE_ATTRIBUTE = "oneuptime.threat.indicator_value";
|
|
27
|
+
export const THREAT_CONFIDENCE_ATTRIBUTE = "oneuptime.threat.confidence";
|
|
28
|
+
export const THREAT_MATCH_COUNT_ATTRIBUTE = "oneuptime.threat.match_count";
|
|
29
|
+
/*
|
|
30
|
+
* Enrichment attributes stamped onto the MATCHED EVENT itself at ingest
|
|
31
|
+
* (short threat.* keys, as Sigma rules and monitors will filter on them):
|
|
32
|
+
* threat.matched is always the literal string "true" on a stamped event.
|
|
33
|
+
*/
|
|
34
|
+
export const ENRICHMENT_MATCHED_ATTRIBUTE = "threat.matched";
|
|
35
|
+
export const ENRICHMENT_INDICATOR_ID_ATTRIBUTE = "threat.indicator_id";
|
|
36
|
+
export const ENRICHMENT_INDICATOR_TYPE_ATTRIBUTE = "threat.indicator_type";
|
|
37
|
+
export const ENRICHMENT_INDICATOR_VALUE_ATTRIBUTE = "threat.indicator_value";
|
|
38
|
+
export const ENRICHMENT_FEED_ATTRIBUTE = "threat.feed";
|
|
39
|
+
export const ENRICHMENT_FEED_ID_ATTRIBUTE = "threat.feed_id";
|
|
40
|
+
export const ENRICHMENT_CONFIDENCE_ATTRIBUTE = "threat.confidence";
|
|
41
|
+
export const ENRICHMENT_MATCH_COUNT_ATTRIBUTE = "threat.match_count";
|
|
42
|
+
export const ENRICHMENT_MATCHED_VALUE = "true";
|
|
43
|
+
/*
|
|
44
|
+
* Normalized indicator types the STIX pattern parser emits. Values are
|
|
45
|
+
* stored on ThreatIntelIndicator.indicatorType and stamped into the
|
|
46
|
+
* threat.indicator_type attributes, so they are part of the public
|
|
47
|
+
* contract — rename only with a data migration.
|
|
48
|
+
*/
|
|
49
|
+
export var ThreatIntelIndicatorType;
|
|
50
|
+
(function (ThreatIntelIndicatorType) {
|
|
51
|
+
ThreatIntelIndicatorType["Ipv4Address"] = "ipv4-addr";
|
|
52
|
+
ThreatIntelIndicatorType["Ipv6Address"] = "ipv6-addr";
|
|
53
|
+
ThreatIntelIndicatorType["DomainName"] = "domain-name";
|
|
54
|
+
ThreatIntelIndicatorType["Url"] = "url";
|
|
55
|
+
ThreatIntelIndicatorType["EmailAddress"] = "email-addr";
|
|
56
|
+
ThreatIntelIndicatorType["FileHashSha256"] = "file-hash-sha256";
|
|
57
|
+
ThreatIntelIndicatorType["FileHashSha1"] = "file-hash-sha1";
|
|
58
|
+
ThreatIntelIndicatorType["FileHashMd5"] = "file-hash-md5";
|
|
59
|
+
})(ThreatIntelIndicatorType || (ThreatIntelIndicatorType = {}));
|
|
60
|
+
/*
|
|
61
|
+
* STIX confidence (0-100, 0 meaning "not specified") -> OCSF severity for
|
|
62
|
+
* finding rows and for alert-severity name matching. Unknown confidence
|
|
63
|
+
* reads as Medium: an indicator a feed did not score is still an
|
|
64
|
+
* indicator somebody curated.
|
|
65
|
+
*/
|
|
66
|
+
export function ocsfSeverityForConfidence(confidence) {
|
|
67
|
+
if (!Number.isFinite(confidence) || confidence <= 0) {
|
|
68
|
+
return OcsfSeverity.Medium;
|
|
69
|
+
}
|
|
70
|
+
if (confidence >= 90) {
|
|
71
|
+
return OcsfSeverity.Critical;
|
|
72
|
+
}
|
|
73
|
+
if (confidence >= 70) {
|
|
74
|
+
return OcsfSeverity.High;
|
|
75
|
+
}
|
|
76
|
+
if (confidence >= 40) {
|
|
77
|
+
return OcsfSeverity.Medium;
|
|
78
|
+
}
|
|
79
|
+
return OcsfSeverity.Low;
|
|
80
|
+
}
|
|
81
|
+
/*
|
|
82
|
+
* Save-time bounds for ThreatIntelFeed.minimumConfidence — one home for
|
|
83
|
+
* the server validator and the dashboard form, so the two ranges cannot
|
|
84
|
+
* drift apart. 0 disables the filter (and unscored indicators always
|
|
85
|
+
* pass it — see ThreatIntelFeedPoller).
|
|
86
|
+
*/
|
|
87
|
+
export const THREAT_INTEL_MINIMUM_CONFIDENCE_MIN = 0;
|
|
88
|
+
export const THREAT_INTEL_MINIMUM_CONFIDENCE_MAX = 100;
|
|
89
|
+
/*
|
|
90
|
+
* Indicators whose STIX object carries no valid_until stay active this
|
|
91
|
+
* long after valid_from. STIX says "valid until revoked"; unbounded
|
|
92
|
+
* validity would grow the IOC table forever, so a year is the ceiling.
|
|
93
|
+
* The window is ANCHORED at the object's own valid_from — re-polling does
|
|
94
|
+
* not extend it (an unchanged object is never re-fetched past the
|
|
95
|
+
* added_after cursor, and an updated one keeps its valid_from); only a
|
|
96
|
+
* producer update that moves valid_from or sets valid_until changes the
|
|
97
|
+
* expiry, and objects already past the window are skipped at ingest.
|
|
98
|
+
*/
|
|
99
|
+
export const THREAT_INTEL_DEFAULT_VALID_DAYS = 365;
|
|
100
|
+
//# sourceMappingURL=ThreatIntelConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreatIntelConstants.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/ThreatIntelConstants.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;;GAQG;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAW,wBAAwB,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAW,wBAAwB,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAW,0BAA0B,CAAC;AAC3E,MAAM,CAAC,MAAM,0BAA0B,GAAW,4BAA4B,CAAC;AAC/E,MAAM,CAAC,MAAM,6BAA6B,GACxC,+BAA+B,CAAC;AAClC,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,gCAAgC,GAC3C,kCAAkC,CAAC;AACrC,MAAM,CAAC,MAAM,2BAA2B,GACtC,6BAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,4BAA4B,GACvC,8BAA8B,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAW,gBAAgB,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAW,qBAAqB,CAAC;AAC/E,MAAM,CAAC,MAAM,mCAAmC,GAC9C,uBAAuB,CAAC;AAC1B,MAAM,CAAC,MAAM,oCAAoC,GAC/C,wBA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+BAA+B,GAAW,GAAG,CAAC"}
|
|
@@ -12,6 +12,8 @@ import IncludesNone from "./BaseDatabase/IncludesNone";
|
|
|
12
12
|
import StartsWith from "./BaseDatabase/StartsWith";
|
|
13
13
|
import EndsWith from "./BaseDatabase/EndsWith";
|
|
14
14
|
import NotContains from "./BaseDatabase/NotContains";
|
|
15
|
+
import Wildcard from "./BaseDatabase/Wildcard";
|
|
16
|
+
import NotWildcard from "./BaseDatabase/NotWildcard";
|
|
15
17
|
import IsNull from "./BaseDatabase/IsNull";
|
|
16
18
|
import LessThan from "./BaseDatabase/LessThan";
|
|
17
19
|
import LessThanOrEqual from "./BaseDatabase/LessThanOrEqual";
|
|
@@ -163,6 +165,12 @@ const SerializableObjectDictionary = {
|
|
|
163
165
|
get [ObjectType.NotContains]() {
|
|
164
166
|
return NotContains;
|
|
165
167
|
},
|
|
168
|
+
get [ObjectType.Wildcard]() {
|
|
169
|
+
return Wildcard;
|
|
170
|
+
},
|
|
171
|
+
get [ObjectType.NotWildcard]() {
|
|
172
|
+
return NotWildcard;
|
|
173
|
+
},
|
|
166
174
|
get [ObjectType.NotNull]() {
|
|
167
175
|
return NotNull;
|
|
168
176
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerializableObjectDictionary.js","sourceRoot":"","sources":["../../../Types/SerializableObjectDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAC7C,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,WAAW,MAAM,4BAA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,CAAC;QAC1B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"SerializableObjectDictionary.js","sourceRoot":"","sources":["../../../Types/SerializableObjectDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAC7C,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AA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IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAC1B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -15,6 +15,62 @@
|
|
|
15
15
|
* Order matters: within each list the preferred convention comes first and the
|
|
16
16
|
* lookup helpers return the first key that is present.
|
|
17
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* The prefix OTLP ingest stamps onto every RESOURCE attribute before the
|
|
20
|
+
* attributes map reaches any extractor.
|
|
21
|
+
*
|
|
22
|
+
* This is not cosmetic and it is the difference between a feature that works
|
|
23
|
+
* and one that silently reports nothing. All three ingest services flatten
|
|
24
|
+
* resource attributes through
|
|
25
|
+
* `TelemetryUtil.getAttributes({ items, prefixKeysWithString: "resource" })`
|
|
26
|
+
* — OtelTracesIngestService, OtelMetricsIngestService and
|
|
27
|
+
* OtelLogsIngestService alike. So an operator who sets
|
|
28
|
+
* `OTEL_RESOURCE_ATTRIBUTES=team.id=platform` does NOT produce an attribute
|
|
29
|
+
* called `team.id`; they produce one called `resource.team.id`.
|
|
30
|
+
*
|
|
31
|
+
* OtelTracesIngestService already learned this the hard way for session
|
|
32
|
+
* replay (see its `sessionIdAttributeKeys`, which lists both spellings and
|
|
33
|
+
* whose comment notes that reading only the bare key "would look correct in a
|
|
34
|
+
* unit test and fail in production"). Identity is the same trap, one tier
|
|
35
|
+
* worse: identity is precisely the kind of value a fleet stamps ONCE on the
|
|
36
|
+
* resource rather than on every span, and Cursor documents `cursor.user.id` /
|
|
37
|
+
* `cursor.team.id` as resource attributes outright.
|
|
38
|
+
*/
|
|
39
|
+
export const RESOURCE_ATTRIBUTE_KEY_PREFIX = "resource.";
|
|
40
|
+
/**
|
|
41
|
+
* Widen a key list so it matches both the span-attribute spelling and the
|
|
42
|
+
* resource-attribute spelling of every key in it.
|
|
43
|
+
*
|
|
44
|
+
* The bare block comes FIRST in its entirety, then the resource-prefixed
|
|
45
|
+
* block, because a span attribute is strictly more specific than a resource
|
|
46
|
+
* attribute: the resource describes the whole process, the span describes one
|
|
47
|
+
* call. Preserving each block's internal order keeps the documented
|
|
48
|
+
* preference ordering intact within each tier.
|
|
49
|
+
*
|
|
50
|
+
* Pure and exported so the widening is one tested function rather than a
|
|
51
|
+
* hand-maintained second copy of every list that drifts the first time
|
|
52
|
+
* somebody adds a key.
|
|
53
|
+
*/
|
|
54
|
+
export function withResourcePrefixedKeys(keys) {
|
|
55
|
+
return [
|
|
56
|
+
...keys,
|
|
57
|
+
...keys.map((key) => {
|
|
58
|
+
return `${RESOURCE_ATTRIBUTE_KEY_PREFIX}${key}`;
|
|
59
|
+
}),
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
/*
|
|
63
|
+
* Note what is deliberately NOT widened: every list below that carries a
|
|
64
|
+
* per-CALL value — system, operation, models, tokens, cost, conversation id,
|
|
65
|
+
* tool name, request parameters, prompts and completions. Those describe one
|
|
66
|
+
* LLM request and have no business being set on a resource, which describes
|
|
67
|
+
* the whole process; a resource-scoped `gen_ai.request.model` would be a
|
|
68
|
+
* misconfiguration, not a convention to support. Widening them would double
|
|
69
|
+
* the number of map lookups on the hottest ingest path to chase a spelling
|
|
70
|
+
* nobody emits. Only the IDENTITY lists — user id, user email, team, and the
|
|
71
|
+
* end-user EXCLUSION list — are widened, because identity is exactly the
|
|
72
|
+
* value an operator sets once via OTEL_RESOURCE_ATTRIBUTES.
|
|
73
|
+
*/
|
|
18
74
|
// Provider / system, e.g. "openai", "anthropic", "aws.bedrock".
|
|
19
75
|
export const LlmSystemAttributeKeys = [
|
|
20
76
|
"gen_ai.system",
|
|
@@ -85,6 +141,186 @@ export const LlmAgentNameAttributeKeys = [
|
|
|
85
141
|
"gen_ai.agent.name",
|
|
86
142
|
"agent.name",
|
|
87
143
|
];
|
|
144
|
+
/*
|
|
145
|
+
* ---------------------------------------------------------------------------
|
|
146
|
+
* WHO ran this call — the EMPLOYEE, never the employee's own customer.
|
|
147
|
+
* ---------------------------------------------------------------------------
|
|
148
|
+
*
|
|
149
|
+
* The LLM feature was born trace-only and had no concept of a human being, so
|
|
150
|
+
* "which of our engineers burned $4k on Opus last month" was unanswerable. The
|
|
151
|
+
* three lists below make the human actor a first-class span dimension, so
|
|
152
|
+
* spend can be grouped by person and by cost centre.
|
|
153
|
+
*
|
|
154
|
+
* THE CORRECTNESS RULE, and it is not a stylistic one: an LLM span can carry
|
|
155
|
+
* TWO different humans. The employee who made the call, and the DOWNSTREAM
|
|
156
|
+
* CUSTOMER on whose behalf the call was made (OpenAI's `user` request
|
|
157
|
+
* parameter, which instrumentations echo back as gen_ai.user / llm.user, and
|
|
158
|
+
* LiteLLM's end-user id). Those two are not interchangeable. Mapping a
|
|
159
|
+
* downstream customer into the employee columns produces internal chargeback
|
|
160
|
+
* that is not merely imprecise but WRONG — a support bot serving 40k
|
|
161
|
+
* customers would manufacture 40k phantom "employees", and the engineer who
|
|
162
|
+
* actually owns that spend would appear to have spent nothing.
|
|
163
|
+
*
|
|
164
|
+
* So the customer-identity keys are enumerated separately in
|
|
165
|
+
* LlmEndUserAttributeKeys below and are deliberately NOT read into any
|
|
166
|
+
* column. The exclusion is pinned by a test; if someone later wants
|
|
167
|
+
* downstream-customer analytics it must land in its OWN column, never by
|
|
168
|
+
* appending a key to the lists below.
|
|
169
|
+
*/
|
|
170
|
+
/*
|
|
171
|
+
* The employee / internal actor id.
|
|
172
|
+
*
|
|
173
|
+
* Provenance, preferred first:
|
|
174
|
+
* - user.id OTel general semantic conventions; THE canonical key for
|
|
175
|
+
* the human actor and the one to standardize on.
|
|
176
|
+
* - enduser.id Also still an ACTIVE semconv attribute — the 1.25
|
|
177
|
+
* deprecation removed enduser.role and enduser.scope only,
|
|
178
|
+
* so this remains a legitimate, widely-emitted spelling.
|
|
179
|
+
* - litellm.metadata.user_api_key_user_id / metadata.user_api_key_user_id
|
|
180
|
+
* LiteLLM proxy: the internal user who OWNS the virtual key
|
|
181
|
+
* the request authenticated with. Note the sibling key
|
|
182
|
+
* user_api_key_end_user_id is the CUSTOMER and is excluded.
|
|
183
|
+
*
|
|
184
|
+
* BOTH spellings are required, and the bare one is the one
|
|
185
|
+
* that actually fires for most deployments. LiteLLM's
|
|
186
|
+
* default `otel` callback (v1) stamps its metadata with a
|
|
187
|
+
* bare "metadata." prefix — see METRIC_METADATA_KEYS and the
|
|
188
|
+
* `common_attrs[f"metadata.{key}"]` assignment in
|
|
189
|
+
* litellm/integrations/opentelemetry.py. The "litellm."
|
|
190
|
+
* namespace only appears under OpenTelemetry v2, which is
|
|
191
|
+
* OFF by default (LITELLM_OTEL_V2, `enabled: default=False`).
|
|
192
|
+
* Recognizing only the v2 spelling meant a stock LiteLLM
|
|
193
|
+
* proxy — the exact "one virtual key per employee" setup our
|
|
194
|
+
* docs recommend as the cleanest chargeback architecture —
|
|
195
|
+
* produced ZERO attribution, silently, with every gateway
|
|
196
|
+
* dollar landing in Unattributed and no error to explain it.
|
|
197
|
+
* - traceloop.association.properties.user_id OpenLLMetry.
|
|
198
|
+
* - langfuse.user.id Langfuse.
|
|
199
|
+
* - user.account_uuid / user.account_id Claude Code (and Codex for
|
|
200
|
+
* the latter) stamp the signed-in account onto every span.
|
|
201
|
+
* - cursor.user.id Cursor's OTel export; an opaque team-scoped integer,
|
|
202
|
+
* which is why it sorts last — it needs the Cursor admin API
|
|
203
|
+
* to resolve to a person, unlike the keys above.
|
|
204
|
+
*
|
|
205
|
+
* The `Base` list is the SPAN-attribute spelling only. Consumers must import
|
|
206
|
+
* LlmUserIdAttributeKeys, which adds the resource-attribute tier — see
|
|
207
|
+
* withResourcePrefixedKeys. The base list is exported solely so tests and
|
|
208
|
+
* docs can cross-check the two tiers against each other.
|
|
209
|
+
*/
|
|
210
|
+
export const LlmUserIdBaseAttributeKeys = [
|
|
211
|
+
"user.id",
|
|
212
|
+
"enduser.id",
|
|
213
|
+
// LiteLLM OTel v2 spelling, then the v1 default. Both are needed — see above.
|
|
214
|
+
"litellm.metadata.user_api_key_user_id",
|
|
215
|
+
"metadata.user_api_key_user_id",
|
|
216
|
+
"traceloop.association.properties.user_id",
|
|
217
|
+
"langfuse.user.id",
|
|
218
|
+
"user.account_uuid",
|
|
219
|
+
"user.account_id",
|
|
220
|
+
"cursor.user.id",
|
|
221
|
+
];
|
|
222
|
+
export const LlmUserIdAttributeKeys = withResourcePrefixedKeys(LlmUserIdBaseAttributeKeys);
|
|
223
|
+
/*
|
|
224
|
+
* The employee's email address — in practice the only identity value a
|
|
225
|
+
* manager can read without a lookup table, which is why it gets its own
|
|
226
|
+
* column rather than being folded into the id.
|
|
227
|
+
*
|
|
228
|
+
* user.email is the OTel general-semconv key and is emitted NATIVELY by
|
|
229
|
+
* Claude Code, Gemini CLI and OpenAI Codex, so for the coding-agent fleet
|
|
230
|
+
* this list is usually the one that hits.
|
|
231
|
+
*
|
|
232
|
+
* The two LiteLLM spellings matter more than their position suggests: the
|
|
233
|
+
* proxy carries the key owner's email in its metadata (user_api_key_user_email
|
|
234
|
+
* is in METRIC_METADATA_KEYS), so a gateway issuing one virtual key per
|
|
235
|
+
* employee yields a real, human-readable email with no lookup table and no
|
|
236
|
+
* per-application instrumentation. That is the cleanest chargeback setup
|
|
237
|
+
* available today, and it is what our AI-gateway guide recommends. As with
|
|
238
|
+
* the id list, the bare "metadata." spelling is the DEFAULT one and the
|
|
239
|
+
* "litellm." namespace only appears under the opt-in OpenTelemetry v2 mode.
|
|
240
|
+
*
|
|
241
|
+
* Because this column holds real PII, TraceScrubRuleService scrubs it under
|
|
242
|
+
* the Attributes scope exactly as it scrubs the attribute it was derived from
|
|
243
|
+
* — see the identity-column pass in scrubSpan. A denormalized column that
|
|
244
|
+
* skipped the scrub pass would make a customer's email-redaction rule
|
|
245
|
+
* silently ineffective on the very column most likely to hold an email.
|
|
246
|
+
*/
|
|
247
|
+
export const LlmUserEmailBaseAttributeKeys = [
|
|
248
|
+
"user.email",
|
|
249
|
+
// LiteLLM OTel v2 spelling, then the v1 default. Both are needed — see above.
|
|
250
|
+
"litellm.metadata.user_api_key_user_email",
|
|
251
|
+
"metadata.user_api_key_user_email",
|
|
252
|
+
"traceloop.association.properties.user_email",
|
|
253
|
+
"enduser.email",
|
|
254
|
+
];
|
|
255
|
+
export const LlmUserEmailAttributeKeys = withResourcePrefixedKeys(LlmUserEmailBaseAttributeKeys);
|
|
256
|
+
/*
|
|
257
|
+
* The team / cost centre the spend charges to.
|
|
258
|
+
*
|
|
259
|
+
* The first four are not emitted by any instrumentation on their own: they
|
|
260
|
+
* are what an organization sets via OTEL_RESOURCE_ATTRIBUTES on the agent
|
|
261
|
+
* process (OTEL_RESOURCE_ATTRIBUTES=team.id=platform,cost_center=RD-114), and
|
|
262
|
+
* are conventionally the ONLY way a coding-agent CLI learns which budget it
|
|
263
|
+
* belongs to. The remaining entries are the gateway/vendor spellings that
|
|
264
|
+
* arrive without any operator configuration.
|
|
265
|
+
*
|
|
266
|
+
* That first sentence is exactly why the resource tier is not optional here:
|
|
267
|
+
* OTEL_RESOURCE_ATTRIBUTES sets a RESOURCE attribute, which ingest delivers
|
|
268
|
+
* as `resource.team.id`. A list of bare keys alone would mean the one
|
|
269
|
+
* mechanism the docs present as THE way to attribute spend to a cost centre
|
|
270
|
+
* never matches a single row.
|
|
271
|
+
*/
|
|
272
|
+
export const LlmTeamBaseAttributeKeys = [
|
|
273
|
+
"team.id",
|
|
274
|
+
"team",
|
|
275
|
+
"cost_center",
|
|
276
|
+
"department",
|
|
277
|
+
// LiteLLM OTel v2 spellings, then the v1 default. See the id list above.
|
|
278
|
+
"litellm.metadata.user_api_key_team_id",
|
|
279
|
+
"litellm.team.id",
|
|
280
|
+
"metadata.user_api_key_team_id",
|
|
281
|
+
"cursor.team.id",
|
|
282
|
+
];
|
|
283
|
+
export const LlmTeamAttributeKeys = withResourcePrefixedKeys(LlmTeamBaseAttributeKeys);
|
|
284
|
+
/*
|
|
285
|
+
* DELIBERATELY EXCLUDED — the DOWNSTREAM CUSTOMER, not the employee.
|
|
286
|
+
*
|
|
287
|
+
* Exported so the exclusion is a documented, testable decision rather than an
|
|
288
|
+
* omission somebody "fixes" later:
|
|
289
|
+
*
|
|
290
|
+
* - gen_ai.user / llm.user
|
|
291
|
+
* Both carry the OpenAI `user` REQUEST PARAMETER, which the API
|
|
292
|
+
* documents as the caller's own end user, sent for abuse monitoring. On
|
|
293
|
+
* a SaaS product's spans this is the SaaS product's customer.
|
|
294
|
+
* - litellm.metadata.user_api_key_end_user_id /
|
|
295
|
+
* metadata.user_api_key_end_user_id / litellm.end_user.id
|
|
296
|
+
* LiteLLM's explicit end-user id, distinct from the key-owner id above
|
|
297
|
+
* (which IS the employee and IS recognized). All three spellings are
|
|
298
|
+
* listed for the same reason the employee lists carry two: the bare
|
|
299
|
+
* "metadata." form is what the DEFAULT v1 otel callback emits, while
|
|
300
|
+
* "litellm.end_user.id" is the dedicated attribute the opt-in v2 mode
|
|
301
|
+
* defines in litellm/integrations/otel/model/semconv.py. Excluding only
|
|
302
|
+
* the v2 metadata spelling would leave the two spellings a real
|
|
303
|
+
* deployment actually produces free to be mistaken for an employee.
|
|
304
|
+
*
|
|
305
|
+
* None of these is denormalized into a column by this change. They remain
|
|
306
|
+
* available in the raw attributes map for anyone who queries them directly.
|
|
307
|
+
*
|
|
308
|
+
* This list is resource-widened too, and for the OPPOSITE reason to the
|
|
309
|
+
* lists above. Here the widening does not make anything match — it makes the
|
|
310
|
+
* EXCLUSION hold. The exclusion is enforced as a set relation ("no end-user
|
|
311
|
+
* key appears in an employee list"), so if this list stopped at the bare
|
|
312
|
+
* spellings while the employee lists carried both tiers, a future
|
|
313
|
+
* `resource.gen_ai.user` could be appended to an employee list and every
|
|
314
|
+
* exclusion test would still pass. Both tiers here, both tiers there.
|
|
315
|
+
*/
|
|
316
|
+
export const LlmEndUserBaseAttributeKeys = [
|
|
317
|
+
"gen_ai.user",
|
|
318
|
+
"llm.user",
|
|
319
|
+
"litellm.metadata.user_api_key_end_user_id",
|
|
320
|
+
"metadata.user_api_key_end_user_id",
|
|
321
|
+
"litellm.end_user.id",
|
|
322
|
+
];
|
|
323
|
+
export const LlmEndUserAttributeKeys = withResourcePrefixedKeys(LlmEndUserBaseAttributeKeys);
|
|
88
324
|
export const LlmToolNameAttributeKeys = [
|
|
89
325
|
"gen_ai.tool.name",
|
|
90
326
|
"tool.name",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LlmConventions.js","sourceRoot":"","sources":["../../../../Types/Telemetry/LlmConventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,eAAe;IACf,sBAAsB;IACtB,YAAY;IACZ,cAAc;CACf,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAkB;IACtD,uBAAuB;IACvB,kBAAkB;IAClB,yBAAyB;CAC1B,CAAC;AAEF,iCAAiC;AACjC,MAAM,CAAC,MAAM,4BAA4B,GA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AAgC;IAChC,+BAA+B;IAC/B,4BAA4B;CAC7B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAkB;IAC1D,SAAS;IACT,MAAM;IACN,YAAY;CACb,CAAC;AAaF,MAAM,CAAC,MAAM,kCAAkC,GAC7C;IACE,+BAA+B;IAC/B,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE;IACzE,wCAAwC;IACxC;QACE,MAAM,EAAE,oBAAoB;QAC5B,aAAa,EAAE,iBAAiB;QAChC,UAAU,EAAE,cAAc;KAC3B;CACF,CAAC;AAEJ,MAAM,CAAC,MAAM,sCAAsC,GACjD;IACE,mCAAmC;IACnC;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,SAAS;QACxB,UAAU,EAAE,MAAM;KACnB;IACD,yCAAyC;IACzC;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,iBAAiB;QAChC,UAAU,EAAE,cAAc;KAC3B;CACF,CAAC;AAEJ,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAkB;IACvD,uBAAuB;IACvB,eAAe;IACf,aAAa;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAkB;IAC3D,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;CACf,CAAC;AAEF,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAkB;IAChD,uBAAuB;IACvB,qBAAqB;IACrB,qBAAqB;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,0BAA0B;IAC1B,eAAe;CAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"LlmConventions.js","sourceRoot":"","sources":["../../../../Types/Telemetry/LlmConventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,6BAA6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EF,MAAM,CAAC,MAAM,8BAA8B,GAAkB;IAC3D,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;CACf,CAAC;AAEF,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAkB;IAChD,uBAAuB;IACvB,qBAAqB;IACrB,qBAAqB;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,0BAA0B;IAC1B,eAAe;CAChB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withResourcePrefixedKeys } from "./LlmConventions";
|
|
1
2
|
/*
|
|
2
3
|
* Single source of truth for the OpenTelemetry GenAI **metric** names and
|
|
3
4
|
* attribute keys OneUptime recognizes — the metric-side sibling of
|
|
@@ -29,6 +30,51 @@ export const LlmTokenUsageMetricNames = [
|
|
|
29
30
|
"gen_ai.client.token.count",
|
|
30
31
|
"llm.token.usage",
|
|
31
32
|
"llm.usage.tokens",
|
|
33
|
+
/*
|
|
34
|
+
* Coding-agent CLIs. Every one of these ships OpenTelemetry natively and
|
|
35
|
+
* every one namespaces its metrics under its own vendor prefix rather than
|
|
36
|
+
* gen_ai.*, so before this list knew their names an entire fleet of agents
|
|
37
|
+
* could be exporting straight into OneUptime and still report zero tokens
|
|
38
|
+
* and zero spend. That is the failure mode these three entries fix.
|
|
39
|
+
*/
|
|
40
|
+
// Anthropic Claude Code CLI.
|
|
41
|
+
"claude_code.token.usage",
|
|
42
|
+
// Cursor Enterprise OTel export.
|
|
43
|
+
"cursor.token.usage",
|
|
44
|
+
// OpenAI Codex CLI.
|
|
45
|
+
"codex.turn.token_usage",
|
|
46
|
+
/*
|
|
47
|
+
* DELIBERATELY ABSENT: "gemini_cli.token.usage".
|
|
48
|
+
*
|
|
49
|
+
* Gemini CLI emits BOTH its vendor metric and the semantic-convention
|
|
50
|
+
* `gen_ai.client.token.usage` for the SAME tokens (see the metric table in
|
|
51
|
+
* Docs/Content/en/telemetry/gemini-cli-and-copilot.md, which lists the two
|
|
52
|
+
* side by side). LlmMetricQuery.buildTokenQuery issues ONE query with
|
|
53
|
+
* `name: new Includes(LlmTokenUsageMetricNames)` and groups only by the
|
|
54
|
+
* token-TYPE attribute keys — never by metric name — so both emissions come
|
|
55
|
+
* back as separate rows and reduceTokenRows adds them together. Listing
|
|
56
|
+
* both names would make a Gemini-CLI-only project report exactly 2x its
|
|
57
|
+
* real token count on the AI / LLM Usage view, with no error and no gap in
|
|
58
|
+
* the chart to give it away.
|
|
59
|
+
*
|
|
60
|
+
* Nothing is lost by the omission: the semconv name that stays in this list
|
|
61
|
+
* is emitted by Gemini CLI itself, so its tokens are still counted — once.
|
|
62
|
+
*
|
|
63
|
+
* AUDIT of the three names above, against the vendor docs in
|
|
64
|
+
* Docs/Content/en/telemetry/, because this hazard applies to any emitter
|
|
65
|
+
* that publishes two token metrics:
|
|
66
|
+
* - claude_code.token.usage Claude Code's metric table is entirely
|
|
67
|
+
* claude_code.* — no gen_ai.* metric. Its gen_ai.* keys are on SPANS,
|
|
68
|
+
* which are a different stream and are summed separately.
|
|
69
|
+
* - cursor.token.usage Cursor publishes exactly three metrics, all
|
|
70
|
+
* cursor.*, and emits no gen_ai.* telemetry at all.
|
|
71
|
+
* - codex.turn.token_usage Codex's metrics are codex.*; its gen_ai.*
|
|
72
|
+
* usage attributes are on SPANS, not metrics.
|
|
73
|
+
* None of the three overlaps a semconv metric, so all three stay.
|
|
74
|
+
*
|
|
75
|
+
* Before re-adding ANY vendor token metric, check whether the same process
|
|
76
|
+
* also emits gen_ai.client.token.usage. If it does, leave it out.
|
|
77
|
+
*/
|
|
32
78
|
];
|
|
33
79
|
/*
|
|
34
80
|
* Metric names carrying spend in USD.
|
|
@@ -45,6 +91,40 @@ export const LlmCostMetricNames = [
|
|
|
45
91
|
// LiteLLM proxy.
|
|
46
92
|
"litellm_spend_metric",
|
|
47
93
|
"litellm.cost.total",
|
|
94
|
+
// Anthropic Claude Code CLI — unit USD.
|
|
95
|
+
"claude_code.cost.usage",
|
|
96
|
+
/*
|
|
97
|
+
* Cursor Enterprise OTel export — unit USD, and documented as a
|
|
98
|
+
* best-effort estimate rather than a billed figure. It is still worth
|
|
99
|
+
* summing: an estimate that is visible beats a true cost nobody can see.
|
|
100
|
+
*/
|
|
101
|
+
"cursor.cost.usage",
|
|
102
|
+
];
|
|
103
|
+
/**
|
|
104
|
+
* The multiplier that turns a micro-USD figure into USD. Exported so the
|
|
105
|
+
* scale lives in exactly one place that a test can pin, rather than as a
|
|
106
|
+
* literal 0.000001 sprinkled through the query layer where a typo'd zero
|
|
107
|
+
* would be invisible in review and off by a factor of ten in production.
|
|
108
|
+
*/
|
|
109
|
+
export const MICRO_USD_TO_USD = 0.000001;
|
|
110
|
+
/*
|
|
111
|
+
* Cost metric names denominated in MILLIONTHS of a USD.
|
|
112
|
+
*
|
|
113
|
+
* This list exists separately from LlmCostMetricNames for one reason, and it
|
|
114
|
+
* is worth being blunt about it: the OpenAI Codex CLI reports spend in
|
|
115
|
+
* micro-USD. If "codex.turn.cost_microusd" were appended to the USD list, the
|
|
116
|
+
* shared Sum aggregate would add its raw values to genuinely-USD values and a
|
|
117
|
+
* $3 Codex turn would land in a cost budget as $3,000,000 — instantly
|
|
118
|
+
* breaching every threshold a customer has configured. There is no way to
|
|
119
|
+
* recover the unit after the sum, so the two units must never share a query.
|
|
120
|
+
*
|
|
121
|
+
* Callers query this separately and combine via
|
|
122
|
+
* LlmMetricQuery.combineCostTotals, which applies MICRO_USD_TO_USD in the one
|
|
123
|
+
* tested place.
|
|
124
|
+
*/
|
|
125
|
+
export const LlmMicroUsdCostMetricNames = [
|
|
126
|
+
// OpenAI Codex CLI — unit is millionths of a USD, NOT dollars.
|
|
127
|
+
"codex.turn.cost_microusd",
|
|
48
128
|
];
|
|
49
129
|
/*
|
|
50
130
|
* Attribute keys naming which side of the exchange a token datapoint counts.
|
|
@@ -54,6 +134,22 @@ export const LlmCostMetricNames = [
|
|
|
54
134
|
export const LlmTokenTypeAttributeKeys = [
|
|
55
135
|
"gen_ai.token.type",
|
|
56
136
|
"llm.token.type",
|
|
137
|
+
/*
|
|
138
|
+
* Claude Code spells it bare: `type`.
|
|
139
|
+
*
|
|
140
|
+
* A one-word key like this looks alarmingly generic, and the risk is worth
|
|
141
|
+
* spelling out because it is bounded rather than absent: these keys are
|
|
142
|
+
* consulted ONLY for rows that already matched one of the LLM metric NAMES
|
|
143
|
+
* above. A `type` attribute on some unrelated business metric is never
|
|
144
|
+
* reached by this code path, because that metric's name never enters the
|
|
145
|
+
* query. The key is also last-but-two in preference order, so any emitter
|
|
146
|
+
* carrying a namespaced spelling as well wins over it.
|
|
147
|
+
*/
|
|
148
|
+
"type",
|
|
149
|
+
// Cursor Enterprise OTel export.
|
|
150
|
+
"cursor.token.type",
|
|
151
|
+
// OpenAI Codex CLI.
|
|
152
|
+
"token_type",
|
|
57
153
|
];
|
|
58
154
|
/*
|
|
59
155
|
* Attribute values that mean "tokens sent to the model". `prompt` is the
|
|
@@ -63,13 +159,109 @@ export const LlmInputTokenTypeValues = ["input", "prompt"];
|
|
|
63
159
|
/*
|
|
64
160
|
* Attribute values that mean "tokens produced by the model".
|
|
65
161
|
*
|
|
66
|
-
* Note what is deliberately absent
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
162
|
+
* Note what is deliberately absent, and why each exclusion is its own
|
|
163
|
+
* decision rather than an oversight. The coding-agent CLIs emit a richer
|
|
164
|
+
* token vocabulary than the semconv does:
|
|
165
|
+
*
|
|
166
|
+
* Claude Code input | output | cacheRead | cacheCreation (camelCase!)
|
|
167
|
+
* Cursor input | output | cache_read | cache_creation
|
|
168
|
+
* Codex total | input | cached_input | cache_write_input |
|
|
169
|
+
* output | reasoning_output
|
|
170
|
+
*
|
|
171
|
+
* The plain input/output values are covered by the two lists here and need
|
|
172
|
+
* nothing added. The rest are excluded on purpose:
|
|
173
|
+
*
|
|
174
|
+
* - cache_read / cacheRead / cached_input, and
|
|
175
|
+
* cache_creation / cacheCreation / cache_write_input
|
|
176
|
+
* Real token counts, but neither input nor output in the sense the span
|
|
177
|
+
* columns (llmInputTokens / llmOutputTokens) use. Folding them in would
|
|
178
|
+
* silently inflate the metric-sourced totals against the span-sourced
|
|
179
|
+
* ones they stand in for. Cache-aware accounting deserves its own
|
|
180
|
+
* columns; until it has them, these are dropped rather than guessed at.
|
|
181
|
+
* - total
|
|
182
|
+
* A SUPERSET of its siblings. Codex emits it ALONGSIDE the per-kind
|
|
183
|
+
* datapoints, so counting it would add every token a second time.
|
|
184
|
+
* - reasoning_output
|
|
185
|
+
* A SUBSET of `output` — the reasoning share of the same tokens, which
|
|
186
|
+
* Codex also reports under `output`. Counting it would double-count the
|
|
187
|
+
* reasoning portion of every turn.
|
|
188
|
+
*
|
|
189
|
+
* Both classes are pinned by explicit getLlmTokenDirection tests, so a future
|
|
190
|
+
* "why is this not handled?" reads as a decision, not a gap.
|
|
71
191
|
*/
|
|
72
192
|
export const LlmOutputTokenTypeValues = ["output", "completion"];
|
|
193
|
+
/*
|
|
194
|
+
* Attribute keys naming WHO the metric datapoint belongs to, for grouping
|
|
195
|
+
* metric-sourced spend by employee — the metric-side counterpart of
|
|
196
|
+
* LlmUserIdAttributeKeys in Common/Types/Telemetry/LlmConventions.ts.
|
|
197
|
+
*
|
|
198
|
+
* Email leads here rather than id (the span list is the other way round)
|
|
199
|
+
* because the coding-agent CLIs that dominate the metric-only population emit
|
|
200
|
+
* user.email natively, and it is the one value a manager reads without a
|
|
201
|
+
* lookup table. cursor.user.id sorts last for the same reason it does on the
|
|
202
|
+
* span side: it is an opaque team-scoped integer.
|
|
203
|
+
*
|
|
204
|
+
* Both lists below are resource-widened for the same reason the span lists
|
|
205
|
+
* are: OtelMetricsIngestService flattens resource attributes with the
|
|
206
|
+
* "resource" prefix exactly as the traces service does, so a fleet that
|
|
207
|
+
* stamps identity once on the resource — which is the normal thing to do, and
|
|
208
|
+
* the only thing OTEL_RESOURCE_ATTRIBUTES can do — arrives here as
|
|
209
|
+
* `resource.user.email` / `resource.team.id`. The bare tier still leads, so
|
|
210
|
+
* METRIC_USER_ATTRIBUTE_KEY / METRIC_TEAM_ATTRIBUTE_KEY (element zero, used
|
|
211
|
+
* for scoped filtering in LlmMetricQuery) are unchanged.
|
|
212
|
+
*/
|
|
213
|
+
export const LlmMetricUserBaseAttributeKeys = [
|
|
214
|
+
"user.email",
|
|
215
|
+
"user.id",
|
|
216
|
+
"user.account_uuid",
|
|
217
|
+
"user.account_id",
|
|
218
|
+
"cursor.user.id",
|
|
219
|
+
];
|
|
220
|
+
export const LlmMetricUserAttributeKeys = withResourcePrefixedKeys(LlmMetricUserBaseAttributeKeys);
|
|
221
|
+
/*
|
|
222
|
+
* Attribute keys naming the team / cost centre a metric datapoint charges to.
|
|
223
|
+
* The first four are conventionally set by the operator via
|
|
224
|
+
* OTEL_RESOURCE_ATTRIBUTES rather than emitted by any instrumentation — which
|
|
225
|
+
* is precisely why the resource tier has to be here too; see above.
|
|
226
|
+
*/
|
|
227
|
+
export const LlmMetricTeamBaseAttributeKeys = [
|
|
228
|
+
"team.id",
|
|
229
|
+
"team",
|
|
230
|
+
"cost_center",
|
|
231
|
+
"department",
|
|
232
|
+
"cursor.team.id",
|
|
233
|
+
];
|
|
234
|
+
export const LlmMetricTeamAttributeKeys = withResourcePrefixedKeys(LlmMetricTeamBaseAttributeKeys);
|
|
235
|
+
/*
|
|
236
|
+
* Attribute keys naming WHICH MODEL a metric datapoint was produced by.
|
|
237
|
+
*
|
|
238
|
+
* This exists because the vendor cost/token counters DO carry the model on
|
|
239
|
+
* the datapoint even though they carry no provider and no service id:
|
|
240
|
+
* claude_code.cost.usage and claude_code.token.usage stamp a bare `model`,
|
|
241
|
+
* and cursor.cost.usage stamps `cursor.model.name`. Without this list the
|
|
242
|
+
* Model breakdown is empty for an entire fleet of coding agents whose spend
|
|
243
|
+
* is perfectly well attributed to a model — the same failure the user list
|
|
244
|
+
* above fixes for people.
|
|
245
|
+
*
|
|
246
|
+
* `model` is bare and looks alarmingly generic, and the bound is the same one
|
|
247
|
+
* that makes the bare `type` token key safe: these keys are only ever read
|
|
248
|
+
* off rows that already matched one of the LLM metric NAMES above, so a
|
|
249
|
+
* `model` attribute on some unrelated business metric is never reached. It
|
|
250
|
+
* also sorts after the semantic-convention spelling, so an emitter carrying
|
|
251
|
+
* both wins with the namespaced one.
|
|
252
|
+
*
|
|
253
|
+
* Resource-widened for the same reason the identity lists are: a fleet that
|
|
254
|
+
* pins one model per deployment sets it once via OTEL_RESOURCE_ATTRIBUTES,
|
|
255
|
+
* and OtelMetricsIngestService flattens that to `resource.model`.
|
|
256
|
+
*/
|
|
257
|
+
export const LlmMetricModelBaseAttributeKeys = [
|
|
258
|
+
"gen_ai.request.model",
|
|
259
|
+
// Anthropic Claude Code CLI — bare, on both its cost and token counters.
|
|
260
|
+
"model",
|
|
261
|
+
// Cursor Enterprise OTel export.
|
|
262
|
+
"cursor.model.name",
|
|
263
|
+
];
|
|
264
|
+
export const LlmMetricModelAttributeKeys = withResourcePrefixedKeys(LlmMetricModelBaseAttributeKeys);
|
|
73
265
|
export function getLlmTokenDirection(attributeValue) {
|
|
74
266
|
if (typeof attributeValue !== "string") {
|
|
75
267
|
return null;
|