Skip to content

Commit

Permalink
Quick test to see if metrics is the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Apr 30, 2024
1 parent aaf2aa2 commit 24bd557
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions service/app/handler_process_saved_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,20 @@ func (h *ProcessSavedEventHandler) maybeSendEventToRelay(ctx context.Context, ev
defer cancel()

if !ShouldSendEventToRelay(event) {
h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionIgnore, SendEventToRelayResultSuccess)
//h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionIgnore, SendEventToRelayResultSuccess)
return nil
}

if err := h.eventSender.SendEvent(ctx, nosRelayAddress, event); err != nil {
if h.shouldDisregardSendEventErr(err) {
h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultIgnoreError)
//h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultIgnoreError)
return nil
}
h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultError)
//h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultError)
return errors.Wrap(err, "error sending event to relay")
}

h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultSuccess)
//h.metrics.ReportEventSentToRelay(nosRelayAddress, SendEventToRelayDecisionSend, SendEventToRelayResultSuccess)
return nil
}

Expand Down

0 comments on commit 24bd557

Please sign in to comment.