Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
fix(batch-processing): post fix (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay Katz authored Nov 18, 2020
1 parent ec434b6 commit 97a5b06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions examples/batch_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,13 @@ const http = require('http');
const { Console } = require('console');


epsagon.init({
token: process.env.EPSAGON_TOKEN,
appName: 'batch-test',
metadataOnly: false,
sendBatch: true,
batchSize: 5000,
maxBatchSizeBytes: 5000000,
maxTraceWait: 5000 // not in use
});

epsagon.init({
token: process.env.EPSAGON_TOKEN,
appName: 'batch-test',
metadataOnly: false,
sendBatch: true,
batchSize: 5000,
batchSize: 5,
maxBatchSizeBytes: 5000000,
});

function doRequest(options) {
Expand Down
2 changes: 1 addition & 1 deletion src/trace_queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TraceQueue extends EventEmitter.EventEmitter {

this.on('batchReleased', async function batchReleased(batch) {
utils.debugLog('[QUEUE] Sending batch...');
const batchJSON = batch.map(trace => trace.traceJSON);
const batchJSON = batch.map(trace => trace.json);
this.batchSender(batchJSON);
});
process.on('exit', function releaseAndClearQueue() {
Expand Down

0 comments on commit 97a5b06

Please sign in to comment.