Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spm-agent

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spm-agent - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31

12

lib/sender/spmsender.js

@@ -98,3 +98,3 @@ /*

self.sendClientInfo()
}, 500)
}, 10)
logger.debug('SpmSender created for API endpoint: %s', this.metricsUrl)

@@ -109,3 +109,6 @@

SpmSender.prototype.sendClientInfo = function () {
var info = os.platform() + ', ' + os.arch() + ', ' + process.versions.node + ', ' + 'JS Agent ' + clientVersion
var runtime = 'io'
if (/0\.1\d\.\d+/.test(process.versions.node))
runtime = 'node'
var info = os.platform() + ', ' + os.arch() + ', ' + runtime +' ' + process.versions.node + ', ' + 'spm ' + clientVersion
this.sendEvent ('server-info',{

@@ -115,3 +118,3 @@ message: info,

priority: 0,
name: '',
name: 'agent start v' + clientVersion,
creator: 'spm-agent-nodejs'

@@ -122,6 +125,5 @@ }, function (err, result){

else
logger.info ('SPM client info event:' + info)
logger.info ('SPM client info event:' + info + ' ' + result.body)
})
}
SpmSender.prototype.sendEvent = function (type, event, callback) {

@@ -128,0 +130,0 @@ var msg = {

{
"name": "spm-agent",
"version": "1.0.30",
"version": "1.0.31",
"description": "Node.js agent framework for SPM by Sematext",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -22,32 +22,7 @@ /*

it("Logger should log", function (done) {
try {
var logger = require('../lib/util/logger.js')
logger.log('Logger test %d', 1)
done()
} catch (err) {
done(err)
}
})
it("SPM Config has defaults", function (done) {
try {
var cfgValue = ['tokens.spm', 'recoverInterval', 'maxRetransmitBatchSize', 'spmSenderBulkInsertUrl', 'logger.dir', 'logger.filename', 'logger.level', 'maxDataPoints', 'collectionInterval']
var checked = cfgValue.filter(function (key) {
return (config.get(key) != null || false)
})
if (cfgValue.length == checked.length)
done()
else
done('not all default values set ' + checked)
} catch (err) {
done(err)
}
})
it("SPM Agent Stats", function (done) {
try {
this.timeout(30000)
config.collectionInterval = 1000
config.retransmitInterval = 400
config.collectionInterval = 1200
config.retransmitInterval = 1000
config.recoverInterval = 1000

@@ -65,3 +40,3 @@ config.maxDataPoints = 1

//console.log ('add Metric')
}, 500)
}, 900)
},

@@ -80,3 +55,29 @@ stop: console.log

})
it("Logger should log", function (done) {
try {
var logger = require('../lib/util/logger.js')
logger.log('Logger test %d', 1)
done()
} catch (err) {
done(err)
}
})
it("SPM Config has defaults", function (done) {
try {
var cfgValue = ['tokens.spm', 'recoverInterval', 'maxRetransmitBatchSize', 'spmSenderBulkInsertUrl', 'logger.dir', 'logger.filename', 'logger.level', 'maxDataPoints', 'collectionInterval']
var checked = cfgValue.filter(function (key) {
return (config.get(key) != null || false)
})
if (cfgValue.length == checked.length)
done()
else
done('not all default values set ' + checked)
} catch (err) {
done(err)
}
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc