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-1409] Provide setUser and related functions for logs SDK #1801

Merged
merged 7 commits into from
Nov 8, 2022

Conversation

yannickadam
Copy link
Contributor

Motivation

Issue raised here: #1675
The RUM SDK provides convenient user-related functions. This change brings the same functions to the LOGS SDK.

Changes

Added the following functions to the logs public API:
setUser,
setUserProperty,
getUser,
removeUserProperty,
clearUser

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@yannickadam yannickadam requested a review from a team as a code owner October 27, 2022 21:08
Copy link
Contributor

@liywjl liywjl left a comment

Choose a reason for hiding this comment

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

Nice one!

packages/core/src/domain/user/user.types.ts Outdated Show resolved Hide resolved
packages/logs/src/domain/assembly.spec.ts Show resolved Hide resolved
packages/logs/src/domain/assembly.ts Outdated Show resolved Hide resolved
@yannickadam yannickadam requested a review from a team as a code owner November 2, 2022 08:12
Copy link
Contributor

@liywjl liywjl left a comment

Choose a reason for hiding this comment

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

LGTM

@yannickadam yannickadam force-pushed the yannick/rumf-1409-setuser-for-logs branch from 4b02f4c to 959d08c Compare November 2, 2022 16:25
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2022

Codecov Report

Merging #1801 (7c66c5b) into main (ee460d6) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1801      +/-   ##
==========================================
+ Coverage   93.15%   93.25%   +0.09%     
==========================================
  Files         130      131       +1     
  Lines        5057     5067      +10     
  Branches     1131     1132       +1     
==========================================
+ Hits         4711     4725      +14     
+ Misses        346      342       -4     
Impacted Files Coverage Δ
packages/rum-core/src/domain/assembly.ts 100.00% <ø> (ø)
packages/core/src/domain/user/user.ts 100.00% <100.00%> (ø)
packages/logs/src/boot/logsPublicApi.ts 100.00% <100.00%> (ø)
packages/logs/src/domain/assembly.ts 100.00% <100.00%> (ø)
packages/rum-core/src/boot/rumPublicApi.ts 94.18% <100.00%> (-0.61%) ⬇️
...rum-core/src/domain/contexts/foregroundContexts.ts 96.92% <0.00%> (+6.15%) ⬆️

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

@buraizu
Copy link
Contributor

buraizu commented Nov 3, 2022

Thanks, created DOCS-4334 to track as an editorial review

Copy link

@urseberry urseberry left a comment

Choose a reason for hiding this comment

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

I added a wording suggestion that changes a sentence to active voice. Feel free to ignore it if it changes the meaning of the note.

packages/logs/README.md Outdated Show resolved Hide resolved
@yannickadam yannickadam force-pushed the yannick/rumf-1409-setuser-for-logs branch from f19d63f to 7c66c5b Compare November 7, 2022 10:59
@yannickadam yannickadam merged commit 0ab07cb into main Nov 8, 2022
@yannickadam yannickadam deleted the yannick/rumf-1409-setuser-for-logs branch November 8, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants