Skip to content

Commit

Permalink
Fix the number of batches actually sent, retried count
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwarya-ddog committed Feb 8, 2024
1 parent 41458b9 commit 2035b4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azure/blobs_logs_monitoring/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class HTTPClient {
var totalNumLogsAddedToPromise = 0;
var batches = this.batcher.batch(records);
var promises = [];
finishCount = 0;
totalRetriedCount = 0;
this.context.log("SendAll : Number of batches created in this batch is " + batches.length);
for (var i = 0; i < batches.length; i++) {
this.context.log("Batch #" + (i + 1) + " for file" + this.context.bindingData.blobTrigger + ": Number of logs in this batch is " + batches[i].length);
Expand Down Expand Up @@ -218,7 +220,7 @@ class HTTPClient {
})
.on('finish', () => {
finishCount++; // Increment the counter each time the 'finish' event is emitted
this.context.log.warn(`Sent batch#: ${batchnum}, file: ${this.context.bindingData.blobTrigger}`);
this.context.log(`Sent batch#: ${batchnum}, file: ${this.context.bindingData.blobTrigger}`);
});
req.write(this.scrubber.scrub(JSON.stringify(record)));
req.end();
Expand Down

0 comments on commit 2035b4a

Please sign in to comment.