Skip to content

Commit 8163e85

Browse files
committed
chore(): improve debug logs
1 parent 58ce9be commit 8163e85

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/agent/tracer/collector.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,10 @@ Collector.prototype._getSeverityHintFromCache = function (cacheId) {
415415

416416
Collector.prototype.collect = function () {
417417
var self = this
418+
var lockedCount = 0
418419
Object.keys(this._eventBuffers).forEach(function (key) {
419420
if (self._eventBuffers[key].locks > 0) {
421+
++lockedCount
420422
return
421423
} else {
422424
if (!self._eventBuffers[key].skipped &&
@@ -437,6 +439,7 @@ Collector.prototype.collect = function () {
437439
}
438440
}
439441
})
442+
debug('#collect', lockedCount + ' buffers locked')
440443
return this._sampler.flush().reduce(function (acc, x) {
441444
Array.prototype.push.apply(acc, x)
442445
return acc

lib/instrumentations/core/http/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var debug = require('debug')('risingstack/trace:agent:instrumentations')
1+
var debug = require('debug')('risingstack/trace:instrumentations')
22
var url = require('url')
33
var microtime = require('../../../optionalDependencies/microtime')
44

lib/instrumentations/core/http/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var microtime = require('../../../optionalDependencies/microtime')
2-
var debug = require('debug')('risingstack/trace:agent:instrumentations')
2+
var debug = require('debug')('risingstack/trace:instrumentations')
33
var Shimmer = require('../../../utils/shimmer')
44

55
var util = require('./util')

0 commit comments

Comments
 (0)