Skip to content

Commit

Permalink
Merge pull request #1193 from giufus/patch-1
Browse files Browse the repository at this point in the history
Update aws-lambda-powertools imports
  • Loading branch information
willfarrell authored Mar 20, 2024
2 parents 56b1431 + c3f9204 commit c901dc3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions website/docs/integrations/lambda-powertools.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Middleware accepts the following options:

```javascript
import middy from '@middy/core';
import { Logger, injectLambdaContext } from '@aws-lambda-powertools/logger';
import { Logger } from '@aws-lambda-powertools/logger';
import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware';

const logger = new Logger({ serviceName: 'serverlessAirline' });

Expand Down Expand Up @@ -125,7 +126,8 @@ Middleware accepts the following options:

```javascript
import middy from '@middy/core';
import { Tracer, captureLambdaHandler } from '@aws-lambda-powertools/tracer';
import { Tracer } from '@aws-lambda-powertools/tracer';
import { captureLambdaHandler } from '@aws-lambda-powertools/tracer/middleware';
import { SecretsManagerClient } from '@aws-sdk/client-secrets-manager';

const tracer = new Tracer({
Expand Down Expand Up @@ -180,7 +182,8 @@ Middleware accepts the following options:

```javascript
import middy from '@middy/core';
import { Metrics, MetricUnits, logMetrics } from '@aws-lambda-powertools/metrics';
import { Metrics, MetricUnit } from '@aws-lambda-powertools/metrics';
import { logMetrics } from '@aws-lambda-powertools/metrics/middleware';

const metrics = new Metrics({
namespace: 'serverlessAirline',
Expand Down

0 comments on commit c901dc3

Please sign in to comment.