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

oneapm

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneapm - npm Package Compare versions

Comparing version 1.2.12 to 1.2.13-0

lib/util/stack.js

14

lib/db/tracer.js

@@ -7,2 +7,3 @@ 'use strict'

var util = require('util')
var stackUtil = require('../util/stack')
var crypto = require('crypto')

@@ -12,4 +13,2 @@ var encode = require('../util/codec.js').encode

var NR_ROOT = path.resolve(__dirname, '../..')
module.exports = QueryTracer

@@ -178,3 +177,3 @@

this.metric = segment.name
this.trace = formatTrace(trace)
this.trace = stackUtil.formatStack(trace.stack) // trace is an Error object, for capturing the stack.
this.duration = segment.getDurationInMillis()

@@ -187,11 +186,2 @@ }

function formatTrace(trace) {
// remove error message and instrumentation frames from stack trace
return trace ? trace.stack.split('\n').slice(1).filter(notNR).join('\n') : ''
}
function notNR(frame) {
return frame.indexOf(NR_ROOT) === -1
}
function getQuery(config, trace) {

@@ -198,0 +188,0 @@ switch (config.transaction_tracer.record_sql) {

@@ -6,2 +6,3 @@ 'use strict';

, logger = require(path.join(__dirname, '..', '..', 'logger')).child({component : 'http'})
, stackUtil = require(path.join(__dirname, '..', '..', 'util', 'stack' ) )
, recordWeb = require(path.join(__dirname, '..', '..', 'metrics',

@@ -43,2 +44,5 @@ 'recorders', 'http.js'))

var stack = (new Error()).stack;
segment.parameters.backtrace = stackUtil.formatStack( stack );
// the error tracer needs a URL for tracing, even though naming overwrites

@@ -45,0 +49,0 @@ transaction.url = request.url;

@@ -5,2 +5,3 @@ 'use strict';

, shimmer = require(path.join(__dirname, '..', 'shimmer.js'))
, stackUtil = require(path.join(__dirname, '..', 'util', 'stack' ))
, recordMemcache = require(path.join(__dirname, '..', 'metrics',

@@ -66,2 +67,6 @@ 'recorders', 'memcached.js'))

// Add backtrace to segment.
var stack = (new Error()).stack;
segment.parameters.backtrace = stackUtil.formatStack( stack );
/* Memcached's call description includes a callback to apply when the

@@ -68,0 +73,0 @@ * operation is concluded. Wrap that to trace the duration of the

@@ -6,2 +6,3 @@ "use strict";

shimmer = require(path.join(__dirname, '..', 'shimmer')),
stackUtil = require(path.join(__dirname, '..', 'util', 'stack.js')),
urltils = require(path.join(__dirname, '..', 'util', 'urltils.js')),

@@ -151,2 +152,5 @@ logger = require(path.join(__dirname, '..',

}
// Add backtrace to segment.
var stack = (new Error()).stack;
segment.parameters.backtrace = stackUtil.formatStack( stack );

@@ -153,0 +157,0 @@ var callback = args.pop();

@@ -5,2 +5,3 @@ 'use strict';

, shimmer = require(path.join(__dirname, '..', 'shimmer'))
, stackUtil = require(path.join(__dirname, '..', 'util', 'stack'))
, logger = require(path.join(__dirname, '..', 'logger'))

@@ -47,2 +48,5 @@ .child({component : 'node-cassandra-cql'})

var stack = (new Error()).stack;
segment.parameters.backtrace = stackUtil.formatStack( stack );
function finalize(target) {

@@ -78,2 +82,2 @@ return function cls_finalize() {

});
};
};

@@ -5,2 +5,3 @@ 'use strict';

, shimmer = require(path.join(__dirname, '..', 'shimmer'))
, stackUtil = require(path.join(__dirname, '..', 'util', 'stack' ) )
, logger = require(path.join(__dirname, '..', 'logger'))

@@ -38,2 +39,6 @@ .child({component : 'redis'})

segment.parameters.key = JSON.stringify([keys[0]]);
var stack = ( new Error() ).stack;
segment.parameters.backtrace = stackUtil.formatStack( stack );
}

@@ -40,0 +45,0 @@

'use strict';
var path = require('path')
, stackUtil = require( '../../../util/stack' )
, recordExternal = require(path.join(__dirname, '..', '..', '..', 'metrics',

@@ -31,2 +32,3 @@ 'recorders', 'http_external.js'))

segment.parameters["uri"] = uri;
segment.parameters["backtrace"] = stackUtil.formatStack( (new Error()).stack );

@@ -33,0 +35,0 @@ // may trace errors multiple times, make that the error tracer's problem

{
"name": "oneapm",
"version": "1.2.12",
"version": "1.2.13-0",
"author": "OneAPM Node.js agent team <nodejs@oneapm.com>",

@@ -5,0 +5,0 @@ "description": "OneAPM agent",

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