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-1372] Should not set rule_psr if it is not defined by the user #1705

Merged
merged 9 commits into from
Aug 30, 2022

Conversation

liywjl
Copy link
Contributor

@liywjl liywjl commented Aug 25, 2022

Motivation

We make a distinction between user set settings and default settings. By sending rule_psr even when the user has not set it, we loose that distinction.

Changes

Set rule_psr to undefined when it is not present, thus omiting it during stringification

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@liywjl liywjl requested a review from a team as a code owner August 25, 2022 15:47
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2022

Codecov Report

Merging #1705 (1307983) into main (57a4d9c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1705      +/-   ##
==========================================
+ Coverage   90.85%   90.87%   +0.01%     
==========================================
  Files         128      128              
  Lines        4812     4811       -1     
  Branches     1071     1072       +1     
==========================================
  Hits         4372     4372              
+ Misses        440      439       -1     
Impacted Files Coverage Δ
packages/rum-core/src/domain/configuration.ts 96.87% <ø> (-0.10%) ⬇️
...rumEventsCollection/resource/resourceCollection.ts 97.56% <100.00%> (ø)
packages/rum-core/src/domain/tracing/tracer.ts 100.00% <100.00%> (ø)
packages/core/src/transport/batch.ts 94.18% <0.00%> (+1.16%) ⬆️

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

expect(traceInfo.rule_psr).toBeUndefined()
})

it('should define rule_psr to 0 if tracingSampleRate is set to 0', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 praise: ‏👍

William Lacroix added 2 commits August 26, 2022 11:24
@liywjl liywjl merged commit 17da547 into main Aug 30, 2022
@liywjl liywjl deleted the william/only-send-rule_psr-if-defined branch August 30, 2022 11:42
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