Skip to content

[web-6385] custom rum action for cdocs #28990

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgdeutsch
Copy link
Collaborator

@bgdeutsch bgdeutsch commented Apr 25, 2025

What does this PR do? What is the motivation?

adds a custom rum action for cdocs
thought it would be interesting see users interacting once usage ramps up

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:
Merge queue is enabled in this repo. Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass in CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

To have your PR automatically merged after it receives the required reviews, add the following PR comment:

/merge

Additional notes

https://docs-staging.datadoghq.com/brian.deutsch/web-6385-rum-action-cdocs/real_user_monitoring/guide/proxy-mobile-rum-data

click the filter buttons. there should be no JS errors on this page (or other pages).

custom rum action appears in DD i.e. : https://dd-corpsite.datadoghq.com/rum/sessions?query=%40type%3Aaction%20%40application.id%3A3493b4e7-ab12-4852-8836-ba96af7bc745%20%40action.type%3Acustom&agg_m=count&agg_m_source=base&agg_t=count&cols=&event=AwAAAZZuorS0AwA1ygAAABhBWlp1b3J1bEFBQk1iSW10YTBnR0Z3QUIAAAAkMDE5NjZlYTItYzQ5ZC00YjQxLWFlOGQtZWFmNTU3NmRiNTM5AAAACw&fromUser=false&viz=stream&from_ts=1745612586693&to_ts=1745612886693&live=true

Signed-off-by: Brian Deutsch <brian.deutsch@datadoghq.com>
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Apr 25, 2025
@bgdeutsch bgdeutsch marked this pull request as ready for review April 25, 2025 20:29
@bgdeutsch bgdeutsch requested a review from a team as a code owner April 25, 2025 20:29
document.addEventListener('DOMContentLoaded', () => {
if (window.clientFiltersManager) {
handleCdocsCustomRumAction();
clientFiltersManager.registerHook('afterRerender', handleCdocsCustomRumAction);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
clientFiltersManager.registerHook('afterRerender', handleCdocsCustomRumAction);
clientFiltersManager.registerHook('afterReveal', handleCdocsCustomRumAction);

You would just need this if you don't want to miss the first filter adjustment (since a rerender won't happen until after the first one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants