Socket
Socket
Sign inDemoInstall

@hypertrace/nodejsagent

Package Overview
Dependencies
193
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.5.1

11

lib/instrumentation/HttpHypertraceInstrumentation.js

@@ -302,2 +302,13 @@ "use strict";

span.setAttribute('http.status_text', Filter_1.MESSAGE);
// @ts-ignore
if (response.setHeader) {
// @ts-ignore
response.setHeader = function (name, value) {
return this;
};
// @ts-ignore
response.removeHeader = function (name) {
return;
};
}
response.end();

@@ -304,0 +315,0 @@ // @ts-ignore

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,2 +18,3 @@ exports.HttpInstrumentationWrapper = void 0;

const HypertraceAgent_1 = require("../HypertraceAgent");
const http_2 = __importDefault(require("http"));
const _RECORDABLE_CONTENT_TYPES = ['application/json', 'application/graphql', 'application/x-www-form-urlencoded'];

@@ -67,2 +71,9 @@ class HttpInstrumentationWrapper {

let headers = request.headers;
// @ts-ignore
if (request.socket && request.socket.server instanceof http_2.default.Server) {
span.setAttribute("http.scheme", "http");
}
else {
span.setAttribute("http.scheme", "https");
}
let filterResult = Registry_1.Registry.getInstance().applyFilters(span, request.url, headers, undefined, Filter_1.REQUEST_TYPE.HTTP);

@@ -112,2 +123,13 @@ if (filterResult) {

// @ts-ignore
if (request.res.setHeader) {
// @ts-ignore
request.res.setHeader = function (name, value) {
return this;
};
// @ts-ignore
request.res.removeHeader = function (name) {
return;
};
}
// @ts-ignore
HypertraceAgent_1.hypertraceDomain.add(request);

@@ -114,0 +136,0 @@ throw (0, Filter_1.filterError)();

2

package.json
{
"name": "@hypertrace/nodejsagent",
"version": "1.5.0",
"version": "1.5.1",
"description": "Hypertrace Node.js Agent",

@@ -5,0 +5,0 @@ "author": "Traceable Inc.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc