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

✨ [RUMF-534] implement logs.onReady and rum.onReady #564

Merged
merged 5 commits into from
Oct 14, 2020

Conversation

BenoitZugmeyer
Copy link
Member

Motivation

Have a proper way to execute code when the SDK is ready.

Changes

  • Implement logs.onReady and rum.onReady to execute previously stored callbacks
  • Change the e2e tests async setup to use the new official async snippet

Testing


I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner October 14, 2020 09:09
@codecov-io
Copy link

codecov-io commented Oct 14, 2020

Codecov Report

Merging #564 into master will decrease coverage by 0.18%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #564      +/-   ##
==========================================
- Coverage   88.26%   88.08%   -0.19%     
==========================================
  Files          39       39              
  Lines        2275     2282       +7     
  Branches      476      477       +1     
==========================================
+ Hits         2008     2010       +2     
- Misses        267      272       +5     
Impacted Files Coverage Δ
packages/core/src/init.ts 68.42% <66.66%> (-2.55%) ⬇️
packages/logs/src/logs.entry.ts 100.00% <100.00%> (ø)
packages/rum/src/rum.entry.ts 94.00% <100.00%> (ø)
packages/rum/src/parentContexts.ts 98.24% <0.00%> (-1.76%) ⬇️
packages/rum/src/rum.ts 77.39% <0.00%> (-0.69%) ⬇️

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 97ebc5b...7d99925. Read the comment docs.

@@ -31,16 +31,20 @@ export const DEFAULT_SETUPS = [
export function asyncSetup(options: SetupOptions) {
let body = options.body || ''

function formatSnippet(url: string, globalName: string) {
return `(function(r,a,w,l,s) {
Copy link
Member Author

Choose a reason for hiding this comment

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

"rawls" is a The Wire reference

Copy link
Contributor

Choose a reason for hiding this comment

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

nice one but I don't think that the wire references are publicly shared 🙂
what about something dog related instead? hound would fit 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok for hound :)

@BenoitZugmeyer BenoitZugmeyer merged commit 58fd066 into master Oct 14, 2020
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/define-on-ready branch October 14, 2020 16:30
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