Closed
Description
Use case
Important
EDIT: see this comment for updated scope & context
For captureMethod - Method decorator able to support both async/sync function together
Solution/User Experience
We can add new option parameter - async to let user determine when the function need capture sync function.
class Something {
tracer.captureMethod({ async: false })
public myMethod {
// do stuff
}
}
Alternative solutions
const tracer = new Tracer();
const myFunction = () => { //do something };
const handler = () => {
const result = tracer.provider.captureFunc('my subsegment name', myFunction);
}
Acknowledgment
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Python, Java
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Closed