@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.
Files changed (380) hide show
  1. package/Models/AnalyticsModels/Metric.ts +78 -0
  2. package/Server/API/AIAgentDataAPI.ts +6 -1
  3. package/Server/API/BillingAPI.ts +28 -6
  4. package/Server/API/CommonAPI.ts +11 -0
  5. package/Server/API/DashboardAPI.ts +6 -2
  6. package/Server/API/DashboardDomainAPI.ts +10 -3
  7. package/Server/API/GitHubAPI.ts +58 -14
  8. package/Server/API/MicrosoftTeamsAPI.ts +97 -33
  9. package/Server/API/OpenSourceDeploymentAPI.ts +2 -2
  10. package/Server/API/SlackAPI.ts +107 -36
  11. package/Server/API/StatusAPI.ts +37 -16
  12. package/Server/API/StatusPageAPI.ts +97 -23
  13. package/Server/API/StatusPageDomainAPI.ts +6 -3
  14. package/Server/API/UserAPI.ts +3 -3
  15. package/Server/API/UserCallAPI.ts +5 -2
  16. package/Server/API/UserEmailAPI.ts +5 -2
  17. package/Server/API/UserPushAPI.ts +9 -3
  18. package/Server/API/UserSmsAPI.ts +5 -2
  19. package/Server/API/UserWhatsAppAPI.ts +5 -2
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.ts +47 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.ts +35 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
  23. package/Server/Middleware/NotificationMiddleware.ts +2 -2
  24. package/Server/Middleware/ProjectAuthorization.ts +6 -0
  25. package/Server/Middleware/SCIMAuthorization.ts +2 -1
  26. package/Server/Middleware/SlackAuthorization.ts +28 -10
  27. package/Server/Middleware/TelemetryIngest.ts +16 -3
  28. package/Server/Middleware/UserAuthorization.ts +22 -5
  29. package/Server/Middleware/WhatsAppAuthorization.ts +15 -4
  30. package/Server/Services/AIAgentService.ts +13 -6
  31. package/Server/Services/AIService.ts +9 -3
  32. package/Server/Services/AlertEpisodeFeedService.ts +17 -5
  33. package/Server/Services/AlertEpisodeService.ts +34 -3
  34. package/Server/Services/AlertEpisodeStateTimelineService.ts +80 -22
  35. package/Server/Services/AlertFeedService.ts +17 -5
  36. package/Server/Services/AlertGroupingEngineService.ts +36 -7
  37. package/Server/Services/AlertService.ts +60 -8
  38. package/Server/Services/AlertStateTimelineService.ts +29 -7
  39. package/Server/Services/AnalyticsDatabaseService.ts +59 -25
  40. package/Server/Services/BillingInvoiceService.ts +7 -3
  41. package/Server/Services/BillingService.ts +9 -2
  42. package/Server/Services/DashboardDomainService.ts +56 -22
  43. package/Server/Services/DashboardService.ts +11 -4
  44. package/Server/Services/DatabaseService.ts +31 -11
  45. package/Server/Services/IncidentEpisodeFeedService.ts +17 -5
  46. package/Server/Services/IncidentEpisodeService.ts +34 -3
  47. package/Server/Services/IncidentEpisodeStateTimelineService.ts +80 -22
  48. package/Server/Services/IncidentFeedService.ts +33 -9
  49. package/Server/Services/IncidentGroupingEngineService.ts +35 -6
  50. package/Server/Services/IncidentService.ts +103 -9
  51. package/Server/Services/IncidentSlaRuleService.ts +16 -4
  52. package/Server/Services/IncidentSlaService.ts +20 -4
  53. package/Server/Services/IncidentStateTimelineService.ts +120 -31
  54. package/Server/Services/KubernetesClusterService.ts +62 -14
  55. package/Server/Services/MonitorFeedService.ts +33 -9
  56. package/Server/Services/MonitorProbeService.ts +4 -2
  57. package/Server/Services/MonitorService.ts +35 -4
  58. package/Server/Services/MonitorStatusTimelineService.ts +68 -20
  59. package/Server/Services/NotificationService.ts +4 -2
  60. package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +53 -9
  61. package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +9 -2
  62. package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +29 -8
  63. package/Server/Services/OnCallDutyPolicyFeedService.ts +33 -8
  64. package/Server/Services/OnCallDutyPolicyScheduleService.ts +97 -24
  65. package/Server/Services/OnCallDutyPolicyService.ts +2 -1
  66. package/Server/Services/OpenTelemetryIngestService.ts +51 -20
  67. package/Server/Services/ProbeService.ts +16 -7
  68. package/Server/Services/ProjectService.ts +21 -7
  69. package/Server/Services/ScheduledMaintenanceFeedService.ts +17 -4
  70. package/Server/Services/ScheduledMaintenanceService.ts +52 -6
  71. package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +72 -20
  72. package/Server/Services/StatusPageDomainService.ts +59 -23
  73. package/Server/Services/StatusPageService.ts +26 -8
  74. package/Server/Services/StatusPageSubscriberService.ts +382 -111
  75. package/Server/Services/TeamMemberService.ts +9 -3
  76. package/Server/Services/UserNotificationRuleService.ts +9 -3
  77. package/Server/Services/UserService.ts +6 -4
  78. package/Server/Services/UserWhatsAppService.ts +9 -3
  79. package/Server/Services/WorkflowService.ts +7 -3
  80. package/Server/Services/WorkspaceNotificationRuleService.ts +398 -156
  81. package/Server/Types/Domain.ts +15 -5
  82. package/Server/Types/Workflow/Components/API/Post.ts +22 -8
  83. package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +12 -4
  84. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +10 -0
  85. package/Server/Utils/CodeRepository/CodeRepository.ts +62 -13
  86. package/Server/Utils/Express.ts +1 -0
  87. package/Server/Utils/Greenlock/Greenlock.ts +75 -20
  88. package/Server/Utils/LLM/LLMService.ts +22 -7
  89. package/Server/Utils/Logger.ts +93 -13
  90. package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
  91. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -5
  92. package/Server/Utils/Monitor/MonitorIncident.ts +17 -3
  93. package/Server/Utils/Monitor/MonitorStatusTimeline.ts +6 -1
  94. package/Server/Utils/Profiling.ts +11 -5
  95. package/Server/Utils/Realtime.ts +90 -31
  96. package/Server/Utils/Response.ts +2 -2
  97. package/Server/Utils/StartServer.ts +43 -9
  98. package/Server/Utils/Telemetry/SpanUtil.ts +90 -0
  99. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +58 -15
  100. package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +58 -15
  101. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +19 -3
  102. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +87 -22
  103. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +12 -3
  104. package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +25 -7
  105. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +55 -8
  106. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +100 -22
  107. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +35 -9
  108. package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +32 -8
  109. package/Server/Utils/Workspace/Slack/Actions/Auth.ts +3 -1
  110. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +52 -11
  111. package/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.ts +4 -1
  112. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +89 -20
  113. package/Server/Utils/Workspace/Slack/Slack.ts +498 -247
  114. package/Server/Utils/Workspace/Workspace.ts +33 -11
  115. package/Server/Utils/Workspace/WorkspaceBase.ts +3 -1
  116. package/Server/Utils/Workspace/WorkspaceMessages/Alert.ts +8 -2
  117. package/Tests/Server/Middleware/UserAuthorization.test.ts +1 -1
  118. package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +12 -3
  119. package/UI/Components/Charts/Area/AreaChart.tsx +35 -1
  120. package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +7 -0
  121. package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +33 -0
  122. package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +33 -0
  123. package/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.ts +14 -0
  124. package/UI/Components/Charts/Line/LineChart.tsx +35 -1
  125. package/UI/Components/Charts/Types/ExemplarPoint.ts +6 -0
  126. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +3 -3
  127. package/UI/Components/Navbar/NavBar.tsx +10 -0
  128. package/build/dist/Models/AnalyticsModels/Metric.js +70 -0
  129. package/build/dist/Models/AnalyticsModels/Metric.js.map +1 -1
  130. package/build/dist/Server/API/AIAgentDataAPI.js +6 -6
  131. package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
  132. package/build/dist/Server/API/BillingAPI.js +13 -13
  133. package/build/dist/Server/API/BillingAPI.js.map +1 -1
  134. package/build/dist/Server/API/CommonAPI.js +5 -0
  135. package/build/dist/Server/API/CommonAPI.js.map +1 -1
  136. package/build/dist/Server/API/DashboardAPI.js +2 -2
  137. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  138. package/build/dist/Server/API/DashboardDomainAPI.js +3 -3
  139. package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -1
  140. package/build/dist/Server/API/GitHubAPI.js +19 -19
  141. package/build/dist/Server/API/GitHubAPI.js.map +1 -1
  142. package/build/dist/Server/API/MicrosoftTeamsAPI.js +34 -34
  143. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
  144. package/build/dist/Server/API/OpenSourceDeploymentAPI.js +2 -2
  145. package/build/dist/Server/API/OpenSourceDeploymentAPI.js.map +1 -1
  146. package/build/dist/Server/API/SlackAPI.js +38 -38
  147. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  148. package/build/dist/Server/API/StatusAPI.js +16 -16
  149. package/build/dist/Server/API/StatusAPI.js.map +1 -1
  150. package/build/dist/Server/API/StatusPageAPI.js +52 -52
  151. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  152. package/build/dist/Server/API/StatusPageDomainAPI.js +3 -3
  153. package/build/dist/Server/API/StatusPageDomainAPI.js.map +1 -1
  154. package/build/dist/Server/API/UserAPI.js +3 -3
  155. package/build/dist/Server/API/UserAPI.js.map +1 -1
  156. package/build/dist/Server/API/UserCallAPI.js +2 -2
  157. package/build/dist/Server/API/UserCallAPI.js.map +1 -1
  158. package/build/dist/Server/API/UserEmailAPI.js +2 -2
  159. package/build/dist/Server/API/UserEmailAPI.js.map +1 -1
  160. package/build/dist/Server/API/UserPushAPI.js +3 -3
  161. package/build/dist/Server/API/UserPushAPI.js.map +1 -1
  162. package/build/dist/Server/API/UserSmsAPI.js +2 -2
  163. package/build/dist/Server/API/UserSmsAPI.js.map +1 -1
  164. package/build/dist/Server/API/UserWhatsAppAPI.js +2 -2
  165. package/build/dist/Server/API/UserWhatsAppAPI.js.map +1 -1
  166. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js +40 -0
  167. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js.map +1 -0
  168. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js +18 -0
  169. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js.map +1 -0
  170. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
  171. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  172. package/build/dist/Server/Middleware/NotificationMiddleware.js +2 -2
  173. package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
  174. package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -0
  175. package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
  176. package/build/dist/Server/Middleware/SCIMAuthorization.js +2 -2
  177. package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
  178. package/build/dist/Server/Middleware/SlackAuthorization.js +10 -10
  179. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  180. package/build/dist/Server/Middleware/TelemetryIngest.js +9 -4
  181. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  182. package/build/dist/Server/Middleware/UserAuthorization.js +10 -5
  183. package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
  184. package/build/dist/Server/Middleware/WhatsAppAuthorization.js +6 -6
  185. package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
  186. package/build/dist/Server/Services/AIAgentService.js +13 -7
  187. package/build/dist/Server/Services/AIAgentService.js.map +1 -1
  188. package/build/dist/Server/Services/AIService.js +9 -2
  189. package/build/dist/Server/Services/AIService.js.map +1 -1
  190. package/build/dist/Server/Services/AlertEpisodeFeedService.js +17 -5
  191. package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -1
  192. package/build/dist/Server/Services/AlertEpisodeService.js +40 -10
  193. package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
  194. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +81 -24
  195. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -1
  196. package/build/dist/Server/Services/AlertFeedService.js +17 -5
  197. package/build/dist/Server/Services/AlertFeedService.js.map +1 -1
  198. package/build/dist/Server/Services/AlertGroupingEngineService.js +44 -28
  199. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
  200. package/build/dist/Server/Services/AlertService.js +72 -20
  201. package/build/dist/Server/Services/AlertService.js.map +1 -1
  202. package/build/dist/Server/Services/AlertStateTimelineService.js +36 -13
  203. package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
  204. package/build/dist/Server/Services/AnalyticsDatabaseService.js +52 -28
  205. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  206. package/build/dist/Server/Services/BillingInvoiceService.js +7 -2
  207. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  208. package/build/dist/Server/Services/BillingService.js +8 -8
  209. package/build/dist/Server/Services/BillingService.js.map +1 -1
  210. package/build/dist/Server/Services/DashboardDomainService.js +49 -27
  211. package/build/dist/Server/Services/DashboardDomainService.js.map +1 -1
  212. package/build/dist/Server/Services/DashboardService.js +11 -4
  213. package/build/dist/Server/Services/DashboardService.js.map +1 -1
  214. package/build/dist/Server/Services/DatabaseService.js +32 -12
  215. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  216. package/build/dist/Server/Services/IncidentEpisodeFeedService.js +17 -5
  217. package/build/dist/Server/Services/IncidentEpisodeFeedService.js.map +1 -1
  218. package/build/dist/Server/Services/IncidentEpisodeService.js +40 -10
  219. package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
  220. package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +81 -24
  221. package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
  222. package/build/dist/Server/Services/IncidentFeedService.js +34 -10
  223. package/build/dist/Server/Services/IncidentFeedService.js.map +1 -1
  224. package/build/dist/Server/Services/IncidentGroupingEngineService.js +43 -29
  225. package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
  226. package/build/dist/Server/Services/IncidentService.js +116 -28
  227. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  228. package/build/dist/Server/Services/IncidentSlaRuleService.js +19 -11
  229. package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
  230. package/build/dist/Server/Services/IncidentSlaService.js +21 -14
  231. package/build/dist/Server/Services/IncidentSlaService.js.map +1 -1
  232. package/build/dist/Server/Services/IncidentStateTimelineService.js +130 -37
  233. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  234. package/build/dist/Server/Services/KubernetesClusterService.js +51 -14
  235. package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
  236. package/build/dist/Server/Services/MonitorFeedService.js +34 -10
  237. package/build/dist/Server/Services/MonitorFeedService.js.map +1 -1
  238. package/build/dist/Server/Services/MonitorProbeService.js +4 -2
  239. package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
  240. package/build/dist/Server/Services/MonitorService.js +42 -11
  241. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  242. package/build/dist/Server/Services/MonitorStatusTimelineService.js +69 -21
  243. package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
  244. package/build/dist/Server/Services/NotificationService.js +4 -3
  245. package/build/dist/Server/Services/NotificationService.js.map +1 -1
  246. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +49 -12
  247. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
  248. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +9 -3
  249. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
  250. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +26 -11
  251. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
  252. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +34 -10
  253. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -1
  254. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +94 -37
  255. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
  256. package/build/dist/Server/Services/OnCallDutyPolicyService.js +1 -1
  257. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  258. package/build/dist/Server/Services/OpenTelemetryIngestService.js +45 -17
  259. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  260. package/build/dist/Server/Services/ProbeService.js +13 -7
  261. package/build/dist/Server/Services/ProbeService.js.map +1 -1
  262. package/build/dist/Server/Services/ProjectService.js +33 -17
  263. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  264. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +17 -5
  265. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -1
  266. package/build/dist/Server/Services/ScheduledMaintenanceService.js +71 -24
  267. package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
  268. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +72 -24
  269. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
  270. package/build/dist/Server/Services/StatusPageDomainService.js +55 -29
  271. package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
  272. package/build/dist/Server/Services/StatusPageService.js +29 -9
  273. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  274. package/build/dist/Server/Services/StatusPageSubscriberService.js +393 -130
  275. package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
  276. package/build/dist/Server/Services/TeamMemberService.js +10 -2
  277. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  278. package/build/dist/Server/Services/UserNotificationRuleService.js +10 -2
  279. package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
  280. package/build/dist/Server/Services/UserService.js +8 -3
  281. package/build/dist/Server/Services/UserService.js.map +1 -1
  282. package/build/dist/Server/Services/UserWhatsAppService.js +10 -2
  283. package/build/dist/Server/Services/UserWhatsAppService.js.map +1 -1
  284. package/build/dist/Server/Services/WorkflowService.js +7 -2
  285. package/build/dist/Server/Services/WorkflowService.js.map +1 -1
  286. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +367 -180
  287. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  288. package/build/dist/Server/Types/Domain.js +12 -6
  289. package/build/dist/Server/Types/Domain.js.map +1 -1
  290. package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -7
  291. package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
  292. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +11 -4
  293. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
  294. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +7 -0
  295. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  296. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js +45 -17
  297. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js.map +1 -1
  298. package/build/dist/Server/Utils/Express.js.map +1 -1
  299. package/build/dist/Server/Utils/Greenlock/Greenlock.js +36 -29
  300. package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
  301. package/build/dist/Server/Utils/LLM/LLMService.js +18 -6
  302. package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
  303. package/build/dist/Server/Utils/Logger.js +61 -13
  304. package/build/dist/Server/Utils/Logger.js.map +1 -1
  305. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +23 -20
  306. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  307. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +13 -4
  308. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  309. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -22
  310. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  311. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +6 -3
  312. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
  313. package/build/dist/Server/Utils/Profiling.js +9 -6
  314. package/build/dist/Server/Utils/Profiling.js.map +1 -1
  315. package/build/dist/Server/Utils/Realtime.js +50 -34
  316. package/build/dist/Server/Utils/Realtime.js.map +1 -1
  317. package/build/dist/Server/Utils/Response.js +2 -2
  318. package/build/dist/Server/Utils/Response.js.map +1 -1
  319. package/build/dist/Server/Utils/StartServer.js +23 -11
  320. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  321. package/build/dist/Server/Utils/Telemetry/SpanUtil.js +52 -0
  322. package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -0
  323. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +58 -15
  324. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
  325. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +58 -15
  326. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
  327. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +19 -5
  328. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
  329. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +90 -26
  330. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
  331. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +12 -3
  332. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -1
  333. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +25 -7
  334. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -1
  335. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +58 -19
  336. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
  337. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +102 -29
  338. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  339. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +38 -9
  340. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  341. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +34 -8
  342. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -1
  343. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +3 -1
  344. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
  345. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +55 -13
  346. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  347. package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js +5 -1
  348. package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js.map +1 -1
  349. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +91 -26
  350. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  351. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +355 -270
  352. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  353. package/build/dist/Server/Utils/Workspace/Workspace.js +21 -12
  354. package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
  355. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js +3 -1
  356. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  357. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js +9 -2
  358. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js.map +1 -1
  359. package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js +1 -1
  360. package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js.map +1 -1
  361. package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js +12 -6
  362. package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js.map +1 -1
  363. package/build/dist/UI/Components/Charts/Area/AreaChart.js +20 -2
  364. package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
  365. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +2 -2
  366. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
  367. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +9 -2
  368. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
  369. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +9 -2
  370. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
  371. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js +2 -0
  372. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js.map +1 -0
  373. package/build/dist/UI/Components/Charts/Line/LineChart.js +20 -2
  374. package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
  375. package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js +2 -0
  376. package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js.map +1 -0
  377. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +3 -3
  378. package/build/dist/UI/Components/Navbar/NavBar.js +9 -1
  379. package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
  380. package/package.json +1 -1
