@hypertrace/nodejsagent
Advanced tools
Comparing version 1.3.0 to 1.4.0
import * as filter from "./filter/Filter"; | ||
export declare type IFilter = filter.IFilter; | ||
export type IFilter = filter.IFilter; |
@@ -40,6 +40,11 @@ "use strict"; | ||
let dataCapture = this.agentConfig.data_capture; | ||
// @ts-ignore | ||
this.requestHeaderCaptureEnabled = dataCapture.http_headers.request; | ||
// @ts-ignore | ||
this.responseHeaderCaptureEnabled = dataCapture.http_headers.response; | ||
// @ts-ignore | ||
this.requestBodyCaptureEnabled = dataCapture.http_body.request; | ||
// @ts-ignore | ||
this.responseBodyCaptureEnabled = dataCapture.http_body.response; | ||
// @ts-ignore | ||
this.maxBodySizeBytes = dataCapture.body_max_size_bytes; | ||
@@ -46,0 +51,0 @@ } |
@@ -14,8 +14,17 @@ "use strict"; | ||
Logging_1.logger.debug(event); | ||
if (lambdaRequestContext['http']) { | ||
let httpContext = lambdaRequestContext['http']; | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_METHOD, httpContext['method']); | ||
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']); | ||
} | ||
} | ||
else if (apiGatewayVersion === "1.0") { | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_METHOD, event['httpMethod']); | ||
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']); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_TARGET, event['path']); | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.HTTP_HOST, lambdaRequestContext['domainName']); | ||
} | ||
@@ -22,0 +31,0 @@ let cookies = event['cookies']; |
{ | ||
"name": "@hypertrace/nodejsagent", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Hypertrace Node.js Agent", | ||
@@ -5,0 +5,0 @@ "author": "Traceable Inc.", |
408128
7477