Add metric unit

Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
Gabriel Dugny
2026-03-14 14:19:11 +01:00
parent e7c6c32f26
commit 25e672c581
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/plugin-notifications-backend-module-slack': patch
---
The Slack notification processor now uses the `MetricsService` to create metrics, providing plugin-scoped attribution.
The Slack notification processor now uses the `MetricsService` to create metrics, providing plugin-scoped attribution. `{message}` unit has also been added.
@@ -169,12 +169,14 @@ export class SlackNotificationProcessor implements NotificationProcessor {
'notifications.processors.slack.sent.count',
{
description: 'Number of messages sent to Slack successfully',
unit: '{message}',
},
);
this.messagesFailed = metrics.createCounter(
'notifications.processors.slack.error.count',
{
description: 'Number of messages that failed to send to Slack',
unit: '{message}',
},
);