@@ -146,7 +146,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
146
146
  authToken: string;
147
147
  projectId: ObjectID;
148
148
  }): Promise<string> {
149
- logger.debug("=== getValidAccessToken called ===");
149
+ logger.debug("=== getValidAccessToken called ===", {
150
+ projectId: data.projectId?.toString(),
151
+ });
150
152
 
151
153
  if (!data.projectId) {
152
154
  throw new BadDataException(
@@ -175,6 +177,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
175
177
  if (!projectAuth || !projectAuth.miscData) {
176
178
  logger.error(
177
179
  "Microsoft Teams integration not found for this project - no project auth or miscData",
180
+ {
181
+ projectId: data.projectId.toString(),
182
+ },
178
183
  );
179
184
  throw new BadDataException(
180
185
  "Microsoft Teams integration not found for this project",
@@ -190,6 +195,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
190
195
  if (!tenantId) {
191
196
  logger.error(
192
197
  "Microsoft Teams tenant ID missing from project auth configuration",
198
+ {
199
+ projectId: data.projectId.toString(),
200
+ },
193
201
  );
194
202
  throw new BadDataException(
195
203
  "Microsoft Teams tenant ID not found for this project",
@@ -260,7 +268,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
260
268
  }
261
269
 
262
270
  // If refresh failed, throw error
263
- logger.error("Could not obtain valid access token for Microsoft Teams");
271
+ logger.error("Could not obtain valid access token for Microsoft Teams", {
272
+ projectId: data.projectId.toString(),
273
+ });
264
274
  throw new BadDataException(
265
275
  "Could not obtain valid access token for Microsoft Teams",
266
276
  );
@@ -272,7 +282,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
272
282
  miscData: MicrosoftTeamsMiscData;
273
283
  tenantId: string;
274
284
  }): Promise<string | null> {
275
- logger.debug("=== refreshAccessToken called ===");
285
+ logger.debug("=== refreshAccessToken called ===", {
286
+ projectId: data.projectId?.toString(),
287
+ });
276
288
 
277
289
  if (!data.projectId) {
278
290
  throw new BadDataException(
@@ -391,7 +403,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
391
403
 
392
404
  return newAccessToken;
393
405
  } catch (error) {
394
- logger.error("Error refreshing Microsoft Teams access token:");
406
+ logger.error("Error refreshing Microsoft Teams access token:", {
407
+ projectId: data.projectId.toString(),
408
+ });
395
409
  logger.error(error);
396
410
  return null;
397
411
  }
@@ -693,7 +707,10 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
693
707
  userId: string;
694
708
  projectId: ObjectID;
695
709
  }): Promise<string | null> {
696
- logger.debug("Getting username from user ID with data:");
710
+ logger.debug("Getting username from user ID with data:", {
711
+ projectId: data.projectId.toString(),
712
+ userId: data.userId,
713
+ });
697
714
  logger.debug(data);
698
715
 
699
716
  // Get valid access token
@@ -717,7 +734,10 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
717
734
  logger.debug(response);
718
735
 
719
736
  if (response instanceof HTTPErrorResponse) {
720
- logger.error("Error response from Microsoft Graph API:");
737
+ logger.error("Error response from Microsoft Graph API:", {
738
+ projectId: data.projectId.toString(),
739
+ userId: data.userId,
740
+ });
721
741
  logger.error(response);
722
742
  throw response;
723
743
  }
@@ -1019,7 +1039,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1019
1039
  userId: string;
1020
1040
  projectId: ObjectID;
1021
1041
  }): Promise<WorkspaceSendMessageResponse> {
1022
- logger.debug("=== MicrosoftTeamsUtil.sendMessage called ===");
1042
+ logger.debug("=== MicrosoftTeamsUtil.sendMessage called ===", {
1043
+ projectId: data.projectId.toString(),
1044
+ });
1023
1045
  logger.debug("Sending message to Microsoft Teams with data:");
1024
1046
  logger.debug(data);
1025
1047
 
@@ -1124,7 +1146,13 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1124
1146
  logger.debug(`Channel info obtained: ${JSON.stringify(channel)}`);
1125
1147
  workspaceChannelsToPostTo.push(channel);
1126
1148
  } catch (err) {
1127
- logger.error(`Error getting channel info for channel ID ${channelId}:`);
1149
+ logger.error(
1150
+ `Error getting channel info for channel ID ${channelId}:`,
1151
+ {
1152
+ projectId: data.projectId.toString(),
1153
+ channelId: channelId,
1154
+ },
1155
+ );
1128
1156
  logger.error(err);
1129
1157
  }
1130
1158
  }
@@ -1172,7 +1200,10 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1172
1200
  workspaceMessageResponse.threads.push(lastThread);
1173
1201
  }
1174
1202
  } catch (e) {
1175
- logger.error(`Error sending message to channel ID ${channel.id}:`);
1203
+ logger.error(`Error sending message to channel ID ${channel.id}:`, {
1204
+ projectId: data.projectId.toString(),
1205
+ channelId: channel.id,
1206
+ });
1176
1207
  logger.error(e);
1177
1208
  workspaceMessageResponse.errors!.push({
1178
1209
  channel: channel,
@@ -1230,6 +1261,11 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1230
1261
 
1231
1262
  logger.debug(
1232
1263
  `Sending adaptive card to channel via Bot Framework: ${data.workspaceChannel.name} (${data.workspaceChannel.id})`,
1264
+ {
1265
+ projectId: data.projectId.toString(),
1266
+ channelId: data.workspaceChannel.id,
1267
+ teamId: data.teamId,
1268
+ },
1233
1269
  );
1234
1270
  logger.debug(`Team ID: ${data.teamId}`);
1235
1271
  logger.debug(`Adaptive card: ${JSON.stringify(data.adaptiveCard)}`);
@@ -1331,7 +1367,11 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1331
1367
  );
1332
1368
  return thread;
1333
1369
  } catch (error) {
1334
- logger.error("Error sending adaptive card via Bot Framework:");
1370
+ logger.error("Error sending adaptive card via Bot Framework:", {
1371
+ projectId: data.projectId.toString(),
1372
+ channelId: data.workspaceChannel.id,
1373
+ teamId: data.teamId,
1374
+ });
1335
1375
  logger.error(error);
1336
1376
  throw error;
1337
1377
  }
@@ -1344,7 +1384,11 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1344
1384
  teamId: string;
1345
1385
  projectId: ObjectID;
1346
1386
  }): Promise<WorkspaceChannel> {
1347
- logger.debug("=== getWorkspaceChannelFromChannelId called ===");
1387
+ logger.debug("=== getWorkspaceChannelFromChannelId called ===", {
1388
+ projectId: data.projectId?.toString(),
1389
+ channelId: data.channelId,
1390
+ teamId: data.teamId,
1391
+ });
1348
1392
 
1349
1393
  if (!data.projectId) {
1350
1394
  throw new BadDataException(
@@ -1391,7 +1435,11 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1391
1435
  });
1392
1436
 
1393
1437
  if (response instanceof HTTPErrorResponse) {
1394
- logger.error("Error getting channel info from Microsoft Graph API:");
1438
+ logger.error("Error getting channel info from Microsoft Graph API:", {
1439
+ projectId: data.projectId.toString(),
1440
+ channelId: data.channelId,
1441
+ teamId: data.teamId,
1442
+ });
1395
1443
  logger.error(response);
1396
1444
  // Fall back to basic channel object
1397
1445
  logger.debug("Falling back to basic channel object");
@@ -1416,7 +1464,11 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1416
1464
  logger.debug(`Channel info retrieved: ${JSON.stringify(channel)}`);
1417
1465
  return channel;
1418
1466
  } catch (error) {
1419
- logger.error("Error fetching channel information:");
1467
+ logger.error("Error fetching channel information:", {
1468
+ projectId: data.projectId.toString(),
1469
+ channelId: data.channelId,
1470
+ teamId: data.teamId,
1471
+ });
1420
1472
  logger.error(error);
1421
1473
  throw error;
1422
1474
  }
@@ -1901,7 +1953,9 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1901
1953
  });
