Skip to content

Conversation

@thomasbertet
Copy link
Collaborator

@thomasbertet thomasbertet commented Sep 17, 2025

Motivation

We want to allow filtering by view name in the Profiling explorer (ie. @view.name:/my-view).
In order to make the view name query-able, we need to pass it as the event's attributes (just as we do for view ids)

Screenshot 2025-09-17 at 14 39 06

Changes

  • new view.name attribute in the Profile's event.json sent to intake.

Test instructions

  • Browse a website with this version of the SDK, with the RUM Profiler active.
  • After a while (tipically a minute of navigation), assert you can see a call the the profile intake.
  • Assert you can see the event.json sent includes the new view.name attribute.
  • Go over the Profiling's Explorer page
  • Filter using the search bar to @view.name:<the-view-you-were-browsing> and you should see a Flame Graph.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Sep 17, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 92.50% (+0.15%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b98b08e | Docs | Was this helpful? Give us feedback!

@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Sep 17, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum N/A 160.90 KiB 160.90 KiB N/A%
Rum Recorder N/A 19.53 KiB 19.53 KiB N/A%
Rum Profiler N/A 5.32 KiB 5.32 KiB N/A%
Logs N/A 55.82 KiB 55.82 KiB N/A%
Flagging N/A 931 B 931 B N/A%
Rum Slim N/A 118.55 KiB 118.55 KiB N/A%
Worker N/A 23.60 KiB 23.60 KiB N/A%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.007 0.009 0.003
addaction 0.019 0.027 0.008
addtiming 0.004 0.006 0.002
adderror 0.018 0.028 0.009
startstopsessionreplayrecording 0.001 0.001 0.000
startview 0.006 0.006 0.001
logmessage 0.021 0.021 0.000
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext N/A 25.11 KiB N/A
addaction N/A 44.92 KiB N/A
addtiming N/A 25.86 KiB N/A
adderror N/A 49.09 KiB N/A
startstopsessionreplayrecording N/A 24.94 KiB N/A
startview N/A 426.96 KiB N/A
logmessage N/A 42.70 KiB N/A

🔗 RealWorld

@thomasbertet thomasbertet marked this pull request as ready for review September 17, 2025 13:51
@thomasbertet thomasbertet requested a review from a team as a code owner September 17, 2025 13:51
id: sessionId,
}
}
const viewIds = Array.from(new Set(profilerTrace.views.map((viewEntry) => viewEntry.viewId)))
Copy link
Member

Choose a reason for hiding this comment

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

question: view ids were de-duplicated. It's not needed anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe it's not needed yes. I don't see how we could generate duplicated ids 🤔

@thomasbertet thomasbertet merged commit e22fd85 into main Sep 17, 2025
21 checks passed
@thomasbertet thomasbertet deleted the thomas.bertet/add-view-names-to-profile-event branch September 17, 2025 14:57
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.

3 participants