Skip to content

Feature request: populate middy's request.internal with cleanup function for Tracer #1536

Description

@dreamorosi

Use case

In the previous release we introduced a new shared function in the commons package that allows Middy middleware authors to call a cleanup function whenever their middleware has to return early. This allows other Powertools utilities that might be present in the Middleware stack to run their cleanup logic.

In the case of Tracer this means closing any open segment and restoring the main one, to avoid data loss.

Solution/User Experience

See PoC in the initial feature proposal.

Alternative solutions

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilitytracerThis item relates to the Tracer Utility

Type

No type

Projects

Status
Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions