Skip to content

[RUM/PROF] Tag profiles with operation's start vital's id#4617

Open
MandragoreVR wants to merge 1 commit into
mainfrom
teo.chaillou/RUM-16249-tag-profiles-with-operations-start-vital
Open

[RUM/PROF] Tag profiles with operation's start vital's id#4617
MandragoreVR wants to merge 1 commit into
mainfrom
teo.chaillou/RUM-16249-tag-profiles-with-operations-start-vital

Conversation

@MandragoreVR
Copy link
Copy Markdown
Collaborator

Motivation

As part of the Custom profiling initiative, custom profiles will be linked to Operation events. Since on the SDK side, Operation events are represented by a start vital and a stop vital, we decided (and this is already implemented as such in the iOS SDK) to tag the profiles overlapping with an operation with the start vital's id of that operation.

This PR implements this change.

Changes

  • Rework vitalHistory
    • Add vital type and operationKey to the data stored in the history
    • Nothing should have changed for duration vitals
    • For operation step vitals:
      • if we are receiving a start vital, we store it with an undefined duration to represent that it's still active
      • if we are receiving a stop vital, we look for the matching start vital. If it exists, we update the start vital with the duration, and close it in the history.
  • Added findAllEntries to valueHistory, that is the same as findAll but returns the entries instead of the values.
  • Since we now have the vital type in the vital history, I renamed the life cycle event to start duration vitals to something clearer.
  • Added some tests 🧪

Test instructions - Tested locally

When the operation is not over, here's what it looks like in the profile:

Screenshot 2026-05-13 at 14 58 14

And when it's over, same but with a duration:

Screenshot 2026-05-13 at 14 58 18

Checklist

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

@MandragoreVR MandragoreVR self-assigned this May 13, 2026
@MandragoreVR MandragoreVR changed the title [URM/PROF] Tag profiles with operation's start vital's id [RUM/PROF] Tag profiles with operation's start vital's id May 13, 2026
@MandragoreVR MandragoreVR force-pushed the teo.chaillou/RUM-16249-tag-profiles-with-operations-start-vital branch from 4b4c2e9 to c0b41ae Compare May 13, 2026 13:40
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 13, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 169.51 KiB 169.71 KiB +197 B +0.11%
Rum Profiler 5.97 KiB 6.59 KiB +629 B +10.28%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.82 KiB +124 B +0.22%
Rum Slim 127.85 KiB 127.94 KiB +92 B +0.07%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.003 0.0025 -16.67%
RUM - add action 0.0152 0.0133 -12.50%
RUM - add error 0.015 0.0121 -19.33%
RUM - add timing 0.0008 0.0005 -37.50%
RUM - start view 0.0143 0.011 -23.08%
RUM - start/stop session replay recording 0.0012 0.0008 -33.33%
Logs - log message 0.0229 0.0141 -38.43%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 45.03 KiB 38.37 KiB -6.66 KiB
RUM - add action 69.52 KiB 69.16 KiB -374 B
RUM - add timing 37.58 KiB 37.86 KiB +282 B
RUM - add error 69.17 KiB 68.87 KiB -310 B
RUM - start/stop session replay recording 41.67 KiB 41.08 KiB -598 B
RUM - start view 484.25 KiB 482.58 KiB -1.68 KiB
Logs - log message 55.29 KiB 54.10 KiB -1.19 KiB

🔗 RealWorld

@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented May 13, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 72.73%
Overall Coverage: 76.93% (-0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c0b41ae | Docs | Datadog PR Page | Give us feedback!

@MandragoreVR MandragoreVR marked this pull request as ready for review May 13, 2026 14:25
@MandragoreVR MandragoreVR requested a review from a team as a code owner May 13, 2026 14:25
@MandragoreVR MandragoreVR requested a review from thomasbertet May 13, 2026 14:25
@BeltranBulbarellaDD
Copy link
Copy Markdown
Contributor

@codex review?

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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