@oneuptime/common 10.0.53 → 10.0.54
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/Metric.ts +78 -0
- package/Server/API/AIAgentDataAPI.ts +6 -1
- package/Server/API/BillingAPI.ts +28 -6
- package/Server/API/CommonAPI.ts +11 -0
- package/Server/API/DashboardAPI.ts +6 -2
- package/Server/API/DashboardDomainAPI.ts +10 -3
- package/Server/API/GitHubAPI.ts +58 -14
- package/Server/API/MicrosoftTeamsAPI.ts +97 -33
- package/Server/API/OpenSourceDeploymentAPI.ts +2 -2
- package/Server/API/SlackAPI.ts +107 -36
- package/Server/API/StatusAPI.ts +37 -16
- package/Server/API/StatusPageAPI.ts +97 -23
- package/Server/API/StatusPageDomainAPI.ts +6 -3
- package/Server/API/UserAPI.ts +3 -3
- package/Server/API/UserCallAPI.ts +5 -2
- package/Server/API/UserEmailAPI.ts +5 -2
- package/Server/API/UserPushAPI.ts +9 -3
- package/Server/API/UserSmsAPI.ts +5 -2
- package/Server/API/UserWhatsAppAPI.ts +5 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Middleware/NotificationMiddleware.ts +2 -2
- package/Server/Middleware/ProjectAuthorization.ts +6 -0
- package/Server/Middleware/SCIMAuthorization.ts +2 -1
- package/Server/Middleware/SlackAuthorization.ts +28 -10
- package/Server/Middleware/TelemetryIngest.ts +16 -3
- package/Server/Middleware/UserAuthorization.ts +22 -5
- package/Server/Middleware/WhatsAppAuthorization.ts +15 -4
- package/Server/Services/AIAgentService.ts +13 -6
- package/Server/Services/AIService.ts +9 -3
- package/Server/Services/AlertEpisodeFeedService.ts +17 -5
- package/Server/Services/AlertEpisodeService.ts +34 -3
- package/Server/Services/AlertEpisodeStateTimelineService.ts +80 -22
- package/Server/Services/AlertFeedService.ts +17 -5
- package/Server/Services/AlertGroupingEngineService.ts +36 -7
- package/Server/Services/AlertService.ts +60 -8
- package/Server/Services/AlertStateTimelineService.ts +29 -7
- package/Server/Services/AnalyticsDatabaseService.ts +59 -25
- package/Server/Services/BillingInvoiceService.ts +7 -3
- package/Server/Services/BillingService.ts +9 -2
- package/Server/Services/DashboardDomainService.ts +56 -22
- package/Server/Services/DashboardService.ts +11 -4
- package/Server/Services/DatabaseService.ts +31 -11
- package/Server/Services/IncidentEpisodeFeedService.ts +17 -5
- package/Server/Services/IncidentEpisodeService.ts +34 -3
- package/Server/Services/IncidentEpisodeStateTimelineService.ts +80 -22
- package/Server/Services/IncidentFeedService.ts +33 -9
- package/Server/Services/IncidentGroupingEngineService.ts +35 -6
- package/Server/Services/IncidentService.ts +103 -9
- package/Server/Services/IncidentSlaRuleService.ts +16 -4
- package/Server/Services/IncidentSlaService.ts +20 -4
- package/Server/Services/IncidentStateTimelineService.ts +120 -31
- package/Server/Services/KubernetesClusterService.ts +62 -14
- package/Server/Services/MonitorFeedService.ts +33 -9
- package/Server/Services/MonitorProbeService.ts +4 -2
- package/Server/Services/MonitorService.ts +35 -4
- package/Server/Services/MonitorStatusTimelineService.ts +68 -20
- package/Server/Services/NotificationService.ts +4 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +53 -9
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +9 -2
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +29 -8
- package/Server/Services/OnCallDutyPolicyFeedService.ts +33 -8
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +97 -24
- package/Server/Services/OnCallDutyPolicyService.ts +2 -1
- package/Server/Services/OpenTelemetryIngestService.ts +51 -20
- package/Server/Services/ProbeService.ts +16 -7
- package/Server/Services/ProjectService.ts +21 -7
- package/Server/Services/ScheduledMaintenanceFeedService.ts +17 -4
- package/Server/Services/ScheduledMaintenanceService.ts +52 -6
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +72 -20
- package/Server/Services/StatusPageDomainService.ts +59 -23
- package/Server/Services/StatusPageService.ts +26 -8
- package/Server/Services/StatusPageSubscriberService.ts +382 -111
- package/Server/Services/TeamMemberService.ts +9 -3
- package/Server/Services/UserNotificationRuleService.ts +9 -3
- package/Server/Services/UserService.ts +6 -4
- package/Server/Services/UserWhatsAppService.ts +9 -3
- package/Server/Services/WorkflowService.ts +7 -3
- package/Server/Services/WorkspaceNotificationRuleService.ts +398 -156
- package/Server/Types/Domain.ts +15 -5
- package/Server/Types/Workflow/Components/API/Post.ts +22 -8
- package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +12 -4
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +10 -0
- package/Server/Utils/CodeRepository/CodeRepository.ts +62 -13
- package/Server/Utils/Express.ts +1 -0
- package/Server/Utils/Greenlock/Greenlock.ts +75 -20
- package/Server/Utils/LLM/LLMService.ts +22 -7
- package/Server/Utils/Logger.ts +93 -13
- package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -5
- package/Server/Utils/Monitor/MonitorIncident.ts +17 -3
- package/Server/Utils/Monitor/MonitorStatusTimeline.ts +6 -1
- package/Server/Utils/Profiling.ts +11 -5
- package/Server/Utils/Realtime.ts +90 -31
- package/Server/Utils/Response.ts +2 -2
- package/Server/Utils/StartServer.ts +43 -9
- package/Server/Utils/Telemetry/SpanUtil.ts +90 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +58 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +58 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +19 -3
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +87 -22
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +12 -3
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +25 -7
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +55 -8
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +100 -22
- package/Server/Utils/Workspace/Slack/Actions/Alert.ts +35 -9
- package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +32 -8
- package/Server/Utils/Workspace/Slack/Actions/Auth.ts +3 -1
- package/Server/Utils/Workspace/Slack/Actions/Incident.ts +52 -11
- package/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.ts +4 -1
- package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +89 -20
- package/Server/Utils/Workspace/Slack/Slack.ts +498 -247
- package/Server/Utils/Workspace/Workspace.ts +33 -11
- package/Server/Utils/Workspace/WorkspaceBase.ts +3 -1
- package/Server/Utils/Workspace/WorkspaceMessages/Alert.ts +8 -2
- package/Tests/Server/Middleware/UserAuthorization.test.ts +1 -1
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +12 -3
- package/UI/Components/Charts/Area/AreaChart.tsx +35 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +7 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +33 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +33 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.ts +14 -0
- package/UI/Components/Charts/Line/LineChart.tsx +35 -1
- package/UI/Components/Charts/Types/ExemplarPoint.ts +6 -0
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +3 -3
- package/UI/Components/Navbar/NavBar.tsx +10 -0
- package/build/dist/Models/AnalyticsModels/Metric.js +70 -0
- package/build/dist/Models/AnalyticsModels/Metric.js.map +1 -1
- package/build/dist/Server/API/AIAgentDataAPI.js +6 -6
- package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
- package/build/dist/Server/API/BillingAPI.js +13 -13
- package/build/dist/Server/API/BillingAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +5 -0
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +2 -2
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardDomainAPI.js +3 -3
- package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -1
- package/build/dist/Server/API/GitHubAPI.js +19 -19
- package/build/dist/Server/API/GitHubAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +34 -34
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/OpenSourceDeploymentAPI.js +2 -2
- package/build/dist/Server/API/OpenSourceDeploymentAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +38 -38
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/StatusAPI.js +16 -16
- package/build/dist/Server/API/StatusAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +52 -52
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageDomainAPI.js +3 -3
- package/build/dist/Server/API/StatusPageDomainAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +3 -3
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/API/UserCallAPI.js +2 -2
- package/build/dist/Server/API/UserCallAPI.js.map +1 -1
- package/build/dist/Server/API/UserEmailAPI.js +2 -2
- package/build/dist/Server/API/UserEmailAPI.js.map +1 -1
- package/build/dist/Server/API/UserPushAPI.js +3 -3
- package/build/dist/Server/API/UserPushAPI.js.map +1 -1
- package/build/dist/Server/API/UserSmsAPI.js +2 -2
- package/build/dist/Server/API/UserSmsAPI.js.map +1 -1
- package/build/dist/Server/API/UserWhatsAppAPI.js +2 -2
- package/build/dist/Server/API/UserWhatsAppAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/NotificationMiddleware.js +2 -2
- package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -0
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SCIMAuthorization.js +2 -2
- package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SlackAuthorization.js +10 -10
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +9 -4
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +10 -5
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js +6 -6
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
- package/build/dist/Server/Services/AIAgentService.js +13 -7
- package/build/dist/Server/Services/AIAgentService.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +9 -2
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeFeedService.js +17 -5
- package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeService.js +40 -10
- package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +81 -24
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AlertFeedService.js +17 -5
- package/build/dist/Server/Services/AlertFeedService.js.map +1 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js +44 -28
- package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +72 -20
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +36 -13
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +52 -28
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/BillingInvoiceService.js +7 -2
- package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +8 -8
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/DashboardDomainService.js +49 -27
- package/build/dist/Server/Services/DashboardDomainService.js.map +1 -1
- package/build/dist/Server/Services/DashboardService.js +11 -4
- package/build/dist/Server/Services/DashboardService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +32 -12
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeFeedService.js +17 -5
- package/build/dist/Server/Services/IncidentEpisodeFeedService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +40 -10
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +81 -24
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentFeedService.js +34 -10
- package/build/dist/Server/Services/IncidentFeedService.js.map +1 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js +43 -29
- package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +116 -28
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js +19 -11
- package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaService.js +21 -14
- package/build/dist/Server/Services/IncidentSlaService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +130 -37
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +51 -14
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/MonitorFeedService.js +34 -10
- package/build/dist/Server/Services/MonitorFeedService.js.map +1 -1
- package/build/dist/Server/Services/MonitorProbeService.js +4 -2
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +42 -11
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +69 -21
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/NotificationService.js +4 -3
- package/build/dist/Server/Services/NotificationService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +49 -12
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +9 -3
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +26 -11
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +34 -10
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +94 -37
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +45 -17
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/ProbeService.js +13 -7
- package/build/dist/Server/Services/ProbeService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +33 -17
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +17 -5
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +71 -24
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +72 -24
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageDomainService.js +55 -29
- package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +29 -9
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +393 -130
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +10 -2
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +10 -2
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +8 -3
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserWhatsAppService.js +10 -2
- package/build/dist/Server/Services/UserWhatsAppService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowService.js +7 -2
- package/build/dist/Server/Services/WorkflowService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +367 -180
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Types/Domain.js +12 -6
- package/build/dist/Server/Types/Domain.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -7
- package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +11 -4
- package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +7 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/CodeRepository.js +45 -17
- package/build/dist/Server/Utils/CodeRepository/CodeRepository.js.map +1 -1
- package/build/dist/Server/Utils/Express.js.map +1 -1
- package/build/dist/Server/Utils/Greenlock/Greenlock.js +36 -29
- package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +18 -6
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Logger.js +61 -13
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +23 -20
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +13 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -22
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +6 -3
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Server/Utils/Profiling.js +9 -6
- package/build/dist/Server/Utils/Profiling.js.map +1 -1
- package/build/dist/Server/Utils/Realtime.js +50 -34
- package/build/dist/Server/Utils/Realtime.js.map +1 -1
- package/build/dist/Server/Utils/Response.js +2 -2
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +23 -11
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js +52 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +58 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +58 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +19 -5
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +90 -26
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +12 -3
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +25 -7
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +58 -19
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +102 -29
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +38 -9
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +34 -8
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +3 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +55 -13
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js +5 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +91 -26
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +355 -270
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Workspace.js +21 -12
- package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceBase.js +3 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js +9 -2
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js.map +1 -1
- package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js +1 -1
- package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js +12 -6
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +20 -2
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +2 -2
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +9 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +9 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +20 -2
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js.map +1 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +3 -3
- package/build/dist/UI/Components/Navbar/NavBar.js +9 -1
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import ObjectID from "../../../Types/ObjectID";
|
|
|
7
7
|
import WorkspaceMessagePayload, {
|
|
8
8
|
WorkspacePayloadMarkdown,
|
|
9
9
|
} from "../../../Types/Workspace/WorkspaceMessagePayload";
|
|
10
|
-
import logger from "../Logger";
|
|
10
|
+
import logger, { LogAttributes } from "../Logger";
|
|
11
11
|
import WorkspaceProjectAuthTokenService from "../../Services/WorkspaceProjectAuthTokenService";
|
|
12
12
|
import WorkspaceProjectAuthToken, {
|
|
13
13
|
SlackMiscData,
|
|
@@ -157,8 +157,15 @@ export default class WorkspaceUtil {
|
|
|
157
157
|
projectId: ObjectID;
|
|
158
158
|
messagePayloadsByWorkspace: Array<WorkspaceMessagePayload>;
|
|
159
159
|
}): Promise<Array<WorkspaceSendMessageResponse>> {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const workspaceLogAttributes: LogAttributes = {
|
|
161
|
+
projectId: data.projectId?.toString(),
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
logger.debug(
|
|
165
|
+
"postToWorkspaceChannels called with data:",
|
|
166
|
+
workspaceLogAttributes,
|
|
167
|
+
);
|
|
168
|
+
logger.debug(JSON.stringify(data, null, 2), workspaceLogAttributes);
|
|
162
169
|
|
|
163
170
|
const responses: Array<WorkspaceSendMessageResponse> = [];
|
|
164
171
|
|
|
@@ -214,9 +221,12 @@ export default class WorkspaceUtil {
|
|
|
214
221
|
responses.push(result);
|
|
215
222
|
}
|
|
216
223
|
|
|
217
|
-
logger.debug(
|
|
218
|
-
|
|
219
|
-
|
|
224
|
+
logger.debug(
|
|
225
|
+
"Message posted to workspace channels successfully",
|
|
226
|
+
workspaceLogAttributes,
|
|
227
|
+
);
|
|
228
|
+
logger.debug("Returning thread IDs", workspaceLogAttributes);
|
|
229
|
+
logger.debug(JSON.stringify(responses, null, 2), workspaceLogAttributes);
|
|
220
230
|
|
|
221
231
|
return responses;
|
|
222
232
|
}
|
|
@@ -229,8 +239,15 @@ export default class WorkspaceUtil {
|
|
|
229
239
|
workspaceMessagePayload: WorkspaceMessagePayload;
|
|
230
240
|
projectId: ObjectID;
|
|
231
241
|
}): Promise<WorkspaceSendMessageResponse> {
|
|
232
|
-
|
|
233
|
-
|
|
242
|
+
const postLogAttributes: LogAttributes = {
|
|
243
|
+
projectId: data.projectId?.toString(),
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
logger.debug(
|
|
247
|
+
"postToWorkspaceChannels called with data:",
|
|
248
|
+
postLogAttributes,
|
|
249
|
+
);
|
|
250
|
+
logger.debug(data, postLogAttributes);
|
|
234
251
|
|
|
235
252
|
const result: WorkspaceSendMessageResponse =
|
|
236
253
|
await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).sendMessage({
|
|
@@ -240,9 +257,12 @@ export default class WorkspaceUtil {
|
|
|
240
257
|
projectId: data.projectId,
|
|
241
258
|
});
|
|
242
259
|
|
|
243
|
-
logger.debug(
|
|
244
|
-
|
|
245
|
-
|
|
260
|
+
logger.debug(
|
|
261
|
+
"Message posted to workspace channels successfully",
|
|
262
|
+
postLogAttributes,
|
|
263
|
+
);
|
|
264
|
+
logger.debug("Returning thread IDs", postLogAttributes);
|
|
265
|
+
logger.debug(result, postLogAttributes);
|
|
246
266
|
|
|
247
267
|
return result;
|
|
248
268
|
}
|
|
@@ -283,6 +303,7 @@ export default class WorkspaceUtil {
|
|
|
283
303
|
if (!params.teamId) {
|
|
284
304
|
logger.error(
|
|
285
305
|
"Team ID is required for Microsoft Teams channel messages",
|
|
306
|
+
{ projectId: params.projectId?.toString() },
|
|
286
307
|
);
|
|
287
308
|
return [];
|
|
288
309
|
}
|
|
@@ -312,6 +333,7 @@ export default class WorkspaceUtil {
|
|
|
312
333
|
default:
|
|
313
334
|
logger.debug(
|
|
314
335
|
`Unsupported workspace type for channel messages: ${params.workspaceType}`,
|
|
336
|
+
{ projectId: params.projectId?.toString() },
|
|
315
337
|
);
|
|
316
338
|
return [];
|
|
317
339
|
}
|
|
@@ -35,8 +35,14 @@ export default class AlertWorkspaceMessages {
|
|
|
35
35
|
);
|
|
36
36
|
} catch (err) {
|
|
37
37
|
// log the error and continue.
|
|
38
|
-
logger.error("Error in createChannelsAndInviteUsersToChannels"
|
|
39
|
-
|
|
38
|
+
logger.error("Error in createChannelsAndInviteUsersToChannels", {
|
|
39
|
+
projectId: data.projectId?.toString(),
|
|
40
|
+
alertId: data.alertId?.toString(),
|
|
41
|
+
});
|
|
42
|
+
logger.error(err, {
|
|
43
|
+
projectId: data.projectId?.toString(),
|
|
44
|
+
alertId: data.alertId?.toString(),
|
|
45
|
+
});
|
|
40
46
|
return null;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
@@ -123,7 +123,7 @@ describe("UserMiddleware", () => {
|
|
|
123
123
|
|
|
124
124
|
expect(result).toEqual({});
|
|
125
125
|
expect(spyDecode).toHaveBeenCalledWith(mockedAccessToken);
|
|
126
|
-
expect(spyErrorLogger).toHaveBeenCalledWith(error);
|
|
126
|
+
expect(spyErrorLogger).toHaveBeenCalledWith(error, undefined);
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
test("should return an empty object when the decoded sso-token object doesn't have projectId property", () => {
|
|
@@ -96,8 +96,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
96
96
|
expect(logger.debug).toHaveBeenNthCalledWith(
|
|
97
97
|
1,
|
|
98
98
|
"<table-name> Count Statement",
|
|
99
|
+
{ tableName: "<table-name>" },
|
|
99
100
|
);
|
|
100
|
-
expect(logger.debug).toHaveBeenNthCalledWith(2, statement
|
|
101
|
+
expect(logger.debug).toHaveBeenNthCalledWith(2, statement, {
|
|
102
|
+
tableName: "<table-name>",
|
|
103
|
+
});
|
|
101
104
|
|
|
102
105
|
expect(statement.query).toBe(
|
|
103
106
|
"SELECT\n" +
|
|
@@ -201,8 +204,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
201
204
|
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(
|
|
202
205
|
1,
|
|
203
206
|
"<table-name> Find Statement",
|
|
207
|
+
{ tableName: "<table-name>" },
|
|
204
208
|
);
|
|
205
|
-
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(2, statement
|
|
209
|
+
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(2, statement, {
|
|
210
|
+
tableName: "<table-name>",
|
|
211
|
+
});
|
|
206
212
|
|
|
207
213
|
expect(statement.query).toBe(
|
|
208
214
|
"SELECT <select-statement> FROM {p0:Identifier}.{p1:Identifier} WHERE TRUE <where-statement> ORDER BY <sort-statement> LIMIT {p2:Int32} OFFSET {p3:Int32}",
|
|
@@ -340,8 +346,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
340
346
|
expect(logger.debug).toHaveBeenNthCalledWith(
|
|
341
347
|
1,
|
|
342
348
|
"<table-name> Delete Statement",
|
|
349
|
+
{ tableName: "<table-name>" },
|
|
343
350
|
);
|
|
344
|
-
expect(logger.debug).toHaveBeenNthCalledWith(2, statement
|
|
351
|
+
expect(logger.debug).toHaveBeenNthCalledWith(2, statement, {
|
|
352
|
+
tableName: "<table-name>",
|
|
353
|
+
});
|
|
345
354
|
|
|
346
355
|
expect(statement.query).toBe(
|
|
347
356
|
"ALTER TABLE {p0:Identifier}.{p1:Identifier}\n" +
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { AreaChart } from "../ChartLibrary/AreaChart/AreaChart";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {
|
|
3
|
+
FunctionComponent,
|
|
4
|
+
ReactElement,
|
|
5
|
+
useEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
} from "react";
|
|
3
8
|
import SeriesPoint from "../Types/SeriesPoints";
|
|
4
9
|
import { XAxis } from "../Types/XAxis/XAxis";
|
|
5
10
|
import YAxis from "../Types/YAxis/YAxis";
|
|
6
11
|
import ChartCurve from "../Types/ChartCurve";
|
|
7
12
|
import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
|
|
13
|
+
import FormattedExemplarPoint from "../ChartLibrary/Types/FormattedExemplarPoint";
|
|
8
14
|
import DataPointUtil from "../Utils/DataPoint";
|
|
9
15
|
import ChartReferenceLineProps from "../Types/ReferenceLineProps";
|
|
16
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
17
|
+
import XAxisUtil from "../Utils/XAxis";
|
|
10
18
|
import NoDataMessage from "../ChartGroup/NoDataMessage";
|
|
11
19
|
|
|
12
20
|
export interface ComponentProps {
|
|
@@ -17,6 +25,8 @@ export interface ComponentProps {
|
|
|
17
25
|
sync: boolean;
|
|
18
26
|
heightInPx?: number | undefined;
|
|
19
27
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
28
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
29
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
export interface AreaInternalProps extends ComponentProps {
|
|
@@ -42,6 +52,26 @@ const AreaChartElement: FunctionComponent<AreaInternalProps> = (
|
|
|
42
52
|
setRecords(records);
|
|
43
53
|
}, [props.data]);
|
|
44
54
|
|
|
55
|
+
// Format exemplar x values to match the chart's x-axis labels
|
|
56
|
+
const formattedExemplars: Array<FormattedExemplarPoint> = useMemo(() => {
|
|
57
|
+
if (!props.exemplarPoints || props.exemplarPoints.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const formatter: (value: Date) => string = XAxisUtil.getFormatter({
|
|
62
|
+
xAxisMax: props.xAxis.options.max,
|
|
63
|
+
xAxisMin: props.xAxis.options.min,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return props.exemplarPoints.map((exemplar: ExemplarPoint) => {
|
|
67
|
+
return {
|
|
68
|
+
formattedX: formatter(exemplar.x),
|
|
69
|
+
y: exemplar.y,
|
|
70
|
+
original: exemplar,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}, [props.exemplarPoints, props.xAxis]);
|
|
74
|
+
|
|
45
75
|
const className: string = props.heightInPx ? `` : "h-80";
|
|
46
76
|
const style: React.CSSProperties = props.heightInPx
|
|
47
77
|
? { height: `${props.heightInPx}px` }
|
|
@@ -83,6 +113,10 @@ const AreaChartElement: FunctionComponent<AreaInternalProps> = (
|
|
|
83
113
|
yAxisWidth={60}
|
|
84
114
|
onValueChange={() => {}}
|
|
85
115
|
referenceLines={props.referenceLines}
|
|
116
|
+
formattedExemplarPoints={
|
|
117
|
+
formattedExemplars.length > 0 ? formattedExemplars : undefined
|
|
118
|
+
}
|
|
119
|
+
onExemplarClick={props.onExemplarClick}
|
|
86
120
|
/>
|
|
87
121
|
{hasNoData && <NoDataMessage />}
|
|
88
122
|
</div>
|
|
@@ -7,6 +7,7 @@ import BarChartElement, {
|
|
|
7
7
|
import AreaChartElement, {
|
|
8
8
|
ComponentProps as AreaChartProps,
|
|
9
9
|
} from "../Area/AreaChart";
|
|
10
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
10
11
|
import Icon, { SizeProp } from "../../Icon/Icon";
|
|
11
12
|
import IconProp from "../../../../Types/Icon/IconProp";
|
|
12
13
|
import Modal, { ModalWidth } from "../../Modal/Modal";
|
|
@@ -33,6 +34,8 @@ export interface Chart {
|
|
|
33
34
|
type: ChartType;
|
|
34
35
|
props: LineChartProps | BarChartProps | AreaChartProps;
|
|
35
36
|
metricInfo?: ChartMetricInfo | undefined;
|
|
37
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
38
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
export interface ComponentProps {
|
|
@@ -67,6 +70,8 @@ const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
|
67
70
|
{...(chart.props as LineChartProps)}
|
|
68
71
|
syncid={syncId}
|
|
69
72
|
heightInPx={props.heightInPx}
|
|
73
|
+
exemplarPoints={chart.exemplarPoints}
|
|
74
|
+
onExemplarClick={chart.onExemplarClick}
|
|
70
75
|
/>
|
|
71
76
|
);
|
|
72
77
|
case ChartType.BAR:
|
|
@@ -85,6 +90,8 @@ const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
|
85
90
|
{...(chart.props as AreaChartProps)}
|
|
86
91
|
syncid={syncId}
|
|
87
92
|
heightInPx={props.heightInPx}
|
|
93
|
+
exemplarPoints={chart.exemplarPoints}
|
|
94
|
+
onExemplarClick={chart.onExemplarClick}
|
|
88
95
|
/>
|
|
89
96
|
);
|
|
90
97
|
default:
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Dot,
|
|
12
12
|
Label,
|
|
13
13
|
Legend as RechartsLegend,
|
|
14
|
+
ReferenceDot,
|
|
14
15
|
ReferenceLine,
|
|
15
16
|
ResponsiveContainer,
|
|
16
17
|
Tooltip,
|
|
@@ -18,6 +19,8 @@ import {
|
|
|
18
19
|
YAxis,
|
|
19
20
|
} from "recharts";
|
|
20
21
|
import ChartReferenceLineProps from "../../Types/ReferenceLineProps";
|
|
22
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
23
|
+
import FormattedExemplarPoint from "../Types/FormattedExemplarPoint";
|
|
21
24
|
import { AxisDomain } from "recharts/types/util/types";
|
|
22
25
|
|
|
23
26
|
import { useOnWindowResize } from "../Utils/UseWindowOnResize";
|
|
@@ -557,6 +560,8 @@ interface AreaChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
557
560
|
customTooltip?: React.ComponentType<TooltipProps>;
|
|
558
561
|
syncid?: string | undefined;
|
|
559
562
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
563
|
+
formattedExemplarPoints?: Array<FormattedExemplarPoint> | undefined;
|
|
564
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
560
565
|
}
|
|
561
566
|
|
|
562
567
|
const AreaChart: React.ForwardRefExoticComponent<
|
|
@@ -1000,6 +1005,34 @@ const AreaChart: React.ForwardRefExoticComponent<
|
|
|
1000
1005
|
);
|
|
1001
1006
|
},
|
|
1002
1007
|
)}
|
|
1008
|
+
{/* Exemplar dots - clickable markers linking to traces */}
|
|
1009
|
+
{props.formattedExemplarPoints?.map(
|
|
1010
|
+
(exemplar: FormattedExemplarPoint, exemplarIndex: number) => {
|
|
1011
|
+
return (
|
|
1012
|
+
<ReferenceDot
|
|
1013
|
+
key={`exemplar-${exemplarIndex}`}
|
|
1014
|
+
x={exemplar.formattedX}
|
|
1015
|
+
y={exemplar.y}
|
|
1016
|
+
r={5}
|
|
1017
|
+
fill="#7c3aed"
|
|
1018
|
+
stroke="#ffffff"
|
|
1019
|
+
strokeWidth={2}
|
|
1020
|
+
style={{ cursor: "pointer" }}
|
|
1021
|
+
onClick={() => {
|
|
1022
|
+
props.onExemplarClick?.(exemplar.original);
|
|
1023
|
+
}}
|
|
1024
|
+
>
|
|
1025
|
+
<Label
|
|
1026
|
+
value="E"
|
|
1027
|
+
position="center"
|
|
1028
|
+
fill="#ffffff"
|
|
1029
|
+
fontSize={8}
|
|
1030
|
+
fontWeight={700}
|
|
1031
|
+
/>
|
|
1032
|
+
</ReferenceDot>
|
|
1033
|
+
);
|
|
1034
|
+
},
|
|
1035
|
+
)}
|
|
1003
1036
|
</RechartsAreaChart>
|
|
1004
1037
|
</ResponsiveContainer>
|
|
1005
1038
|
</div>
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Line,
|
|
13
13
|
Legend as RechartsLegend,
|
|
14
14
|
LineChart as RechartsLineChart,
|
|
15
|
+
ReferenceDot,
|
|
15
16
|
ReferenceLine,
|
|
16
17
|
ResponsiveContainer,
|
|
17
18
|
Tooltip,
|
|
@@ -19,6 +20,8 @@ import {
|
|
|
19
20
|
YAxis,
|
|
20
21
|
} from "recharts";
|
|
21
22
|
import ChartReferenceLineProps from "../../Types/ReferenceLineProps";
|
|
23
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
24
|
+
import FormattedExemplarPoint from "../Types/FormattedExemplarPoint";
|
|
22
25
|
import { AxisDomain } from "recharts/types/util/types";
|
|
23
26
|
|
|
24
27
|
import { useOnWindowResize } from "../Utils/UseWindowOnResize";
|
|
@@ -574,6 +577,8 @@ interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
574
577
|
customTooltip?: React.ComponentType<TooltipProps>;
|
|
575
578
|
syncid?: string | undefined;
|
|
576
579
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
580
|
+
formattedExemplarPoints?: Array<FormattedExemplarPoint> | undefined;
|
|
581
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
577
582
|
}
|
|
578
583
|
|
|
579
584
|
const LineChart: React.ForwardRefExoticComponent<
|
|
@@ -1018,6 +1023,34 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
1018
1023
|
);
|
|
1019
1024
|
},
|
|
1020
1025
|
)}
|
|
1026
|
+
{/* Exemplar dots - clickable markers linking to traces */}
|
|
1027
|
+
{props.formattedExemplarPoints?.map(
|
|
1028
|
+
(exemplar: FormattedExemplarPoint, exemplarIndex: number) => {
|
|
1029
|
+
return (
|
|
1030
|
+
<ReferenceDot
|
|
1031
|
+
key={`exemplar-${exemplarIndex}`}
|
|
1032
|
+
x={exemplar.formattedX}
|
|
1033
|
+
y={exemplar.y}
|
|
1034
|
+
r={5}
|
|
1035
|
+
fill="#7c3aed"
|
|
1036
|
+
stroke="#ffffff"
|
|
1037
|
+
strokeWidth={2}
|
|
1038
|
+
style={{ cursor: "pointer" }}
|
|
1039
|
+
onClick={() => {
|
|
1040
|
+
props.onExemplarClick?.(exemplar.original);
|
|
1041
|
+
}}
|
|
1042
|
+
>
|
|
1043
|
+
<Label
|
|
1044
|
+
value="E"
|
|
1045
|
+
position="center"
|
|
1046
|
+
fill="#ffffff"
|
|
1047
|
+
fontSize={8}
|
|
1048
|
+
fontWeight={700}
|
|
1049
|
+
/>
|
|
1050
|
+
</ReferenceDot>
|
|
1051
|
+
);
|
|
1052
|
+
},
|
|
1053
|
+
)}
|
|
1021
1054
|
</RechartsLineChart>
|
|
1022
1055
|
</ResponsiveContainer>
|
|
1023
1056
|
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An exemplar point with a formatted x-axis label that matches the chart's
|
|
5
|
+
* x-axis formatting. Used internally by chart library components.
|
|
6
|
+
*/
|
|
7
|
+
export default interface FormattedExemplarPoint {
|
|
8
|
+
/** The formatted x-axis label (e.g. "12:30", "Feb 22") */
|
|
9
|
+
formattedX: string;
|
|
10
|
+
/** The y value */
|
|
11
|
+
y: number;
|
|
12
|
+
/** The original exemplar data for click handling */
|
|
13
|
+
original: ExemplarPoint;
|
|
14
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { LineChart } from "../ChartLibrary/LineChart/LineChart";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {
|
|
3
|
+
FunctionComponent,
|
|
4
|
+
ReactElement,
|
|
5
|
+
useEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
} from "react";
|
|
3
8
|
import SeriesPoint from "../Types/SeriesPoints";
|
|
4
9
|
import { XAxis } from "../Types/XAxis/XAxis";
|
|
5
10
|
import YAxis from "../Types/YAxis/YAxis";
|
|
6
11
|
import ChartCurve from "../Types/ChartCurve";
|
|
7
12
|
import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
|
|
13
|
+
import FormattedExemplarPoint from "../ChartLibrary/Types/FormattedExemplarPoint";
|
|
8
14
|
import DataPointUtil from "../Utils/DataPoint";
|
|
9
15
|
import ChartReferenceLineProps from "../Types/ReferenceLineProps";
|
|
16
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
17
|
+
import XAxisUtil from "../Utils/XAxis";
|
|
10
18
|
import NoDataMessage from "../ChartGroup/NoDataMessage";
|
|
11
19
|
|
|
12
20
|
export interface ComponentProps {
|
|
@@ -17,6 +25,8 @@ export interface ComponentProps {
|
|
|
17
25
|
sync: boolean;
|
|
18
26
|
heightInPx?: number | undefined;
|
|
19
27
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
28
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
29
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
export interface LineInternalProps extends ComponentProps {
|
|
@@ -42,6 +52,26 @@ const LineChartElement: FunctionComponent<LineInternalProps> = (
|
|
|
42
52
|
setRecords(records);
|
|
43
53
|
}, [props.data]);
|
|
44
54
|
|
|
55
|
+
// Format exemplar x values to match the chart's x-axis labels
|
|
56
|
+
const formattedExemplars: Array<FormattedExemplarPoint> = useMemo(() => {
|
|
57
|
+
if (!props.exemplarPoints || props.exemplarPoints.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const formatter: (value: Date) => string = XAxisUtil.getFormatter({
|
|
62
|
+
xAxisMax: props.xAxis.options.max,
|
|
63
|
+
xAxisMin: props.xAxis.options.min,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return props.exemplarPoints.map((exemplar: ExemplarPoint) => {
|
|
67
|
+
return {
|
|
68
|
+
formattedX: formatter(exemplar.x),
|
|
69
|
+
y: exemplar.y,
|
|
70
|
+
original: exemplar,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}, [props.exemplarPoints, props.xAxis]);
|
|
74
|
+
|
|
45
75
|
const className: string = props.heightInPx ? `` : "h-80";
|
|
46
76
|
const style: React.CSSProperties = props.heightInPx
|
|
47
77
|
? { height: `${props.heightInPx}px` }
|
|
@@ -82,6 +112,10 @@ const LineChartElement: FunctionComponent<LineInternalProps> = (
|
|
|
82
112
|
yAxisWidth={60}
|
|
83
113
|
onValueChange={() => {}}
|
|
84
114
|
referenceLines={props.referenceLines}
|
|
115
|
+
formattedExemplarPoints={
|
|
116
|
+
formattedExemplars.length > 0 ? formattedExemplars : undefined
|
|
117
|
+
}
|
|
118
|
+
onExemplarClick={props.onExemplarClick}
|
|
85
119
|
/>
|
|
86
120
|
{hasNoData && <NoDataMessage />}
|
|
87
121
|
</div>
|
|
@@ -327,7 +327,7 @@ const MarkdownViewer: FunctionComponent<ComponentProps> = (
|
|
|
327
327
|
p: ({ ...props }: any) => {
|
|
328
328
|
return (
|
|
329
329
|
<p
|
|
330
|
-
className="text-sm mt-2 mb-
|
|
330
|
+
className="text-sm mt-2 mb-1 text-gray-700 leading-relaxed"
|
|
331
331
|
{...props}
|
|
332
332
|
/>
|
|
333
333
|
);
|
|
@@ -391,10 +391,10 @@ const MarkdownViewer: FunctionComponent<ComponentProps> = (
|
|
|
391
391
|
);
|
|
392
392
|
},
|
|
393
393
|
ul: ({ ...props }: any) => {
|
|
394
|
-
return <ul className="list-disc pl-6 mt-
|
|
394
|
+
return <ul className="list-disc pl-6 mt-0 mb-1" {...props} />;
|
|
395
395
|
},
|
|
396
396
|
ol: ({ ...props }: any) => {
|
|
397
|
-
return <ol className="list-decimal pl-6 mt-
|
|
397
|
+
return <ol className="list-decimal pl-6 mt-0 mb-1" {...props} />;
|
|
398
398
|
},
|
|
399
399
|
blockquote: ({ children, ...props }: any) => {
|
|
400
400
|
return (
|
|
@@ -3,6 +3,7 @@ import React, {
|
|
|
3
3
|
ReactElement,
|
|
4
4
|
useState,
|
|
5
5
|
useEffect,
|
|
6
|
+
useRef,
|
|
6
7
|
} from "react";
|
|
7
8
|
import Route from "../../../Types/API/Route";
|
|
8
9
|
import URL from "../../../Types/API/URL";
|
|
@@ -60,6 +61,8 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
60
61
|
const [moreMenuTimeout, setMoreMenuTimeout] = useState<ReturnType<
|
|
61
62
|
typeof setTimeout
|
|
62
63
|
> | null>(null);
|
|
64
|
+
const suppressShowRef: React.MutableRefObject<boolean> =
|
|
65
|
+
useRef<boolean>(false);
|
|
63
66
|
|
|
64
67
|
// Use the existing outside click hook for mobile menu
|
|
65
68
|
const {
|
|
@@ -108,9 +111,16 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
setIsMoreMenuVisible(false);
|
|
114
|
+
suppressShowRef.current = true;
|
|
115
|
+
setTimeout(() => {
|
|
116
|
+
suppressShowRef.current = false;
|
|
117
|
+
}, 300);
|
|
111
118
|
};
|
|
112
119
|
|
|
113
120
|
const showMoreMenu: () => void = (): void => {
|
|
121
|
+
if (suppressShowRef.current) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
114
124
|
if (moreMenuTimeout) {
|
|
115
125
|
clearTimeout(moreMenuTimeout);
|
|
116
126
|
}
|
|
@@ -494,6 +494,62 @@ export default class Metric extends AnalyticsBaseModel {
|
|
|
494
494
|
update: [],
|
|
495
495
|
},
|
|
496
496
|
});
|
|
497
|
+
const traceIdColumn = new AnalyticsTableColumn({
|
|
498
|
+
key: "traceId",
|
|
499
|
+
title: "Trace ID",
|
|
500
|
+
description: "Trace ID from an exemplar associated with this metric data point",
|
|
501
|
+
required: false,
|
|
502
|
+
type: TableColumnType.Text,
|
|
503
|
+
skipIndex: {
|
|
504
|
+
name: "idx_trace_id",
|
|
505
|
+
type: SkipIndexType.BloomFilter,
|
|
506
|
+
params: [0.01],
|
|
507
|
+
granularity: 1,
|
|
508
|
+
},
|
|
509
|
+
accessControl: {
|
|
510
|
+
read: [
|
|
511
|
+
Permission.ProjectOwner,
|
|
512
|
+
Permission.ProjectAdmin,
|
|
513
|
+
Permission.ProjectMember,
|
|
514
|
+
Permission.ReadTelemetryServiceLog,
|
|
515
|
+
],
|
|
516
|
+
create: [
|
|
517
|
+
Permission.ProjectOwner,
|
|
518
|
+
Permission.ProjectAdmin,
|
|
519
|
+
Permission.ProjectMember,
|
|
520
|
+
Permission.CreateTelemetryServiceLog,
|
|
521
|
+
],
|
|
522
|
+
update: [],
|
|
523
|
+
},
|
|
524
|
+
});
|
|
525
|
+
const spanIdColumn = new AnalyticsTableColumn({
|
|
526
|
+
key: "spanId",
|
|
527
|
+
title: "Span ID",
|
|
528
|
+
description: "Span ID from an exemplar associated with this metric data point",
|
|
529
|
+
required: false,
|
|
530
|
+
type: TableColumnType.Text,
|
|
531
|
+
skipIndex: {
|
|
532
|
+
name: "idx_span_id",
|
|
533
|
+
type: SkipIndexType.BloomFilter,
|
|
534
|
+
params: [0.01],
|
|
535
|
+
granularity: 1,
|
|
536
|
+
},
|
|
537
|
+
accessControl: {
|
|
538
|
+
read: [
|
|
539
|
+
Permission.ProjectOwner,
|
|
540
|
+
Permission.ProjectAdmin,
|
|
541
|
+
Permission.ProjectMember,
|
|
542
|
+
Permission.ReadTelemetryServiceLog,
|
|
543
|
+
],
|
|
544
|
+
create: [
|
|
545
|
+
Permission.ProjectOwner,
|
|
546
|
+
Permission.ProjectAdmin,
|
|
547
|
+
Permission.ProjectMember,
|
|
548
|
+
Permission.CreateTelemetryServiceLog,
|
|
549
|
+
],
|
|
550
|
+
update: [],
|
|
551
|
+
},
|
|
552
|
+
});
|
|
497
553
|
const retentionDateColumn = new AnalyticsTableColumn({
|
|
498
554
|
key: "retentionDate",
|
|
499
555
|
title: "Retention Date",
|
|
@@ -555,6 +611,8 @@ export default class Metric extends AnalyticsBaseModel {
|
|
|
555
611
|
maxColumn,
|
|
556
612
|
bucketCountsColumn,
|
|
557
613
|
explicitBoundsColumn,
|
|
614
|
+
traceIdColumn,
|
|
615
|
+
spanIdColumn,
|
|
558
616
|
retentionDateColumn,
|
|
559
617
|
],
|
|
560
618
|
projections: [],
|
|
@@ -684,6 +742,18 @@ export default class Metric extends AnalyticsBaseModel {
|
|
|
684
742
|
set explicitBounds(v) {
|
|
685
743
|
this.setColumnValue("explicitBounds", v);
|
|
686
744
|
}
|
|
745
|
+
get traceId() {
|
|
746
|
+
return this.getColumnValue("traceId");
|
|
747
|
+
}
|
|
748
|
+
set traceId(v) {
|
|
749
|
+
this.setColumnValue("traceId", v);
|
|
750
|
+
}
|
|
751
|
+
get spanId() {
|
|
752
|
+
return this.getColumnValue("spanId");
|
|
753
|
+
}
|
|
754
|
+
set spanId(v) {
|
|
755
|
+
this.setColumnValue("spanId", v);
|
|
756
|
+
}
|
|
687
757
|
get retentionDate() {
|
|
688
758
|
return this.getColumnValue("retentionDate");
|
|
689
759
|
}
|