1902
1954
 
1903
1955
  if (!projectAuth || !projectAuth.projectId) {
1904
- logger.error("Project auth not found for tenant ID: " + tenantId);
1956
+ logger.error("Project auth not found for tenant ID: " + tenantId, {
1957
+ tenantId: tenantId,
1958
+ });
1905
1959
  await data.turnContext.sendActivity(
1906
1960
  "Sorry, I couldn't find your project configuration. Please try again later.",
1907
1961
  );
@@ -1990,9 +2044,13 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
1990
2044
 
1991
2045
  // Send response directly using TurnContext - this is the recommended Bot Framework pattern
1992
2046
  await data.turnContext.sendActivity(responseText);
1993
- logger.debug("Bot message sent successfully using TurnContext");
2047
+ logger.debug("Bot message sent successfully using TurnContext", {
2048
+ projectId: projectId.toString(),
2049
+ });
1994
2050
  } catch (error) {
1995
- logger.error("Error sending bot message via TurnContext: " + error);
2051
+ logger.error("Error sending bot message via TurnContext: " + error, {
2052
+ projectId: projectId.toString(),
2053
+ });
1996
2054
  await data.turnContext.sendActivity(
1997
2055
  "Sorry, I encountered an error processing your request. Please try again later.",
1998
2056
  );
@@ -2503,6 +2561,9 @@ All monitoring checks are passing normally.`;
2503
2561
  if (!projectAuth || !projectAuth.projectId) {
2504
2562
  logger.error(
2505
2563
  "Project auth not found for invoke activity tenant: " + tenantId,
2564
+ {
2565
+ tenantId: tenantId,
2566
+ },
2506
2567
  );
2507
2568
  await data.turnContext.sendActivity(
2508
2569
  "Sorry, I couldn't find your project configuration.",
@@ -2519,6 +2580,9 @@ All monitoring checks are passing normally.`;
2519
2580
  if (!teamsUserId) {
2520
2581
  logger.error(
2521
2582
  "AAD Object ID (teamsUserId) not found in invoke activity from object",
2583
+ {
2584
+ projectId: projectId.toString(),
2585
+ },
2522
2586
  );
2523
2587
  await data.turnContext.sendActivity(
2524
2588
  "Sorry, I couldn't identify you. Please try again later.",
@@ -2644,7 +2708,9 @@ All monitoring checks are passing normally.`;
2644
2708
  return;
2645
2709
  }
2646
2710
  } catch (error) {
2647
- logger.error("Error handling bot invoke activity:");
2711
+ logger.error("Error handling bot invoke activity:", {
2712
+ actionType: actionType,
2713
+ });
2648
2714
  logger.error(error);
2649
2715
  await data.turnContext.sendActivity(
2650
2716
  "Sorry, that action failed. Please try again later.",
@@ -2981,7 +3047,9 @@ All monitoring checks are passing normally.`;
2981
3047
  userId?: ObjectID;
2982
3048
  userAccessToken?: string;
2983
3049
  }): Promise<Record<string, { id: string; name: string }>> {
2984
- logger.debug("=== refreshTeams called ===");
3050
+ logger.debug("=== refreshTeams called ===", {
3051
+ projectId: data.projectId?.toString(),
3052
+ });
2985
3053
 
2986
3054
  if (!data.projectId) {
2987
3055
  throw new BadDataException(
@@ -3076,7 +3144,9 @@ All monitoring checks are passing normally.`;
3076
3144
  });
3077
3145
 
3078
3146
  if (teamsResponse instanceof HTTPErrorResponse) {
3079
- logger.error("Error fetching teams from Microsoft Teams:");
3147
+ logger.error("Error fetching teams from Microsoft Teams:", {
3148
+ projectId: data.projectId.toString(),
3149
+ });
3080
3150
  logger.error(teamsResponse);
3081
3151
  throw new BadDataException(
3082
3152
  "Failed to fetch teams from Microsoft Teams",
@@ -3136,7 +3206,9 @@ All monitoring checks are passing normally.`;
3136
3206
 
3137
3207
  return availableTeams;
3138
3208
  } catch (error) {
3139
- logger.error("Error refreshing teams:");
3209
+ logger.error("Error refreshing teams:", {
3210
+ projectId: data.projectId.toString(),
3211
+ });
3140
3212
  logger.error(error);
3141
3213
  throw error;
3142
3214
  }
@@ -3148,7 +3220,10 @@ All monitoring checks are passing normally.`;
3148
3220
  userId: ObjectID;
3149
3221
  projectId: ObjectID;
3150
3222
  }): Promise<Array<JSONObject>> {
3151
- logger.debug("=== getUserJoinedTeams called ===");
3223
+ logger.debug("=== getUserJoinedTeams called ===", {
3224
+ projectId: data.projectId.toString(),
3225
+ userId: data.userId.toString(),
3226
+ });
3152
3227
  logger.debug(`User ID: ${data.userId.toString()}`);
3153
3228
  logger.debug(`Project ID: ${data.projectId.toString()}`);
3154
3229
 
@@ -3205,7 +3280,10 @@ All monitoring checks are passing normally.`;
3205
3280
 
3206
3281
  return teams;
3207
3282
  } catch (error) {
3208
- logger.error("Error getting user joined teams:");
3283
+ logger.error("Error getting user joined teams:", {
3284
+ projectId: data.projectId.toString(),
3285
+ userId: data.userId.toString(),
3286
+ });
3209
3287
  logger.error(error);
3210
3288
  throw error;
3211
3289
  }
@@ -160,7 +160,9 @@ export default class SlackAlertActions {
160
160
  isRoot: true,
161
161
  });
162
162
  } catch (err) {
163
- logger.error("Error logging button interaction:");
163
+ logger.error("Error logging button interaction:", {
164
+ projectId: slackRequest.projectId?.toString(),
165
+ });
164
166
  logger.error(err);
165
167
  // Don't throw the error, just log it so the main flow continues
166
168
  }
@@ -399,7 +401,9 @@ export default class SlackAlertActions {
399
401
  },
400
402
  });
401
403
 
402
- logger.debug("Alert States: ");
404
+ logger.debug("Alert States: ", {
405
+ projectId: data.slackRequest.projectId?.toString(),
406
+ });
403
407
  logger.debug(alertStates);
404
408
 
405
409
  const dropdownOptions: Array<DropdownOption> = alertStates
@@ -525,7 +529,10 @@ export default class SlackAlertActions {
525
529
  isRoot: true,
526
530
  });
527
531
  } catch (err) {
528
- logger.error("Error logging button interaction:");
532
+ logger.error("Error logging button interaction:", {
533
+ projectId: data.slackRequest.projectId?.toString(),
534
+ alertId: alertId.toString(),
535
+ });
529
536
  logger.error(err);
530
537
  // Don't throw the error, just log it so the main flow continues
531
538
  }
@@ -813,7 +820,9 @@ export default class SlackAlertActions {
813
820
  channelId: string;
814
821
  messageTs: string;
815
822
  }): Promise<void> {
816
- logger.debug("Handling emoji reaction for Alert with data:");
823
+ logger.debug("Handling emoji reaction for Alert with data:", {
824
+ channelId: data.channelId,
825
+ });
817
826
  logger.debug(data);
818
827
 
819
828
  const { teamId, reaction, userId, channelId, messageTs } = data;
@@ -920,13 +929,21 @@ export default class SlackAlertActions {
920
929
  messageTs: messageTs,
921
930
  });
