fix(metrics): store service name in defaultDimensions to avoid clearing it#1146
Merged
dreamorosi merged 3 commits intoNov 9, 2022
Merged
Conversation
Contributor
Author
|
E2E results (passing): https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/3420360656 |
dreamorosi
commented
Nov 8, 2022
| { | ||
| Namespace: 'serverlessAirline', | ||
| Dimensions: [[ 'environment', 'aws_region', 'service', 'function_name' ]], | ||
| Dimensions: [[ 'service', 'environment', 'aws_region', 'function_name' ]], |
Contributor
Author
There was a problem hiding this comment.
This change (& the one a few lines below) is needed because we are comparing the JSON.stringif-ied version of these strings, so order counts.
I could have converted to object comparison but wanted to keep the diff small.
13 tasks
ijemmy
approved these changes
Nov 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
As described in #1145,
v1.4.0highlighted a bug that causes the service name to be cleared from metrics after flushing.The issue contains examples of the behavior and proposes a fix which has been implemented in this PR.
How to verify this change
See checks in PR.
Related issues, RFCs
Issue number: #1145
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist
Breaking change checklist
N/A
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.