From 97a5b060ff36dc7114544783e2dfa918198f910a Mon Sep 17 00:00:00 2001 From: Itay Katz Date: Wed, 18 Nov 2020 10:32:52 +0200 Subject: [PATCH] fix(batch-processing): post fix (#390) --- examples/batch_example.js | 13 ++----------- src/trace_queue.js | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/examples/batch_example.js b/examples/batch_example.js index 41d803f4..9ddac3e0 100644 --- a/examples/batch_example.js +++ b/examples/batch_example.js @@ -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) { diff --git a/src/trace_queue.js b/src/trace_queue.js index e7ad67fa..f327346a 100644 --- a/src/trace_queue.js +++ b/src/trace_queue.js @@ -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() {