-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedtracerThis item relates to the Tracer UtilityThis item relates to the Tracer Utility
Description
Bug description
EDIT: see this comment for updated info after triage.
The import statement in Tracer.ts for TracerInterface
is importing all the modules from the root. https://github.com/awslabs/aws-lambda-powertools-typescript/blob/main/packages/tracer/src/Tracer.ts#L3.
I am trying to use tracer module without the need to install middy.
Expected Behavior
Should be able to use Tracer without the need to import middy when its not used.
Current Behavior
This behavior is forcing to import middy middleware
Possible Solution
import { TracerInterface } from './TracerInterface';
Steps to Reproduce
- Install tracer npm module
npm i @aws-lambda-powertools/tracer
- Import tracer
import { Tracer } from "@aws-lambda-powertools/tracer/lib/Tracer";
- Add tracer annotation and build fails with
error TS2307: Cannot find module '@middy/core' or its corresponding type declarations
.
Environment
- Powertools version used: 1.1.1
- Packaging format (Layers, npm): npm
- AWS Lambda function runtime: Node 16
renatoargh
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedtracerThis item relates to the Tracer UtilityThis item relates to the Tracer Utility