@aws-lambda-powertools/tracer
Advanced tools
Comparing version
@@ -6,12 +6,9 @@ "use strict"; | ||
class EnvironmentVariablesService extends commons_1.EnvironmentVariablesService { | ||
constructor() { | ||
super(...arguments); | ||
// Environment variables | ||
this.awsExecutionEnv = 'AWS_EXECUTION_ENV'; | ||
this.samLocalVariable = 'AWS_SAM_LOCAL'; | ||
this.tracerCaptureErrorVariable = 'POWERTOOLS_TRACER_CAPTURE_ERROR'; | ||
this.tracerCaptureHTTPsRequestsVariable = 'POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS'; | ||
this.tracerCaptureResponseVariable = 'POWERTOOLS_TRACER_CAPTURE_RESPONSE'; | ||
this.tracingEnabledVariable = 'POWERTOOLS_TRACE_ENABLED'; | ||
} | ||
// Environment variables | ||
awsExecutionEnv = 'AWS_EXECUTION_ENV'; | ||
samLocalVariable = 'AWS_SAM_LOCAL'; | ||
tracerCaptureErrorVariable = 'POWERTOOLS_TRACER_CAPTURE_ERROR'; | ||
tracerCaptureHTTPsRequestsVariable = 'POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS'; | ||
tracerCaptureResponseVariable = 'POWERTOOLS_TRACER_CAPTURE_RESPONSE'; | ||
tracingEnabledVariable = 'POWERTOOLS_TRACE_ENABLED'; | ||
/** | ||
@@ -18,0 +15,0 @@ * It returns the value of the AWS_EXECUTION_ENV environment variable. |
@@ -119,8 +119,14 @@ "use strict"; | ||
class Tracer extends commons_1.Utility { | ||
provider; | ||
captureError = true; | ||
captureHTTPsRequests = true; | ||
captureResponse = true; | ||
customConfigService; | ||
// envVarsService is always initialized in the constructor in setOptions() | ||
envVarsService; | ||
// serviceName is always initialized in the constructor in setOptions() | ||
serviceName; | ||
tracingEnabled = true; | ||
constructor(options = {}) { | ||
super(); | ||
this.captureError = true; | ||
this.captureHTTPsRequests = true; | ||
this.captureResponse = true; | ||
this.tracingEnabled = true; | ||
this.setOptions(options); | ||
@@ -127,0 +133,0 @@ this.provider = new ProviderService_js_1.ProviderService(); |
import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; | ||
class EnvironmentVariablesService extends CommonEnvironmentVariablesService { | ||
constructor() { | ||
super(...arguments); | ||
// Environment variables | ||
this.awsExecutionEnv = 'AWS_EXECUTION_ENV'; | ||
this.samLocalVariable = 'AWS_SAM_LOCAL'; | ||
this.tracerCaptureErrorVariable = 'POWERTOOLS_TRACER_CAPTURE_ERROR'; | ||
this.tracerCaptureHTTPsRequestsVariable = 'POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS'; | ||
this.tracerCaptureResponseVariable = 'POWERTOOLS_TRACER_CAPTURE_RESPONSE'; | ||
this.tracingEnabledVariable = 'POWERTOOLS_TRACE_ENABLED'; | ||
} | ||
// Environment variables | ||
awsExecutionEnv = 'AWS_EXECUTION_ENV'; | ||
samLocalVariable = 'AWS_SAM_LOCAL'; | ||
tracerCaptureErrorVariable = 'POWERTOOLS_TRACER_CAPTURE_ERROR'; | ||
tracerCaptureHTTPsRequestsVariable = 'POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS'; | ||
tracerCaptureResponseVariable = 'POWERTOOLS_TRACER_CAPTURE_RESPONSE'; | ||
tracingEnabledVariable = 'POWERTOOLS_TRACE_ENABLED'; | ||
/** | ||
@@ -14,0 +11,0 @@ * It returns the value of the AWS_EXECUTION_ENV environment variable. |
@@ -113,8 +113,14 @@ import { Utility } from '@aws-lambda-powertools/commons'; | ||
class Tracer extends Utility { | ||
provider; | ||
captureError = true; | ||
captureHTTPsRequests = true; | ||
captureResponse = true; | ||
customConfigService; | ||
// envVarsService is always initialized in the constructor in setOptions() | ||
envVarsService; | ||
// serviceName is always initialized in the constructor in setOptions() | ||
serviceName; | ||
tracingEnabled = true; | ||
constructor(options = {}) { | ||
super(); | ||
this.captureError = true; | ||
this.captureHTTPsRequests = true; | ||
this.captureResponse = true; | ||
this.tracingEnabled = true; | ||
this.setOptions(options); | ||
@@ -121,0 +127,0 @@ this.provider = new ProviderService(); |
{ | ||
"name": "@aws-lambda-powertools/tracer", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "The tracer package for the Powertools for AWS Lambda (TypeScript) library", | ||
@@ -28,7 +28,7 @@ "author": { | ||
"dependencies": { | ||
"@aws-lambda-powertools/commons": "^2.3.0", | ||
"@aws-lambda-powertools/commons": "^2.4.0", | ||
"aws-xray-sdk-core": "^3.9.0" | ||
}, | ||
"peerDependencies": { | ||
"@middy/core": ">=3.x" | ||
"@middy/core": "4.x || 5.x" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependenciesMeta": { |
190650
0.09%4180
0.14%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed