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

elastic-apm-http-client

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-apm-http-client - npm Package Compare versions

Comparing version 8.2.1 to 9.0.0

22

index.js

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

const os = require('os')
const parseUrl = require('url').parse
const { URL } = require('url')
const zlib = require('zlib')

@@ -137,3 +137,3 @@ const querystring = require('querystring')

// process
this._conf.serverUrl = parseUrl(this._conf.serverUrl)
this._conf.serverUrl = new URL(this._conf.serverUrl)

@@ -185,3 +185,3 @@ if (containerInfo) {

// 200: New config available (or no config for the given service.name / service.environment)
const etag = res.headers['etag']
const etag = res.headers.etag
if (etag) this._conf.lastConfigEtag = etag

@@ -273,6 +273,8 @@

function encodeObject (obj) {
return this._encode(obj.chunk, obj.encoding)
}
Client.prototype._writevCleaned = function (objs, cb) {
const chunk = objs.reduce((result, obj) => {
return result + this._encode(obj.chunk, obj.encoding)
}, '')
const chunk = objs.map(encodeObject.bind(this)).join('')

@@ -534,3 +536,3 @@ this._received += objs.length

method,
path: opts.serverUrl.path === '/' ? defaultPath : opts.serverUrl.path + defaultPath,
path: opts.serverUrl.pathname === '/' ? defaultPath : opts.serverUrl.pathname + defaultPath,
headers

@@ -542,4 +544,4 @@ }

const headers = {}
if (opts.secretToken) headers['Authorization'] = 'Bearer ' + opts.secretToken
headers['Accept'] = 'application/json'
if (opts.secretToken) headers.Authorization = 'Bearer ' + opts.secretToken
headers.Accept = 'application/json'
headers['User-Agent'] = `${opts.userAgent} ${pkg.name}/${pkg.version} ${process.release.name}/${process.versions.node}`

@@ -658,3 +660,3 @@ return Object.assign(headers, opts.headers)

for (let key of Object.keys(labels)) {
for (const key of Object.keys(labels)) {
const value = labels[key]

@@ -661,0 +663,0 @@ result[key] = oneOf(typeof value, ['string', 'number', 'boolean'])

@@ -216,3 +216,3 @@ 'use strict'

let max = path[0] === 'tags'
const max = path[0] === 'tags'
? opts.truncateKeywordsAt

@@ -219,0 +219,0 @@ : opts.truncateStringsAt

{
"name": "elastic-apm-http-client",
"version": "8.2.1",
"version": "9.0.0",
"description": "A low-level HTTP client for communicating with the Elastic APM intake API",

@@ -14,3 +14,3 @@ "main": "index.js",

"engines": {
"node": "6 || 8 || >=10"
"node": "^8.6.0 || 10 || >=12"
},

@@ -22,4 +22,4 @@ "author": "Thomas Watson <w@tson.dk> (https://twitter.com/wa7son)",

"container-info": "^1.0.1",
"end-of-stream": "^1.4.1",
"fast-safe-stringify": "^2.0.6",
"end-of-stream": "^1.4.4",
"fast-safe-stringify": "^2.0.7",
"fast-stream-to-buffer": "^1.0.0",

@@ -32,9 +32,9 @@ "pump": "^3.0.0",

"devDependencies": {
"codecov": "^3.5.0",
"codecov": "^3.6.1",
"https-pem": "^2.0.0",
"ndjson": "^1.5.0",
"nyc": "^14.1.1",
"semver": "^6.1.1",
"standard": "^12.0.1",
"tape": "^4.10.2"
"semver": "^6.3.0",
"standard": "^14.3.1",
"tape": "^4.11.0"
},

@@ -56,5 +56,5 @@ "repository": {

"coordinates": [
55.6819147,
12.554504
55.778261,
12.593028
]
}
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