Skip to content

docs(metrics): document InvokeStore isolation and local testing - #5486

Merged
svozza merged 8 commits into
aws-powertools:mainfrom
skyeng2:docs/metrics-lambda-invoke-store-behavior
Jul 27, 2026
Merged

svozza merged 8 commits into
aws-powertools:mainfrom
skyeng2:docs/metrics-lambda-invoke-store-behavior

Conversation

@skyeng2

@skyeng2 skyeng2 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documents how Metrics behaves in the Lambda environment versus locally, including automatic per-invocation isolation via @aws/lambda-invoke-store when Lambda multi-concurrency is enabled, and clarifies how to assert emitted EMF metrics in unit tests.

Fixes #5187.

Changes

  • docs/features/metrics.md: add "Lambda environment vs local" and retitle the existing spy example under "Asserting metrics in unit tests"

Test plan

  • Skim Metrics docs Testing section for accuracy vs MetricsStore / shouldUseInvokeStore
  • Confirm existing testing snippet still renders

Docs-only; no AWS credentials required.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@boring-cyborg

boring-cyborg Bot commented Jul 20, 2026

Copy link
Copy Markdown

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

Comment thread docs/features/metrics.md Resolved
@svozza

svozza commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Hi there, thanks for the contribution, can you add the acknowledgement section to the PR. You can see the wording in the GitHub template here: https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/PULL_REQUEST_TEMPLATE.md.

@skyeng2

skyeng2 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. The acknowledgment is in the description and the Acknowledgment Check is passing.

@svozza

svozza commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Can you address this comment too: #5486 (comment). Just needs a slight wording change to make the text clearer.

@skyeng2

skyeng2 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Updated the wording so the in-memory store is described as the default on standard Lambda too, not only for local/tests.

Comment thread docs/features/metrics.md Resolved
@svozza

svozza commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

One final tweak to the wording and then we're good to merge @leiwilson.

Co-authored-by: Stefano Vozza <svozza@gmail.com>
@dreamorosi

Copy link
Copy Markdown
Contributor

@svozza I accepted your suggestion so you can approve.

@dreamorosi
dreamorosi requested a review from svozza July 23, 2026 15:47
@skyeng2

skyeng2 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — confirmed the wording now says Lambda on-demand functions.

@svozza svozza changed the title docs(metrics): document InvokeStore isolation and local testing Jul 23, 2026
@svozza svozza changed the title docs(metrics): document InvokeStore isolation and local testing Jul 23, 2026
@svozza
svozza merged commit 5e221bb into aws-powertools:main Jul 27, 2026
37 checks passed
@boring-cyborg

boring-cyborg Bot commented Jul 27, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR between 10-29 LOC

3 participants