Skip to content

Wire timeseries collection into RUM session and configuration - #2885

Merged
barboraplasovska merged 11 commits into
feature/timeseriesfrom
bplasovska/ts-pod/wire-timeseries-into-rum-session
Jun 17, 2026
Merged

Wire timeseries collection into RUM session and configuration#2885
barboraplasovska merged 11 commits into
feature/timeseriesfrom
bplasovska/ts-pod/wire-timeseries-into-rum-session

Conversation

@barboraplasovska

@barboraplasovska barboraplasovska commented May 5, 2026

Copy link
Copy Markdown
Contributor

What and why?

Integrates the collector into the RUM stack. Adds enableTimeseries: Bool = false to RUM.Configuration (all platforms including the watchOS/tvOS #else branch). Threads it through RUMScopeDependencies and creates/starts the collector in RUMSessionScope for the session lifetime. RUMFeature constructs the collector when the flag is enabled. The feature is opt-in; setting enableTimeseries: true is all that's needed to activate collection.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs - see our guidelines (internal)
  • Run make api-surface when adding new APIs

@barboraplasovska barboraplasovska changed the title RUM-13949 wire TimeseriesSessionCollector into RUM session and configuration Wire timeseries collection into RUM session and configuration May 5, 2026
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch from 0923e06 to c6e2b36 Compare May 13, 2026 14:04
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/wire-timeseries-into-rum-session branch 2 times, most recently from eb87479 to d8e6192 Compare May 20, 2026 09:20
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch from c6e2b36 to e347195 Compare May 20, 2026 09:20
@datadog-official

This comment has been minimized.

@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch from a72e13f to a91cf87 Compare May 22, 2026 14:26
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/wire-timeseries-into-rum-session branch 2 times, most recently from ddb5d9b to 4344511 Compare May 26, 2026 11:00
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch from a91cf87 to b0560d7 Compare May 26, 2026 11:00
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch from 9ee6b2c to 53314ef Compare June 3, 2026 08:49
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/wire-timeseries-into-rum-session branch from c9262a2 to 3f0604b Compare June 3, 2026 08:49
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/add-timeseries-session-collector branch 2 times, most recently from 4a70e4a to 26291ad Compare June 3, 2026 09:04
Base automatically changed from bplasovska/ts-pod/add-timeseries-session-collector to feature/timeseries June 11, 2026 07:54
@barboraplasovska
barboraplasovska force-pushed the bplasovska/ts-pod/wire-timeseries-into-rum-session branch from 3f0604b to 7815d4d Compare June 11, 2026 08:00
@barboraplasovska
barboraplasovska requested a review from a team as a code owner June 12, 2026 10:02

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dec497f6d9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread DatadogRUM/Sources/RUMMonitor/Scopes/RUMSessionScope.swift Outdated
Comment on lines +335 to +340
public var enableTimeseries: Bool

/// The number of samples collected before a timeseries batch is flushed.
///
/// Default: `30`.
public var timeseriesBatchSize: Int

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add Objective-C forwarding for the new configuration

This adds the public Swift-only knobs that activate and tune the feature, but objc_RUMConfiguration in DatadogRUM/Sources/RUM+objc.swift has no forwarding properties for enableTimeseries or timeseriesBatchSize. Objective-C apps can only configure RUM through DDRUMConfiguration, so they cannot enable this new opt-in feature or set its batch size even though the SDK supports Objective-C configuration. Mirror these fields on the ObjC wrapper as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we want to do this for now since we're still internally testing this feature.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That makes sense for this feature branch. Can we make sure ObjC forwarding is added before this is released if the Swift configuration remains public?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I added it to my task list for later when we GA

barboraplasovska and others added 2 commits June 12, 2026 12:49
…-footprint

Rename memory_max to memory_footprint in timeseries schema and regenerate models

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fcb08027c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread DatadogRUM/Sources/Feature/RUMFeature.swift Outdated
Comment thread DatadogRUM/Sources/RUMMonitor/Scopes/RUMSessionScope.swift Outdated
Comment thread DatadogRUM/Sources/Feature/RUMFeature.swift

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee5619557c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread DatadogRUM/Sources/Timeseries/TimeseriesSessionCollector.swift Outdated
Comment thread DatadogInternal/Sources/Models/RUM/RUMDataModels.swift

@gonzalezreal gonzalezreal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Could you add some tests for the new session behavior? I'd add one where a sampled-out session does not start the collector, and another one where a session created in the background pauses the collector right away.

@barboraplasovska
barboraplasovska merged commit cb4efc2 into feature/timeseries Jun 17, 2026
21 checks passed
@barboraplasovska
barboraplasovska deleted the bplasovska/ts-pod/wire-timeseries-into-rum-session branch June 17, 2026 12:42
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