[RUM-11519] Add RUM Action Tracking configuration options to the Babel Plugin#968
Merged
cdn34dd merged 6 commits intoSep 4, 2025
Conversation
sbarrio
reviewed
Sep 2, 2025
sbarrio
reviewed
Sep 2, 2025
sbarrio
reviewed
Sep 2, 2025
Member
There was a problem hiding this comment.
Overall, this looks good, great work 🚀
There are just a few points I'd like to discuss (mainly this one) before approval, and I have left some minor suggestions.
7d3959c to
9084e77
Compare
marco-saia-datadog
previously approved these changes
Sep 3, 2025
5b77271 to
1f81cd7
Compare
rtrieu
previously approved these changes
Sep 3, 2025
rtrieu
left a comment
Contributor
There was a problem hiding this comment.
some minor feedback, mostly suggesting markdown vs html
The goal is to prevent caching issue in metro bundler, that would occur when running both android and iOS apps on the same metro bundler.
…on Tracking config options
…traction - Allow customization through Babel options to extend RUM Action Tracking to custom/third-party components - Allow for retrieval of components' content through children or props
1f81cd7 to
9ab4982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds support for configuration options in the babel plugin targeting RUM Action Tracking.
Configuration options:
• actionNameAttribute
A custom prop you can add to components in your JSX. If present, the plugin uses its value as the action name.
Example:
• useContent
Whether the plugin should try to extract the text content of a component as its action name.
Can be set globally and overridden at the component level.
• useNamePrefix
Whether tracked action names should be prefixed with the component’s name.
Example: TextInput("Address") → "Address"
Can be set globally and overridden per component.
• contentProp
A property the plugin should read to derive the action name.
By default, the plugin already checks:
• The component’s children
• Common props like title or label
With contentProp, you can explicitly tell the plugin which property holds the content.
Example: contentProp: "subTitle"
Example configurations:
Motivation
What inspired you to submit this pull request?
Users' setups can get very complex and sometimes the base functionality we offer through the babel plugin is not enough. As such we want to give users more control over what gets instrumented and how.
In practice this will allows to support component from third-party libraries or even custom components from a user's codebase.
Review checklist (to be filled by reviewers)