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

Limit log monitoring + add more details #990

Merged
merged 4 commits into from
Aug 11, 2021

Conversation

ThibautGeriz
Copy link
Contributor

@ThibautGeriz ThibautGeriz commented Aug 9, 2021

Motivation

Too much logging in the foregroundContext manager

Changes

@ThibautGeriz ThibautGeriz requested a review from a team as a code owner August 9, 2021 15:50
@codecov-commenter
Copy link

Codecov Report

Merging #990 (442e84b) into main (d0bacdc) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
- Coverage   88.86%   88.83%   -0.04%     
==========================================
  Files          84       84              
  Lines        3908     3913       +5     
  Branches      864      866       +2     
==========================================
+ Hits         3473     3476       +3     
- Misses        435      437       +2     
Impacted Files Coverage Δ
packages/rum-core/src/domain/foregroundContexts.ts 92.64% <75.00%> (-2.60%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0bacdc...442e84b. Read the comment docs.

@@ -14,6 +14,7 @@ import { InForegroundPeriod } from '../rawRumEvent.types'

// Arbitrary value to cap number of element (mostly for backend)
export const MAX_NUMBER_OF_FOCUSED_TIME = 500
const MAX_LAG_TIME = 10 as RelativeTime
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment to explain your limiting strategy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because of this chrome bug. It currently dispatches two events separated by ~1ms. I've set it at 10ms to be large & because if our foreground periods are off by 10ms we do not really care.
I also added the now in the log to actually get an insight by how much we're off. I am not really fixing the base issue, just ignoring this chrome bug & adding monitoring info.

Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

LGTM

@ThibautGeriz ThibautGeriz merged commit 68467d3 into main Aug 11, 2021
@ThibautGeriz ThibautGeriz deleted the thibaut.gery/improve-focus-logging branch August 11, 2021 07:26
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.

3 participants