Skip to content

Commit

Permalink
Merge pull request #1490 from kaleido-io/metrics_fix
Browse files Browse the repository at this point in the history
feat: Add metrics for messaging when performing a token transfer
  • Loading branch information
nguyer authored Apr 10, 2024
2 parents cdd7fba + 5cb8fa8 commit 5649da2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion internal/broadcast/message.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -35,6 +35,9 @@ func (bm *broadcastManager) NewBroadcast(in *core.MessageInOut) syncasync.Sender
Message: in,
},
}
if bm.metrics.IsMetricsEnabled() {
bm.metrics.MessageSubmitted(&in.Message)
}
broadcast.setDefaults()
return broadcast
}
Expand Down
5 changes: 4 additions & 1 deletion internal/privatemessaging/message.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -35,6 +35,9 @@ func (pm *privateMessaging) NewMessage(in *core.MessageInOut) syncasync.Sender {
Message: in,
},
}
if pm.metrics.IsMetricsEnabled() {
pm.metrics.MessageSubmitted(&in.Message)
}
message.setDefaults()
return message
}
Expand Down

0 comments on commit 5649da2

Please sign in to comment.