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-1046] instrument method implementation #1117

Merged
merged 6 commits into from
Oct 8, 2021

Conversation

BenoitZugmeyer
Copy link
Member

Motivation

Add a new utility function to help instrumenting native APIs and reset the instrumentation.

Changes

  • implement the utility function instrumentMethod
  • use it in a simple case (locationChangeObservable) to have first look at its usage

Testing

CI


I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner October 6, 2021 14:53
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/instrument-method-implementation branch from f380524 to febcd3e Compare October 6, 2021 14:54
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/instrument-method-implementation branch from febcd3e to 7bd5258 Compare October 6, 2021 14:58
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2021

Codecov Report

Merging #1117 (849b388) into main (2749a23) will increase coverage by 0.04%.
The diff coverage is 93.33%.

❗ Current head 849b388 differs from pull request most recent head 7bd5258. Consider uploading reports for the commit 7bd5258 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1117      +/-   ##
==========================================
+ Coverage   88.94%   88.98%   +0.04%     
==========================================
  Files          92       93       +1     
  Lines        4214     4230      +16     
  Branches      968      971       +3     
==========================================
+ Hits         3748     3764      +16     
  Misses        466      466              
Impacted Files Coverage Δ
...s/rum-core/src/browser/locationChangeObservable.ts 94.11% <86.66%> (+0.36%) ⬆️
packages/core/src/domain/sessionManagement.ts 96.58% <100.00%> (+0.08%) ⬆️
packages/core/src/tools/instrumentMethod.ts 100.00% <100.00%> (ø)

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 2749a23...7bd5258. Read the comment docs.

packages/core/src/tools/instrumentMethod.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
packages/core/src/tools/instrumentMethod.spec.ts Outdated Show resolved Hide resolved
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.

Nice!

@BenoitZugmeyer BenoitZugmeyer merged commit fe2766e into main Oct 8, 2021
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/instrument-method-implementation branch October 8, 2021 09:15
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.

4 participants