Comparing version 2.0.0 to 2.0.1
@@ -107,3 +107,3 @@ /* | ||
function SpmSender (spmToken, processMetricsInterval, metricsApiEndpoint) { | ||
this.MAX_DATAPOINTS = config.maxDataPoints || 100 | ||
this.MAX_DATAPOINTS = Math.min(Number(config.maxDataPoints) || 100, 300) | ||
this.MAX_WAIT_TIME = 60 * 1000 | ||
@@ -232,4 +232,5 @@ this.spmToken = spmToken | ||
if (this.datapoints.length > 0) { | ||
this.datapointsToShip = this.datapoints | ||
this.datapoints = [] | ||
var reqSize = Math.min(this.datapoints.length, this.MAX_DATAPOINTS || 100) | ||
this.datapointsToShip = this.datapoints.slice(0, reqSize) | ||
this.datapoints = this.datapoints.slice(reqSize, this.datapoints.length) | ||
this.send() | ||
@@ -359,4 +360,4 @@ } | ||
'User-Agent': 'node-spm', | ||
'Content-Type': 'application/json' | ||
// 'Keep-Alive': false | ||
'Content-Type': 'application/json', | ||
'Connection': 'Close' | ||
}, | ||
@@ -363,0 +364,0 @@ body: this.buildBulkRequest(appData), |
{ | ||
"name": "spm-agent", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Node.js agent framework for SPM by Sematext", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68760
1325