922
931
  } catch (err) {
923
- logger.error("Error fetching message text:");
932
+ logger.error("Error fetching message text:", {
933
+ projectId: projectId.toString(),
934
+ alertId: alertId.toString(),
935
+ channelId: channelId,
936
+ });
924
937
  logger.error(err);
925
938
  return;
926
939
  }
927
940
 
928
941
  if (!messageText) {
929
- logger.debug("No message text found. Ignoring emoji reaction.");
942
+ logger.debug("No message text found. Ignoring emoji reaction.", {
943
+ projectId: projectId.toString(),
944
+ alertId: alertId.toString(),
945
+ channelId: channelId,
946
+ });
930
947
  return;
931
948
  }
932
949
 
@@ -956,9 +973,15 @@ export default class SlackAlertActions {
956
973
  userId: oneUptimeUserId,
957
974
  postedFromSlackMessageId: postedFromSlackMessageId,
958
975
  });
959
- logger.debug("Private note added to alert successfully.");
976
+ logger.debug("Private note added to alert successfully.", {
977
+ projectId: projectId.toString(),
978
+ alertId: alertId.toString(),
979
+ });
960
980
  } catch (err) {
961
- logger.error("Error saving note:");
981
+ logger.error("Error saving note:", {
982
+ projectId: projectId.toString(),
983
+ alertId: alertId.toString(),
984
+ });
962
985
  logger.error(err);
963
986
  return;
964
987
  }
@@ -980,7 +1003,10 @@ export default class SlackAlertActions {
980
1003
 
981
1004
  logger.debug("Confirmation message sent successfully.");
982
1005
  } catch (err) {
983
- logger.error("Error sending confirmation message:");
1006
+ logger.error("Error sending confirmation message:", {
1007
+ projectId: projectId.toString(),
1008
+ alertId: alertId.toString(),
1009
+ });
984
1010
  logger.error(err);
985
1011
  // Don't throw - note was saved successfully, confirmation is best effort
986
1012
  }
@@ -155,7 +155,9 @@ export default class SlackAlertEpisodeActions {
155
155
  isRoot: true,
156
156
  });
157
157
  } catch (err) {
158
- logger.error("Error logging button interaction:");
158
+ logger.error("Error logging button interaction:", {
159
+ projectId: slackRequest.projectId?.toString(),
160
+ });
159
161
  logger.error(err);
160
162
  // Don't throw the error, just log it so the main flow continues
161
163
  }
@@ -493,7 +495,10 @@ export default class SlackAlertEpisodeActions {
493
495
  isRoot: true,
494
496
  });
495
497
  } catch (err) {
496
- logger.error("Error logging button interaction:");
498
+ logger.error("Error logging button interaction:", {
499
+ projectId: data.slackRequest.projectId?.toString(),
500
+ alertEpisodeId: episodeId.toString(),
501
+ });
497
502
  logger.error(err);
498
503
  // Don't throw the error, just log it so the main flow continues
499
504
  }
