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-771] Add getLoggerGlobalContext and getRumGlobalContext #614

Merged
merged 7 commits into from
Nov 13, 2020

Conversation

webNeat
Copy link
Contributor

@webNeat webNeat commented Nov 12, 2020

Motivation

Simply debugging by providing getters for global contexts.

Changes

  • Couple of small changes (correcting return type and removing unused import).
  • Added getLoggerGlobalContext and getRumGlobalContext
  • Updated README

Testing

No new tests were added since the contextManager methods are already tested and those getters are just aliases of contextManager.get.


I have gone over the contributing documentation.

@webNeat webNeat requested review from a team as code owners November 12, 2020 12:59
Copy link
Contributor

@ruthnaebeck ruthnaebeck left a comment

Choose a reason for hiding this comment

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

👍 for docs

@webNeat webNeat force-pushed the amine/add-global-context-getter branch from 0164d6f to 6d4812f Compare November 13, 2020 10:40
@codecov-io
Copy link

codecov-io commented Nov 13, 2020

Codecov Report

Merging #614 (4492912) into master (538bff0) will decrease coverage by 0.23%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
- Coverage   89.09%   88.85%   -0.24%     
==========================================
  Files          54       54              
  Lines        2503     2503              
  Branches      541      541              
==========================================
- Hits         2230     2224       -6     
- Misses        273      279       +6     
Impacted Files Coverage Δ
packages/logs/src/boot/logs.entry.ts 100.00% <ø> (ø)
packages/rum/src/boot/rum.entry.ts 92.06% <ø> (ø)
packages/logs/src/domain/loggerSession.ts 95.65% <100.00%> (ø)
packages/rum/src/transport/batch.ts 68.29% <0.00%> (-12.20%) ⬇️
...ckages/core/src/domain/automaticErrorCollection.ts 98.41% <0.00%> (-1.59%) ⬇️

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 538bff0...4492912. Read the comment docs.

@@ -29,7 +29,7 @@ export function startLoggerSession(configuration: Configuration, areCookieAuthor
}
}

function computeTrackingType(configuration: Configuration): string {
function computeTrackingType(configuration: Configuration): LoggerTrackingType {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
function computeTrackingType(configuration: Configuration): LoggerTrackingType {
function computeTrackingType(configuration: Configuration) {

the compiler should figure it out, explicit typing does not seem necessary here

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