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.4.0 to 1.4.1

22

lib/instrumentation/LambdaInstrumentationWrapper.js

@@ -14,15 +14,15 @@ "use strict";

Logging_1.logger.debug(event);
let apiGatewayVersion = event["version"];
if (apiGatewayVersion === "2.0") {
if (lambdaRequestContext['http']) {
let httpContext = lambdaRequestContext['http'];
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_METHOD, httpContext['method']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_SCHEME, headers['x-forwarded-proto']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_TARGET, httpContext['path']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_HOST, headers['host']);
}
// event["version"] is not always present
// the request context will have an `http` field if v2
if (lambdaRequestContext['http']) {
let httpContext = lambdaRequestContext['http'];
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_METHOD, httpContext['method']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_SCHEME, headers['x-forwarded-proto']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_TARGET, httpContext['path']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_HOST, headers['host']);
}
else if (apiGatewayVersion === "1.0") {
else {
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_METHOD, event['httpMethod']);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_SCHEME, headers['x-forwarded-proto']);
let proto_header = headers['x-forwarded-proto'] || headers['X-Forwarded-Proto'];
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_SCHEME, proto_header);
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_TARGET, event['path']);

@@ -29,0 +29,0 @@ span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_HOST, lambdaRequestContext['domainName']);

{
"name": "@hypertrace/nodejsagent",
"version": "1.4.0",
"version": "1.4.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