diff --git a/.changeset/solid-bats-flash.md b/.changeset/solid-bats-flash.md index c14603ec50..0a4918fcc2 100644 --- a/.changeset/solid-bats-flash.md +++ b/.changeset/solid-bats-flash.md @@ -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. diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts index d20587f2a1..28846fcbb5 100644 --- a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts @@ -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}', }, );