@@ -760,7 +765,9 @@ export default class SlackAlertEpisodeActions {
760
765
  channelId: string;
761
766
  messageTs: string;
762
767
  }): Promise<void> {
763
- logger.debug("Handling emoji reaction for Alert Episode with data:");
768
+ logger.debug("Handling emoji reaction for Alert Episode with data:", {
769
+ channelId: data.channelId,
770
+ });
764
771
  logger.debug(data);
765
772
 
766
773
  const { teamId, reaction, userId, channelId, messageTs } = data;
@@ -859,13 +866,21 @@ export default class SlackAlertEpisodeActions {
859
866
  messageTs: messageTs,
860
867
  });
861
868
  } catch (err) {
862
- logger.error("Error fetching message text:");
869
+ logger.error("Error fetching message text:", {
870
+ projectId: projectId.toString(),
871
+ alertEpisodeId: episodeId.toString(),
872
+ channelId: channelId,
873
+ });
863
874
  logger.error(err);
864
875
  return;
865
876
  }
866
877
 
867
878
  if (!messageText) {
868
- logger.debug("No message text found. Ignoring emoji reaction.");
879
+ logger.debug("No message text found. Ignoring emoji reaction.", {
880
+ projectId: projectId.toString(),
881
+ alertEpisodeId: episodeId.toString(),
882
+ channelId: channelId,
883
+ });
869
884
  return;
870
885
  }
871
886
 
@@ -895,9 +910,15 @@ export default class SlackAlertEpisodeActions {
895
910
  userId: oneUptimeUserId,
896
911
  postedFromSlackMessageId: postedFromSlackMessageId,
897
912
  });
898
- logger.debug("Private note added to alert episode successfully.");
913
+ logger.debug("Private note added to alert episode successfully.", {
914
+ projectId: projectId.toString(),
915
+ alertEpisodeId: episodeId.toString(),
916
+ });
899
917
  } catch (err) {
900
- logger.error("Error saving note:");
918
+ logger.error("Error saving note:", {
919
+ projectId: projectId.toString(),
920
+ alertEpisodeId: episodeId.toString(),
921
+ });
901
922
  logger.error(err);
902
923
  return;
903
924
  }
@@ -922,7 +943,10 @@ export default class SlackAlertEpisodeActions {
922
943
 
923
944
  logger.debug("Confirmation message sent successfully.");
924
945
  } catch (err) {
925
- logger.error("Error sending confirmation message:");
946
+ logger.error("Error sending confirmation message:", {
947
+ projectId: projectId.toString(),
948
+ alertEpisodeId: episodeId.toString(),
949
+ });
926
950
  logger.error(err);
927
951
  // Don't throw - note was saved successfully, confirmation is best effort
928
952
  }
@@ -293,7 +293,9 @@ export default class SlackAuthAction {
293
293
  viewValues: viewValues,
294
294
  };
295
295
 
296
- logger.debug("Slack request authorized successfully");
296
+ logger.debug("Slack request authorized successfully", {
297
+ projectId: projectId.toString(),
298
+ });
297
299
  logger.debug("Slack request: ");
298
300
  logger.debug(slackRequest);
299
301
 
@@ -616,7 +616,10 @@ export default class SlackIncidentActions {
616
616
  isRoot: true,
617
617
  });
618
618
  } catch (err) {
619
- logger.error("Error logging button interaction:");
619
+ logger.error("Error logging button interaction:", {
620
+ projectId: slackRequest.projectId?.toString(),
621
+ incidentId: incidentId.toString(),
622
+ });
620
623
  logger.error(err);
621
624
  // Don't throw the error, just log it so the main flow continues
622
625
  }
