Skip to content

Conversation

sbarrio
Copy link
Contributor

@sbarrio sbarrio commented Oct 13, 2025

What does this PR do?

This PR exposes the native RUM view attribute API that allows users to add and remove attributes that will be linked with the view currently active.

Motivation

We need to expose the new APIs added for V3 to be usable from React Native.

Additional Notes

The native Android SDK does not expose single attribute function to add/remove but the iOS one does. To keep the API clean and consistent at React Native level we have exposed the same 4 functions present on iOS, but when calling addAttribute/removeAttribute on Android the native layer will internally wrap the passed parameters and call addAttributes/removeAttributes with them, achieving the same results across the board.

Example of view attributes:

Screenshot 2025-10-09 at 17 41 35

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@sbarrio sbarrio self-assigned this Oct 13, 2025
@sbarrio sbarrio force-pushed the sbarrio/RUM-11723/add-view-attributes-api branch 2 times, most recently from 0a9ad05 to 389fc09 Compare October 14, 2025 08:39
@marco-saia-datadog marco-saia-datadog changed the title [RUM 11723][V3] Expose view attributes API [RUM-11723] [V3] Expose view attributes API Oct 14, 2025
@sbarrio sbarrio marked this pull request as ready for review October 14, 2025 09:54
@sbarrio sbarrio requested a review from a team as a code owner October 14, 2025 09:54
@sbarrio sbarrio force-pushed the sbarrio/RUM-11723/add-view-attributes-api branch from 389fc09 to be9794c Compare October 14, 2025 14:03
@sbarrio sbarrio force-pushed the sbarrio/RUM-11723/add-view-attributes-api branch from be9794c to 6e1367b Compare October 15, 2025 09:37
Copy link
Member

@marco-saia-datadog marco-saia-datadog left a comment

Choose a reason for hiding this comment

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

💯

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.

2 participants