Skip to content

feat(logs): Add common names for the context, user, account and logger calls - #5381

Draft
mormubis wants to merge 1 commit into
adlrb/RUM-20325-common-names-optionsfrom
adlrb/RUM-20325-common-names-logs
Draft

mormubis wants to merge 1 commit into
adlrb/RUM-20325-common-names-optionsfrom
adlrb/RUM-20325-common-names-logs

Conversation

@mormubis

@mormubis mormubis commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

Fifth PR of the common names stack (#5377). It does for datadogLogs what #5377 and #5378 do for datadogRum.

Refs: RUM-20325, RUM-19580

Changes

datadogLogs gets the same 15 context, user and account names as datadogRum. The matrix only lists two of them, but otherwise we'd have datadogRum.setUserInfo next to datadogLogs.setUser.

Logger gets setAttributes, getAttributes, addAttribute, removeAttribute and clearAttributes. The old *Context* methods call the new ones. The messageContext parameter of the log methods is now attributes.

createLogger accepts initialAttributes, and the context option is deprecated.

Test instructions

Run yarn test:unit packages/browser-logs. The context and logs e2e scenarios use the new names.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

This branch has not been deployed

No deployments
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.

1 participant