-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Improve metrics format #117
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
==========================================
- Coverage 99.30% 99.30% -0.01%
==========================================
Files 29 29
Lines 721 715 -6
Branches 193 186 -7
==========================================
- Hits 716 710 -6
Misses 5 5 ☔ View full report in Codecov by Sentry. |
f408f76
to
81162de
Compare
|
||
expect(window.panorama).toHaveBeenCalledWith( | ||
'trackCustomEvent', | ||
expect.objectContaining({ eventType: 'custom', eventValue: '{"test":"value"}', eventDetail: '{"test":"detail"}' }) | ||
expect.objectContaining({ eventValue: '{"test":"value"}', eventDetail: '{"test":"detail"}' }) |
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.
should this also contain a eventType: 'awsui'
?
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.
Since it uses expect.objectContaining
, it passes regardless.
I decided to skip, because testing this field is not a subject of this test. We have many others to do this check
Issue #, if available: AWSUI-60324
Description of changes:
Fixing metrics according to the guidance from the Panorama API owners
eventName
as it is a legacy fieldeventType: 'awsui'
for everything we emit to make it more discoverable among other entrieseventContext
The final hierarchy of the fields is the following:
eventType (always "awsui" for us) -> eventContext (event in our system, typically a component usage) -> eventDetail (all metadata)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.