Skip to content

Commit

Permalink
Added payload metrics to sink
Browse files Browse the repository at this point in the history
Signed-off-by: Kondaka <[email protected]>
  • Loading branch information
kkondaka committed Nov 18, 2024
1 parent dd0c3a4 commit 0d1cbb1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ public void doOutput(final Collection<Record<Event>> records) {
lambdaLatencyMetric.record(latency.toMillis(), TimeUnit.MILLISECONDS);
numberOfRecordsSuccessCounter.increment(inputBuffer.getEventCount());
numberOfRequestsSuccessCounter.increment();
requestPayloadMetric.record(inputBuffer.getPayloadRequestSize());
responsePayloadMetric.record(invokeResponse.payload().asByteArray().length);
releaseEventHandlesPerBatch(true, inputBuffer);
return new ArrayList<>();
},
Expand All @@ -169,6 +171,7 @@ public void doOutput(final Collection<Record<Event>> records) {
lambdaLatencyMetric.record(latency.toMillis(), TimeUnit.MILLISECONDS);
numberOfRecordsFailedCounter.increment(inputBuffer.getEventCount());
numberOfRequestsFailedCounter.increment();
requestPayloadMetric.record(inputBuffer.getPayloadRequestSize());
handleFailure(new RuntimeException("failed"), inputBuffer);
return new ArrayList<>();
});
Expand Down

0 comments on commit 0d1cbb1

Please sign in to comment.