forked from Silverfish/proton-bridge
feat(BRIDGE-236): added SMTP observability metrics
This commit is contained in:
@ -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",
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user