@instana/metrics-util
Advanced tools
Comparing version 1.106.4 to 1.106.5
{ | ||
"name": "@instana/metrics-util", | ||
"version": "1.106.4", | ||
"version": "1.106.5", | ||
"description": "Internal utility library for Instana metric collection", | ||
@@ -54,5 +54,5 @@ "author": { | ||
"dependencies": { | ||
"@instana/core": "^1.106.4", | ||
"@instana/serverless": "^1.106.4", | ||
"@instana/shared-metrics": "^1.106.4", | ||
"@instana/core": "^1.106.5", | ||
"@instana/serverless": "^1.106.5", | ||
"@instana/shared-metrics": "^1.106.5", | ||
"node-fetch": "^2.6.1" | ||
@@ -70,3 +70,3 @@ }, | ||
}, | ||
"gitHead": "685c43c348db337c09b7ed03010710cd8454240f" | ||
"gitHead": "cc05d8aa93e154b98d7befa9557789064c66aa58" | ||
} |
@@ -8,5 +8,5 @@ 'use strict'; | ||
class ProcessProcessor extends DataProcessor { | ||
constructor() { | ||
super('com.instana.plugin.process'); | ||
this.snapshotDataSource = new ProcessSnapshotDataSource(5 * 60 * 1000); | ||
constructor(containerType, hostName) { | ||
super('com.instana.plugin.process', [['com.instana.plugin.host.name'], ['containerType'], ['container']]); | ||
this.snapshotDataSource = new ProcessSnapshotDataSource(containerType, hostName); | ||
this.addSource('snapshot', this.snapshotDataSource); | ||
@@ -13,0 +13,0 @@ this.addSource('metrics', new ProcessMetricsSource()); |
@@ -22,15 +22,2 @@ 'use strict'; | ||
const snapshotData = { | ||
pid, | ||
env, | ||
exec, | ||
args, | ||
user, | ||
group, | ||
start, | ||
containerType: 'docker', | ||
'com.instana.plugin.host.pid': pid | ||
}; | ||
/** | ||
@@ -40,9 +27,28 @@ * A source for snapshot data for the process entity. | ||
class ProcessSnapshotDataSource extends DataSource { | ||
constructor() { | ||
constructor(containerType, hostName) { | ||
super(5 * 60 * 1000); | ||
this.snapshotData = { | ||
pid, | ||
env, | ||
exec, | ||
args, | ||
user, | ||
group, | ||
start, | ||
containerType: containerType || 'docker', | ||
'com.instana.plugin.host.pid': pid | ||
}; | ||
if (hostName) { | ||
this.snapshotData['com.instana.plugin.host.name'] = hostName; | ||
} | ||
} | ||
setExternalSnapshotData(containerInstanceId, hostName) { | ||
snapshotData.container = containerInstanceId; | ||
snapshotData['com.instana.plugin.host.name'] = hostName; | ||
this.snapshotData.container = containerInstanceId; | ||
if (hostName) { | ||
this.snapshotData['com.instana.plugin.host.name'] = hostName; | ||
} | ||
this._refresh(); | ||
@@ -52,3 +58,3 @@ } | ||
doRefresh(callback) { | ||
process.nextTick(() => callback(null, snapshotData)); | ||
process.nextTick(() => callback(null, this.snapshotData)); | ||
} | ||
@@ -55,0 +61,0 @@ } |
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
18514
479
Updated@instana/core@^1.106.5
Updated@instana/serverless@^1.106.5