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-709][core] support 'null' as a context value #546

Merged
merged 6 commits into from
Sep 25, 2020

Conversation

BenoitZugmeyer
Copy link
Member

Motivation

Ensure that nothing breaks when the user unexpectedly pass null for values that end up in a Context.

Changes

Add proper support for null value in context.

Testing

Unit tests have been upgraded. You can test it manually by calling DD_RUM.init({ service: null, clientToken: 'xxx', applicationId: 'xxx' })


I have gone over the contributing documentation.

`combine` is equivalent to `deepMerge`, but have improved typing
support, so we don't need to cast it as much: it can infer that values
are Context (or objects compatible with Context).
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner September 24, 2020 14:38
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2020

Codecov Report

Merging #546 into master will decrease coverage by 0.25%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
- Coverage   88.36%   88.11%   -0.26%     
==========================================
  Files          36       36              
  Lines        2287     2288       +1     
  Branches      473      469       -4     
==========================================
- Hits         2021     2016       -5     
- Misses        266      272       +6     
Impacted Files Coverage Δ
packages/rum/src/rum.ts 88.32% <50.00%> (-4.38%) ⬇️
packages/logs/src/logger.ts 95.40% <90.00%> (ø)
packages/core/src/internalMonitoring.ts 86.15% <100.00%> (ø)
packages/core/src/utils.ts 87.35% <100.00%> (+0.07%) ⬆️
packages/rum/src/performanceCollection.ts 67.14% <0.00%> (-1.43%) ⬇️
packages/rum/src/parentContexts.ts 100.00% <0.00%> (+1.75%) ⬆️

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 7f347ba...cc361c8. Read the comment docs.

@BenoitZugmeyer BenoitZugmeyer merged commit acd9c42 into master Sep 25, 2020
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/support-null-context branch September 25, 2020 13:05
BenoitZugmeyer added a commit that referenced this pull request Sep 25, 2020
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