New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opencensus/instrumentation-https

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencensus/instrumentation-https - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

18

build/src/https.js

@@ -45,3 +45,19 @@ "use strict";

if (semver.satisfies(this.version, '>=8.0.0')) {
shimmer.wrap(this.moduleExports, 'get', this.getPatchHttpsOutgoingRequest());
shimmer.wrap(this.moduleExports, 'get', () => {
// Re-implement http.get. This needs to be done (instead of using
// getPatchOutgoingRequestFunction to patch it) because we need to
// set the trace context header before the returned ClientRequest is
// ended. The Node.js docs state that the only differences between
// request and get are that (1) get defaults to the HTTP GET method and
// (2) the returned request object is ended immediately. The former is
// already true (at least in supported Node versions up to v9), so we
// simply follow the latter. Ref:
// https://nodejs.org/dist/latest/docs/api/http.html#http_http_get_options_callback
// https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/plugins/plugin-http.ts#L198
return function getTrace(options, callback) {
const req = https.request(options, callback);
req.end();
return req;
};
});
}

@@ -48,0 +64,0 @@ return this.moduleExports;

6

package.json
{
"name": "@opencensus/instrumentation-https",
"version": "0.0.17",
"version": "0.0.18",
"description": "Opencensus https automatic instrumentation package.",

@@ -68,4 +68,4 @@ "main": "build/src/index.js",

"dependencies": {
"@opencensus/core": "^0.0.17",
"@opencensus/instrumentation-http": "^0.0.17",
"@opencensus/core": "^0.0.18",
"@opencensus/instrumentation-http": "^0.0.18",
"semver": "^6.0.0",

@@ -72,0 +72,0 @@ "shimmer": "^1.2.0"

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