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

newrelic

Package Overview
Dependencies
Maintainers
1
Versions
383
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newrelic - npm Package Compare versions

Comparing version 11.9.0 to 11.10.0

lib/shim/message-shim/common.js

27

lib/collector/remote-method.js

@@ -262,11 +262,15 @@ /*

const logBody = Buffer.isBuffer(options.body) ? 'Buffer ' + options.body.length : options.body
logger[level](
{ body: logBody },
'Posting to %s://%s:%s%s',
protocol,
options.host,
options.port,
options.path
)
// check if trace is enabled or audit log(aka info in this case) before attemping
// to get the body length or parse the path with redacted key
if (logger.traceEnabled() || level === 'info') {
const logBody = Buffer.isBuffer(options.body) ? 'Buffer ' + options.body.length : options.body
logger[level](
{ body: logBody },
'Posting to %s://%s:%s%s',
protocol,
options.host,
options.port,
this._path({ redactLicenseKey: true })
)
}

@@ -340,9 +344,10 @@ this._request(options)

*
* @param {boolean} redactLicenseKey flag to redact license key in path
* @returns {string} The URL path to be POSTed to.
*/
RemoteMethod.prototype._path = function _path() {
RemoteMethod.prototype._path = function _path({ redactLicenseKey } = {}) {
const query = {
marshal_format: 'json',
protocol_version: this._protocolVersion,
license_key: this._config.license_key,
license_key: redactLicenseKey ? 'REDACTED' : this._config.license_key,
method: this.name

@@ -349,0 +354,0 @@ }

@@ -70,3 +70,4 @@ /*

* [3] -> extracted error type,
* [4] -> attributes
* [4] -> attributes,
* [5] -> transaction id
*/

@@ -115,3 +116,3 @@ function createError(transaction, exception, config) {

return [0, name, message, type, params]
return [0, name, message, type, params, transaction?.id]
}

@@ -118,0 +119,0 @@

@@ -15,4 +15,3 @@ /*

unresolved_promise_cleanup: true,
legacy_context_manager: false,
aws_bedrock_instrumentation: false
legacy_context_manager: false
}

@@ -38,3 +37,4 @@

'async_local_context',
'undici_instrumentation'
'undici_instrumentation',
'aws_bedrock_instrumentation'
]

@@ -41,0 +41,0 @@

@@ -22,2 +22,3 @@ /*

const semver = require('semver')
const { DESTINATIONS } = require('../config/attribute-filter')

@@ -286,2 +287,4 @@ let TRACKING_METRIC = OPENAI.TRACKING_PREFIX

}
segment.transaction.trace.attributes.addAttribute(DESTINATIONS.TRANS_EVENT, 'llm', true)
}

@@ -306,2 +309,4 @@ }

after(_shim, _fn, _name, err, response, segment) {
segment.transaction.trace.attributes.addAttribute(DESTINATIONS.TRANS_EVENT, 'llm', true)
if (!response) {

@@ -308,0 +313,0 @@ // If we get an error, it is possible that `response = null`.

@@ -40,2 +40,4 @@ /*

exports.WrapSpec = WrapSpec
exports.MessageSpec = MessageSpec
exports.MessageSubscribeSpec = MessageSubscribeSpec

@@ -84,4 +86,22 @@ function cast(Class, spec) {

function MessageSpec(spec) {
RecorderSpec.call(this, spec)
this.destinationName = hasOwnProperty(spec, 'destinationName') ? spec.destinationName : null
this.destinationType = hasOwnProperty(spec, 'destinationType') ? spec.destinationType : null
this.headers = hasOwnProperty(spec, 'headers') ? spec.headers : null
this.routingKey = hasOwnProperty(spec, 'routingKey') ? spec.routingKey : null
this.queue = hasOwnProperty(spec, 'queue') ? spec.queue : null
this.messageHandler = hasOwnProperty(spec, 'messageHandler') ? spec.messageHandler : null
}
util.inherits(MessageSpec, RecorderSpec)
function MessageSubscribeSpec(spec) {
MessageSpec.call(this, spec)
this.consumer = hasOwnProperty(spec, 'consumer') ? spec.consumer : null
}
util.inherits(MessageSubscribeSpec, MessageSpec)
function _defaultGetParams(shim, fn, name, args, req) {
return req && req.params
}
{
"name": "newrelic",
"version": "11.9.0",
"version": "11.10.0",
"author": "New Relic Node.js agent team <nodejs@newrelic.com>",

@@ -126,2 +126,12 @@ "license": "Apache-2.0",

"web": "https://newrelic.com"
},
{
"name": "James Sumners",
"email": "jsumners@newrelic.com",
"web": "https://newrelic.com"
},
{
"name": "Svetlana Brennan",
"email": "sbrennan@newrelic.com",
"web": "https://newrelic.com"
}

@@ -187,5 +197,5 @@ ],

"@grpc/proto-loader": "^0.7.5",
"@newrelic/aws-sdk": "^7.0.3",
"@newrelic/aws-sdk": "^7.1.0",
"@newrelic/koa": "^8.0.1",
"@newrelic/security-agent": "^0.6.0",
"@newrelic/security-agent": "0.7.0",
"@newrelic/superagent": "^7.0.1",

@@ -192,0 +202,0 @@ "@tyriar/fibonacci-heap": "^2.0.7",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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