@@ -859,7 +862,9 @@ export default class SlackIncidentActions {
859
862
  },
860
863
  });
861
864
 
862
- logger.debug("Incident States: ");
865
+ logger.debug("Incident States: ", {
866
+ projectId: data.slackRequest.projectId?.toString(),
867
+ });
863
868
  logger.debug(incidentStates);
864
869
 
865
870
  const dropdownOptions: Array<DropdownOption> = incidentStates
@@ -985,7 +990,10 @@ export default class SlackIncidentActions {
985
990
  isRoot: true,
986
991
  });
987
992
  } catch (err) {
988
- logger.error("Error logging button interaction:");
993
+ logger.error("Error logging button interaction:", {
994
+ projectId: data.slackRequest.projectId?.toString(),
995
+ incidentId: incidentId.toString(),
996
+ });
989
997
  logger.error(err);
990
998
  // Don't throw the error, just log it so the main flow continues
991
999
  }
@@ -1334,7 +1342,9 @@ export default class SlackIncidentActions {
1334
1342
  channelId: string;
1335
1343
  messageTs: string;
1336
1344
  }): Promise<void> {
1337
- logger.debug("Handling emoji reaction with data:");
1345
+ logger.debug("Handling emoji reaction with data:", {
1346
+ channelId: data.channelId,
1347
+ });
1338
1348
  logger.debug(data);
1339
1349
 
1340
1350
  const { teamId, reaction, userId, channelId, messageTs } = data;
@@ -1445,13 +1455,21 @@ export default class SlackIncidentActions {
1445
1455
  messageTs: messageTs,
1446
1456
  });
1447
1457
  } catch (err) {
1448
- logger.error("Error fetching message text:");
1458
+ logger.error("Error fetching message text:", {
1459
+ projectId: projectId.toString(),
1460
+ incidentId: incidentId.toString(),
1461
+ channelId: channelId,
1462
+ });
1449
1463
  logger.error(err);
1450
1464
  return;
1451
1465
  }
1452
1466
 
1453
1467
  if (!messageText) {
1454
- logger.debug("No message text found. Ignoring emoji reaction.");
1468
+ logger.debug("No message text found. Ignoring emoji reaction.", {
1469
+ projectId: projectId.toString(),
1470
+ incidentId: incidentId.toString(),
1471
+ channelId: channelId,
1472
+ });
1455
1473
  return;
1456
1474
  }
1457
1475
 
@@ -1474,6 +1492,10 @@ export default class SlackIncidentActions {
1474
1492
  if (hasExistingNote) {
1475
1493
  logger.debug(
1476
1494
  "Private note from this Slack message already exists. Skipping duplicate.",
1495
+ {
1496
+ projectId: projectId.toString(),
1497
+ incidentId: incidentId.toString(),
1498
+ },
1477
1499
  );
1478
1500
  return;
1479
1501
  }
@@ -1485,7 +1507,10 @@ export default class SlackIncidentActions {
1485
1507
  userId: oneUptimeUserId,
1486
1508
  postedFromSlackMessageId: postedFromSlackMessageId,
1487
1509
  });
1488
- logger.debug("Private note added successfully.");
1510
+ logger.debug("Private note added successfully.", {
1511
+ projectId: projectId.toString(),
1512
+ incidentId: incidentId.toString(),
1513
+ });
1489
1514
  } else if (isPublicNoteEmoji) {
1490
1515
  noteType = "public";
1491
1516
 
@@ -1499,6 +1524,10 @@ export default class SlackIncidentActions {
1499
1524
  if (hasExistingNote) {
1500
1525
  logger.debug(
1501
1526
  "Public note from this Slack message already exists. Skipping duplicate.",
1527
+ {
1528
+ projectId: projectId.toString(),
1529
+ incidentId: incidentId.toString(),
1530
+ },
1502
1531
  );
1503
1532
  return;
1504
1533
  }
@@ -1510,12 +1539,18 @@ export default class SlackIncidentActions {
1510
1539
  userId: oneUptimeUserId,
1511
1540
  postedFromSlackMessageId: postedFromSlackMessageId,
1512
1541
  });
1513
- logger.debug("Public note added successfully.");
1542
+ logger.debug("Public note added successfully.", {
1543
+ projectId: projectId.toString(),
1544
+ incidentId: incidentId.toString(),
1545
+ });
1514
1546
  } else {
1515
1547
  return;
1516
1548
  }
1517
1549
  } catch (err) {
1518
- logger.error("Error saving note:");
1550
+ logger.error("Error saving note:", {
1551
+ projectId: projectId.toString(),
1552
+ incidentId: incidentId.toString(),
1553
+ });
1519
1554
  logger.error(err);
1520
1555
  return;
1521
1556
  }
@@ -1538,9 +1573,15 @@ export default class SlackIncidentActions {
1538
1573
  text: confirmationMessage,
1539
1574
  });
1540
1575
 
1541
- logger.debug("Confirmation message sent successfully.");
1576
+ logger.debug("Confirmation message sent successfully.", {
1577
+ projectId: projectId.toString(),
1578
+ incidentId: incidentId.toString(),
1579
+ });
1542
1580
  } catch (err) {
1543
- logger.error("Error sending confirmation message:");
1581
+ logger.error("Error sending confirmation message:", {
1582
+ projectId: projectId.toString(),
1583
+ incidentId: incidentId.toString(),
1584
+ });
1544
1585
  logger.error(err);
1545
1586
  // Don't throw - note was saved successfully, confirmation is best effort
1546
1587
  }
@@ -156,7 +156,10 @@ export default class SlackIncidentEpisodeActions {
156
156
  isRoot: true,
157
157
  });
158
158
  } catch (err) {
159
- logger.error("Error logging button interaction:");
159
+ logger.error("Error logging button interaction:", {
160
+ projectId: slackRequest.projectId?.toString(),
161
+ episodeId: episodeId.toString(),
162
+ });
160
163
  logger.error(err);
161
164
  // Don't throw the error, just log it so the main flow continues
162
165
  }