Skip to content

Commit

Permalink
Merge pull request #69 from status-im/fix/missed-message-metric-name
Browse files Browse the repository at this point in the history
fix: fix name of types for missed messages to match tables
  • Loading branch information
adklempner authored Oct 17, 2024
2 parents 8ce94db + 539ccbf commit 9c25d22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func main() {
server.RegisterMetric(types.SentEnvelopeMetric, &metrics.SentEnvelope{})
server.RegisterMetric(types.PeerCountByShardMetric, &metrics.PeerCountByShard{})
server.RegisterMetric(types.PeerCountByOriginMetric, &metrics.PeerCountByOrigin{})
server.RegisterMetric(types.MissedMessageMetric, &metrics.MissedMessage{})
server.RegisterMetric(types.MissedRelevantMessageMetric, &metrics.MissedRelevantMessage{})
server.RegisterMetric(types.MissedMessageMetric, &metrics.MissedMessages{})
server.RegisterMetric(types.MissedRelevantMessageMetric, &metrics.MissedRelevantMessages{})
server.RegisterMetric(types.MessageDeliveryConfirmedMetric, &metrics.MessageDeliveryConfirmed{})
server.RegisterMetric(types.MessageCheckSuccessMetric, &metrics.MessageCheckSuccess{})
server.RegisterMetric(types.MessageCheckFailureMetric, &metrics.MessageCheckFailure{})
Expand Down
12 changes: 6 additions & 6 deletions lib/metrics/missing_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import (
"github.com/status-im/telemetry/pkg/types"
)

type MissedMessage struct {
GenericMetric[types.MissedMessage]
type MissedMessages struct {
GenericMetric[types.MissedMessages]
}

type MissedRelevantMessage struct {
GenericMetric[types.MissedRelevantMessage]
type MissedRelevantMessages struct {
GenericMetric[types.MissedRelevantMessages]
}

type MessageDeliveryConfirmed struct {
GenericMetric[types.MessageDeliveryConfirmed]
}

var (
MissedMessageProcessor = &MissedMessage{}
MissedRelevantMessageProcessor = &MissedRelevantMessage{}
MissedMessagesProcessor = &MissedMessages{}
MissedRelevantMessagesProcessor = &MissedRelevantMessages{}
MessageDeliveryConfirmedProcessor = &MessageDeliveryConfirmed{}
)
4 changes: 2 additions & 2 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ type DialFailure struct {
Timestamp int64 `json:"timestamp"`
}

type MissedMessage struct {
type MissedMessages struct {
TelemetryRecord
ContentTopic string `json:"contentTopic"`
MessageHash string `json:"messageHash"`
SentAt int64 `json:"sentAt"`
PubsubTopic string `json:"pubsubTopic"`
}

type MissedRelevantMessage struct {
type MissedRelevantMessages struct {
TelemetryRecord
ContentTopic string `json:"contentTopic"`
MessageHash string `json:"messageHash"`
Expand Down

0 comments on commit 9c25d22

Please sign in to comment.