-
Notifications
You must be signed in to change notification settings - Fork 168
improv(metrics): emit warning when default dimensions are overwritten #4287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improv(metrics): emit warning when default dimensions are overwritten #4287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll review this PR tomorrow, I am not 100% sure about wanting to add an internal flag but I need time to look at the code and come up with a proposal.
Please leave the PR open and, if possible, avoid making changes until we have time to review it.
Thank you!
sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a bit more time - I've started looking at the PR and have made a couple commits to remove the static flag, but it needs some more work.
I'll continue by Monday end of day - please leave the PR open and if possible, avoid making changes to the code.
@svozza I made a few commits to remove the workaround used to avoid the double warning, and refactored some of the internal logic to remove the root cause of the double warning. The end to end tests are passing, if you can on Monday please take a look, since I'm the last committer I can't self-approve it. |
|
Summary
Changes
This PR restores and improves the warning mechanism for overwritten default dimensions in the Metrics utility:
Key Updates:
suppressSetDefaultDimensionsWarnings()
to temporarily suppress warnings during internalsetDefaultDimensions()
calls.Affected Code:
metrics.ts
(suppression logic added)dimension.test.ts
(added tests covering the changes)captureColdStartMetric
updated to wrap internalsetDefaultDimensions
callIssue number: closes #4134
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.