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

feat(rum): propagate sampling decision through tracestate #953

Merged
merged 7 commits into from
Feb 2, 2021
Prev Previous commit
Next Next commit
chore: test if repeat function exists
  • Loading branch information
vigneshshanmugam committed Jan 26, 2021
commit 8e53f1c3098bdfacf851ecce83cee1443882017e
8 changes: 7 additions & 1 deletion packages/rum-core/test/common/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ describe('lib/utils', function() {
span.sampleRate = value
expect(utils.getTSHeaderValue(span)).toBe(`es=s:${value}`)
}
const invalidValues = [undefined, null, 'a'.repeat(257), '1.2;-', '=0.23']
const invalidValues = [undefined, null, '1.2;-', '=0.23']
/**
* IE and Older browser versions does not support repeat function
*/
if (typeof String.prototype.repeat === 'function') {
invalidValues.push('a'.repeat(257))
}
for (const value of invalidValues) {
span.sampleRate = value
expect(utils.getTSHeaderValue(span)).toBeUndefined()
Expand Down