Skip to content

Set operation timestamp at event creation#164

Merged
kikoveiga merged 1 commit into
developfrom
kikoveiga/improve-operations-timestamp
May 27, 2026
Merged

Set operation timestamp at event creation#164
kikoveiga merged 1 commit into
developfrom
kikoveiga/improve-operations-timestamp

Conversation

@kikoveiga

@kikoveiga kikoveiga commented May 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga
kikoveiga marked this pull request as ready for review May 25, 2026 15:08
@kikoveiga
kikoveiga requested a review from a team as a code owner May 25, 2026 15:08
@kikoveiga
kikoveiga requested a review from Copilot May 25, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts RUM “vital operation” timestamping so operation start/end times are captured at event creation (call site) rather than at processing time, preventing cross-thread rendezvous delays from skewing measurements (per #159).

Changes:

  • Added timestamp to raw operation events (startFeatureOperation / stopFeatureOperation) at creation time.
  • Updated RumSessionScope.sendVitalEvent to prefer event.timestamp (fallback to getTimestamp() when absent).
  • Extended unit tests to validate timestamp propagation and an explicit-timestamp scenario.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/source/tests/rum/Test__RumSessionScope.bs Adds a unit test ensuring vitalEvent.date honors an explicit event timestamp.
test/source/tests/rum/Test__RumAgent.bs Strengthens tests to assert operation events include a call-site timestamp.
library/source/rum/rumRawEvents.bs Sets operation timestamps at raw-event creation time and imports timeUtils.
library/components/rum/RumSessionScope.bs Uses event-provided timestamp when emitting vital events to avoid processing-time skew.
dist/source/rum/rumRawEvents.brs Built output: operation raw events now include timestamp: getTimestamp().
dist/components/rum/RumSessionScope.brs Built output: prefers event.timestamp when computing date.
dist/components/rum/RumAgent.xml Ensures timeUtils.brs is included for runtime access to getTimestamp().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kikoveiga kikoveiga self-assigned this May 26, 2026
@kikoveiga
kikoveiga merged commit 3c6f3c2 into develop May 27, 2026
9 checks passed
@kikoveiga
kikoveiga deleted the kikoveiga/improve-operations-timestamp branch May 27, 2026 08:47
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