-
Notifications
You must be signed in to change notification settings - Fork 534
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
feat(instrumentation-document-load): performance paint timing events #484
Conversation
Codecov Report
@@ Coverage Diff @@
## main #484 +/- ##
=======================================
Coverage 94.81% 94.81%
=======================================
Files 150 152 +2
Lines 9153 9169 +16
Branches 904 909 +5
=======================================
+ Hits 8678 8694 +16
Misses 475 475
|
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.
Generally looks good, but I think the event names can be improved.
}; | ||
|
||
const performancePaintNames = { | ||
'first-paint': EventNames.FIRST_PAINT, |
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.
I don't see a lot of dashes in names/semantic conventions in otel... .
and _
yes, but not -
. Perhaps the camel case names are fine as they are? Most other browser performance
event names are passed through unchanged.
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.
So API defines them as first-paint
and I proposed to use firstPaint
.
The EventNames
enum is for our OT enum names and here I define how to map them.
Other events are camel cased and I wanted to follow this convention.
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.
Oh, I was reading it backwards! Apologies!
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.
@johnbley does it mean you are ok with this changes then ?
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.
Yes, it looks good. Sorry I didn't officially, approve, will do so.
@kkruk-sumo can you please fix the tests, and perhaps allow maintainers to allow changes so this way it will be easier to merge when it is outdated |
@obecny Sorry. Firstly I had issues with eslint (finally found out that I had the wrong eslint version) and then |
LGTM |
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.
lgtm
@obecny Can we merge this PR? |
@kkruk-sumo yes, but it cannot be merged until it is rebased with base branch . So please merge with latest or allow editing by maintainers :) thx |
@obecny Apologies. I didn't know the PR needs to be up to date. Unfortunately I don't have permissions to allow maintainers to edit this PR or at least I don't see such option. |
merged :), thx for contribution |
Which problem is this PR solving?
Added new events to the root span
documentLoad
:firstPaint
firstContentfulPaint
These events can be used in RUM and to better understand website's loading performance.
Short description of the changes
The
_getEntries
method has been moved to utils as it doesn't need to have class instance. New utiladdSpanPerformancePaintEvents
enhances given span with the collected paint events.