Skip to content

Conversation

@just-boris
Copy link
Member

Issue #, if available: AWSUI-60324

Description of changes:

Fixing metrics according to the guidance from the Panorama API owners

  • remove eventName as it is a legacy field
  • always set eventType: 'awsui' for everything we emit to make it more discoverable among other entries
  • set metric name as eventContext

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.

expect(consoleSpy).toHaveBeenCalledWith(`Event detail for metric is too long: ${eventDetail}`);
});

test('prints an error when event type is too long', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this test, because setting a custom type is not possible anymore (it is always "awsui")

expect(consoleSpy).toHaveBeenCalledWith(errorMessage);
});

test('prints an error when event name is too long', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this test, because "eventName" attribute is not supported anymore

@codecov
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.30%. Comparing base (3c08c6f) to head (441825f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- 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.
📢 Have feedback on the report? Share it here.

@just-boris
Copy link
Member Author

reopened in #117

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant