Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/workflows/dontime/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func (p *Plugin) Observation(_ context.Context, outctx ocr3types.OutcomeContext,
requests[req.WorkflowExecutionID] = int64(req.SeqNum)
}

p.lggr.Infow("Observation built",
"requestsIncluded", len(requests),
"pendingRequestsInStore", len(p.store.GetRequests()),
)

observation := &pb.Observation{
Timestamp: time.Now().UTC().UnixMilli(),
Requests: requests,
Expand Down Expand Up @@ -214,6 +219,7 @@ func (p *Plugin) Outcome(_ context.Context, outctx ocr3types.OutcomeContext, _ t
p.lggr.Infow("Outcome computed",
"observedDonTimesEntries", len(outcome.ObservedDonTimes),
"outcomeSizeBytes", len(outcomeBytes),
"pendingRequestsInStore", len(p.store.GetRequests()),
)
return outcomeBytes, err
}
Expand Down
10 changes: 8 additions & 2 deletions pkg/workflows/dontime/transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ func (t *Transmitter) Transmit(_ context.Context, _ types.ConfigDigest, _ uint64
t.store.replaceDonTimes(currentDonTimes)
t.store.setLastObservedDonTime(outcome.Timestamp)

t.lggr.Infow("Transmitting timestamps", "lastObservedDonTime", outcome.Timestamp)

responsesDelivered := 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be better as a Prometheus counter (dontime_responses_delivered_total) incremented per transmit round? That way we could put it in a dashboard.

Worth considering whether pendingRequestsInStore should also be a gauge.

for executionID, donTimes := range outcome.ObservedDonTimes {
request := t.store.GetRequest(executionID)
if request == nil {
Expand All @@ -59,9 +58,16 @@ func (t *Transmitter) Transmit(_ context.Context, _ types.ConfigDigest, _ uint64
Timestamp: donTime,
Err: nil,
})
responsesDelivered++
}
}

t.lggr.Infow("Transmitting timestamps",
"lastObservedDonTime", outcome.Timestamp,
"observedDonTimesEntries", len(outcome.ObservedDonTimes),
"responsesDelivered", responsesDelivered,
)

return nil
}

Expand Down
Loading