Skip to content

Commit c166626

Browse files
committed
fix(tap-agent): unaggregated_fees metric last RAV
The Unaggregated fees metric was not updating on last RAV.
1 parent ad1605b commit c166626

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tap-agent/src/agent/sender_allocation.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ impl Actor for SenderAllocation {
260260
unaggreated_fees.clone(),
261261
))?;
262262
}
263+
264+
UNAGGREGATED_FEES
265+
.with_label_values(&[
266+
&state.sender.to_string(),
267+
&state.allocation_id.to_string(),
268+
])
269+
.set(state.unaggregated_fees.value as f64);
263270
}
264271
// we use a blocking call here to ensure that only one RAV request is running at a time.
265272
SenderAllocationMessage::TriggerRAVRequest(reply) => {
@@ -279,11 +286,6 @@ impl Actor for SenderAllocation {
279286
}
280287
}
281288

282-
// We expect the value to change for every received receipt, and after every RAV request.
283-
UNAGGREGATED_FEES
284-
.with_label_values(&[&state.sender.to_string(), &state.allocation_id.to_string()])
285-
.set(state.unaggregated_fees.value as f64);
286-
287289
Ok(())
288290
}
289291
}
@@ -575,6 +577,9 @@ impl SenderAllocationState {
575577
RAVS_CREATED
576578
.with_label_values(&[&self.sender.to_string(), &self.allocation_id.to_string()])
577579
.inc();
580+
UNAGGREGATED_FEES
581+
.with_label_values(&[&self.sender.to_string(), &self.allocation_id.to_string()])
582+
.set(self.unaggregated_fees.value as f64);
578583

579584
Ok(response.data)
580585
}

0 commit comments

Comments
 (0)