elastic-apm-http-client
Advanced tools
Comparing version 7.2.2 to 7.3.0
31
index.js
@@ -110,2 +110,4 @@ 'use strict' | ||
this._conf.globalLabels = normalizeGlobalLabels(this._conf.globalLabels) | ||
const missing = requiredOpts.filter(name => !this._conf[name]) | ||
@@ -478,3 +480,5 @@ if (missing.length > 0) throw new Error('Missing required option(s): ' + missing.join(', ')) | ||
version: opts.agentVersion | ||
} | ||
}, | ||
framework: undefined, | ||
version: undefined | ||
}, | ||
@@ -490,4 +494,7 @@ process: { | ||
architecture: process.arch, | ||
platform: process.platform | ||
} | ||
platform: process.platform, | ||
container: undefined, | ||
kubernetes: undefined | ||
}, | ||
labels: opts.globalLabels | ||
} | ||
@@ -560,1 +567,19 @@ | ||
} | ||
function oneOf (value, list) { | ||
return list.indexOf(value) >= 0 | ||
} | ||
function normalizeGlobalLabels (labels) { | ||
if (!labels) return | ||
const result = {} | ||
for (let key of Object.keys(labels)) { | ||
const value = labels[key] | ||
result[key] = oneOf(typeof value, ['string', 'number', 'boolean']) | ||
? value | ||
: value.toString() | ||
} | ||
return result | ||
} |
{ | ||
"name": "elastic-apm-http-client", | ||
"version": "7.2.2", | ||
"version": "7.3.0", | ||
"description": "A low-level HTTP client for communicating with the Elastic APM intake API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -75,2 +75,3 @@ # elastic-apm-http-client | ||
- `kubernetesPodUID` - Kubernetes pod id, if not given will be parsed from `/proc/self/cgroup` | ||
- `globalLabels` - An object of key/value pairs to use to label all data reported (only applied when using APM Server 7.1+) | ||
@@ -77,0 +78,0 @@ HTTP client configuration: |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
38407
7
793
279
4