feat(BRIDGE-236): added SMTP observability metrics

This commit is contained in:
Atanas Janeshliev
2024-10-21 11:45:02 +02:00
parent fb523e5573
commit e3d0334b6f
9 changed files with 165 additions and 1 deletions

View File

@ -28,6 +28,7 @@ const (
GluonImapError
GluonMessageError
GluonOtherError
SMTPError
EventLoopError // EventLoopError - should always be kept last when inserting new keys.
)
@ -37,6 +38,7 @@ var errorSchemaMap = map[DistinctionErrorTypeEnum]string{ //nolint:gochecknoglob
EventLoopError: "bridge_event_loop_events_errors_users_total",
GluonImapError: "bridge_gluon_imap_errors_users_total",
GluonMessageError: "bridge_gluon_message_errors_users_total",
SMTPError: "bridge_smtp_errors_users_total",
GluonOtherError: "bridge_gluon_other_errors_users_total",
}

View File

@ -44,6 +44,7 @@ func (d *distinctionUtility) resetHeartbeatData() {
func (d *distinctionUtility) updateHeartbeatData(errType DistinctionErrorTypeEnum) {
d.withUpdateHeartbeatDataLock(func() {
//nolint:exhaustive
switch errType {
case SyncError:
d.heartbeatData.receivedSyncError = true