Skip to content
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

fix: Adds logging for SPA route navigation with React router #21960

Conversation

eric-briscoe
Copy link
Contributor

@eric-briscoe eric-briscoe commented Oct 28, 2022

SUMMARY

Adds logging for SPA route navigation with React router, fixes bug in loggerMiddleware that was sending malformed log payloads in some cases

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

SPA.Nav.Logging.mov

TESTING INSTRUCTIONS

  1. Checkout PR and run
  2. Navigate between dashboards, Charts, Datasets in top navigation menu
  3. Go to SQL Lab
  4. Run the following Query: SELECT * from logs ORDER BY dttm DESC
  5. Ensure you see log events returned with a event_name of "spa_navigation"

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

… loggerMiddleware that was sending malformed log payloads in some cases
@eric-briscoe eric-briscoe changed the title Adds logging for SPA route navigation with React router fix: Adds logging for SPA route navigation with React router Oct 28, 2022
@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Merging #21960 (7c28f41) into master (102909e) will decrease coverage by 0.00%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##           master   #21960      +/-   ##
==========================================
- Coverage   66.86%   66.85%   -0.01%     
==========================================
  Files        1807     1807              
  Lines       69218    69221       +3     
  Branches     7402     7402              
==========================================
+ Hits        46280    46281       +1     
- Misses      21033    21035       +2     
  Partials     1905     1905              
Flag Coverage Δ
javascript 53.39% <57.14%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...perset-frontend/src/middleware/loggerMiddleware.js 78.04% <50.00%> (ø)
superset-frontend/src/logger/LogUtils.ts 96.15% <100.00%> (+0.15%) ⬆️
...perset-frontend/src/utils/DebouncedMessageQueue.js 91.66% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -26,9 +26,9 @@ class DebouncedMessageQueue {
}) {
this.queue = [];
this.sizeThreshold = sizeThreshold;
this.delayThrehold = delayThreshold;
this.delayThreshold = delayThreshold;
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch :)

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@eschutho eschutho merged commit d1807db into apache:master Oct 28, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants