-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: New setter for scope #1934
Conversation
* @param tags Tags context object to merge into current context. | ||
*/ | ||
setTag(key: string, value: string): Scope; | ||
setTags(tags?: { [key: string]: string }): this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's partially true. If you pass setTags({})
it will send old tags, as nothing will get merged. There should also be mention about unsetting.
packages/types/src/scope.ts
Outdated
|
||
/** | ||
* Updates user context information for future events. | ||
* @param user User context object to be set in the current context. | ||
* @param user User context object to be set in the current context. If null or undefined user will be unset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you pass ''
or 0
it will unset as well, so we should either explicitly check for no arguments at all or say If passed any falsy value, user will be unset.
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
* feat: New setter for scope * fix: Comments
No description provided.