feat: Add metrics to A and Button on click
Description
This PR aims to give us insight into click events occurring in the DOM for both the A and Button elements. We're using the existing Sentry metrics configuration to increment a metric on each click by hydrating the onClick event with this metric increment call.
Instead of doing each individually, this will give us a framework to get it for all A's and Buttons for free, and when our new event system is built out we can just swap out these for those instead.
Screenshots
https://github.com/codecov/gazebo/assets/159853603/e5fef0a3-d316-4ebf-8a32-61f8f6337b7d
- In the above video we can see the event metric names being pushed to the console
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:white_check_mark: All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #2863 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 888 888
Lines 13190 13204 +14
Branches 3522 3528 +6
=======================================
+ Hits 12986 13000 +14
Misses 200 200
Partials 4 4
| Files | Coverage Δ | |
|---|---|---|
| src/ui/A/A.jsx | 100.00% <100.00%> (ø) |
|
| src/ui/Button/Button.jsx | 100.00% <100.00%> (ø) |
| Components | Coverage Δ | |
|---|---|---|
| Assets | 53.84% <ø> (ø) |
|
| Layouts | 97.22% <ø> (ø) |
|
| Pages | 99.27% <ø> (ø) |
|
| Services | 99.46% <ø> (ø) |
|
| Shared | 99.68% <ø> (ø) |
|
| UI | 94.79% <100.00%> (+0.05%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6420533...594a6d3. Read the comment docs.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.45%. Comparing base (
6420533) to head (594a6d3).
:white_check_mark: All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #2863 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 888 888
Lines 13190 13204 +14
Branches 3517 3523 +6
=======================================
+ Hits 12986 13000 +14
Misses 200 200
Partials 4 4
| Files | Coverage Δ | |
|---|---|---|
| src/ui/A/A.jsx | 100.00% <100.00%> (ø) |
|
| src/ui/Button/Button.jsx | 100.00% <100.00%> (ø) |
| Components | Coverage Δ | |
|---|---|---|
| Assets | 53.84% <ø> (ø) |
|
| Layouts | 97.22% <ø> (ø) |
|
| Pages | 99.27% <ø> (ø) |
|
| Services | 99.46% <ø> (ø) |
|
| Shared | 99.68% <ø> (ø) |
|
| UI | 94.79% <100.00%> (+0.05%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6420533...594a6d3. Read the comment docs.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.45%. Comparing base (
6420533) to head (594a6d3).
:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@ Coverage Diff @@
## main #2863 +/- ##
===========================================
Coverage 98.45000 98.45000
===========================================
Files 888 888
Lines 13190 13204 +14
Branches 3498 3523 +25
===========================================
+ Hits 12986 13000 +14
Misses 200 200
Partials 4 4
| Files | Coverage Δ | |
|---|---|---|
| src/ui/A/A.jsx | 100.00% <100.00%> (ø) |
|
| src/ui/Button/Button.jsx | 100.00% <100.00%> (ø) |
| Components | Coverage Δ | |
|---|---|---|
| Assets | 53.84% <ø> (ø) |
|
| Layouts | 97.22% <ø> (ø) |
|
| Pages | 99.27% <ø> (ø) |
|
| Services | 99.46% <ø> (ø) |
|
| Shared | 99.68% <ø> (ø) |
|
| UI | 94.79% <100.00%> (+0.05%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6420533...594a6d3. Read the comment docs.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.45%. Comparing base (
6420533) to head (594a6d3).
:white_check_mark: All tests successful. No failed tests found :relaxed:
@@ Coverage Diff @@
## main #2863 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 888 888
Lines 13190 13204 +14
Branches 3517 3523 +6
=======================================
+ Hits 12986 13000 +14
Misses 200 200
Partials 4 4
| Files | Coverage Δ | |
|---|---|---|
| src/ui/A/A.jsx | 100.00% <100.00%> (ø) |
|
| src/ui/Button/Button.jsx | 100.00% <100.00%> (ø) |
| Components | Coverage Δ | |
|---|---|---|
| Assets | 53.84% <ø> (ø) |
|
| Layouts | 97.22% <ø> (ø) |
|
| Pages | 99.27% <ø> (ø) |
|
| Services | 99.46% <ø> (ø) |
|
| Shared | 99.68% <ø> (ø) |
|
| UI | 94.79% <100.00%> (+0.05%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6420533...594a6d3. Read the comment docs.
Bundle Report
Changes will increase total bundle size by 318 bytes :arrow_up:
| Bundle name | Size | Change |
|---|---|---|
| gazebo-staging-array-push | 6.87MB | 318 bytes :arrow_up: |
Bundle Report
Changes will increase total bundle size by 318 bytes :arrow_up:
| Bundle name | Size | Change |
|---|---|---|
| gazebo-production-array-push | 6.87MB | 318 bytes :arrow_up: |
✅ Deploy preview for gazebo ready!
Previews expire after 1 month automatically.
| Commit | Created | Cloud | Enterprise |
|---|---|---|---|
| 97cb9b3e383ce584d5ebad1c01401cd82acb5e46 | Wed, 08 May 2024 18:30:06 GMT | Expired | Expired |
| 97cb9b3e383ce584d5ebad1c01401cd82acb5e46 | Wed, 08 May 2024 18:31:34 GMT | Expired | Expired |
| b3bf282d0a4d2357c0783c1017d456fee102de7d | Mon, 10 Jun 2024 22:38:40 GMT | Expired | Expired |
| 594a6d395e9d01db4e9118e36ebccfcabf128797 | Mon, 10 Jun 2024 23:20:43 GMT | Cloud | Enterprise |
Closing out, will revisit when Codecov specific eventing work is complete