Skip to content
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

✨ [RUM-6956] Add action name source #3115

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

cy-moi
Copy link
Contributor

@cy-moi cy-moi commented Nov 7, 2024

Motivation

We want to add a field to indicate from which source the action names are generated.

Changes

Add a name_source field in @_dd.action object

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.66%. Comparing base (84a1fa1) to head (673abd4).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
...core/src/domain/action/getActionNameFromElement.ts 97.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3115      +/-   ##
==========================================
+ Coverage   93.63%   93.66%   +0.02%     
==========================================
  Files         276      276              
  Lines        7620     7638      +18     
  Branches     1711     1716       +5     
==========================================
+ Hits         7135     7154      +19     
+ Misses        485      484       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

cit-pr-commenter bot commented Nov 7, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 161.12 KiB 161.58 KiB 473 B +0.29%
Logs 55.80 KiB 55.84 KiB 44 B +0.08%
Rum Slim 109.69 KiB 110.15 KiB 473 B +0.42%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.005 0.002 -0.004
addaction 0.147 0.054 -0.093
addtiming 0.002 0.001 -0.001
adderror 0.147 0.048 -0.099
startstopsessionreplayrecording 3.457 1.057 -2.400
startview 2.940 1.261 -1.679
logmessage 0.057 0.028 -0.029
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 8.45 KiB 9.37 KiB 937 B
addaction 40.48 KiB 41.57 KiB 1.09 KiB
addtiming 8.73 KiB 9.61 KiB 899 B
adderror 45.10 KiB 47.22 KiB 2.12 KiB
startstopsessionreplayrecording 7.43 KiB 7.86 KiB 436 B
startview 429.04 KiB 433.80 KiB 4.76 KiB
logmessage 42.12 KiB 42.01 KiB -117 B

🔗 RealWorld

@cy-moi
Copy link
Contributor Author

cy-moi commented Nov 7, 2024

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Nov 7, 2024

🚂 Branch Integration: starting soon, median merge time is 10m

Commit d99b471eff will soon be integrated into staging-45.

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Nov 7, 2024
…g-45

Integrated commit sha: d99b471

Co-authored-by: cy-moi <congyao119@gmail.com>
@dd-devflow
Copy link
Contributor

dd-devflow bot commented Nov 7, 2024

2024-11-07 10:28:30 UTC ℹ️ Branch Integration: This commit was successfully integrated

Commit d99b471eff has been merged into staging-45 in merge commit abd1756a7f.

Check out the triggered pipeline on Gitlab 🦊

@dd-devflow dd-devflow bot added the staging-45 label Nov 7, 2024
@dd-devflow
Copy link
Contributor

dd-devflow bot commented Nov 7, 2024

2024-11-07 10:28:31 UTC ℹ️

@cy-moi
Copy link
Contributor Author

cy-moi commented Nov 12, 2024

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Nov 12, 2024

Devflow running: /to-staging

View all feedbacks in Devflow UI.


2024-11-12 13:24:38 UTC ℹ️ Branch Integration: starting soon, median merge time is 13m

Commit d99b471eff will soon be integrated into staging-46.


2024-11-12 13:34:31 UTC ℹ️ Branch Integration: This commit was successfully integrated

Commit d99b471eff has been merged into staging-46 in merge commit 2f4e24dee4.

Check out the triggered pipeline on Gitlab 🦊

dd-mergequeue bot added a commit that referenced this pull request Nov 12, 2024
…g-46

Integrated commit sha: d99b471

Co-authored-by: cy-moi <congyao119@gmail.com>
@cy-moi cy-moi force-pushed the congyao/RUM-6956-add-action-name-source branch 2 times, most recently from d99b471 to 83c70f9 Compare November 13, 2024 13:07
@cy-moi cy-moi force-pushed the congyao/RUM-6956-add-action-name-source branch from 83c70f9 to ce77be2 Compare November 14, 2024 14:42
@cy-moi cy-moi marked this pull request as ready for review November 14, 2024 14:56
@cy-moi cy-moi requested a review from a team as a code owner November 14, 2024 14:56
@cy-moi cy-moi changed the title [RUM-6956] Add action name source ✨ [RUM-6956] Add action name source Nov 14, 2024
Comment on lines 182 to 185
const { name, nameSource } =
typeof actionName === 'string'
? { name: actionName, nameSource: ActionNameSource.STANDARD_ATTRIBUTE }
: actionName
Copy link
Member

Choose a reason for hiding this comment

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

💬 suggestion: ‏I think it would be simpler if strategies didn't return string. If you want to factorize attributes, you could have a function like:

function getActionNameFromStandardAttribute(element, attribute) {
  return {
    name: element.getAttribute(attribute),
    nameSource: ActionNameSource.STANDARD_ATTRIBUTE
  }
}

@cy-moi cy-moi force-pushed the congyao/RUM-6956-add-action-name-source branch from 5341de5 to 673abd4 Compare November 19, 2024 16:52
@cy-moi
Copy link
Contributor Author

cy-moi commented Nov 19, 2024

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Nov 19, 2024

Devflow running: /to-staging

View all feedbacks in Devflow UI.


2024-11-19 17:04:57 UTC ℹ️ Branch Integration: starting soon, median merge time is 8m44s

Commit 673abd4a64 will soon be integrated into staging-47.


2024-11-19 17:15:02 UTC ℹ️ Branch Integration: This commit was successfully integrated

Commit 673abd4a64 has been merged into staging-47 in merge commit 4b200a1e74.

Check out the triggered pipeline on Gitlab 🦊

dd-mergequeue bot added a commit that referenced this pull request Nov 19, 2024
…g-47

Integrated commit sha: 673abd4

Co-authored-by: zcy <congyao.zheng@datadoghq.com>
@cy-moi cy-moi merged commit ab74ac7 into main Nov 22, 2024
20 checks passed
@cy-moi cy-moi deleted the congyao/RUM-6956-add-action-name-source branch November 22, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants