Skip to content

RUM-15482: Rename RUM Operations API#2802

Merged
simaoseica-dd merged 3 commits into
developfrom
simaoseica/RUM-14250/operations-api
Apr 13, 2026
Merged

RUM-15482: Rename RUM Operations API#2802
simaoseica-dd merged 3 commits into
developfrom
simaoseica/RUM-14250/operations-api

Conversation

@simaoseica-dd

@simaoseica-dd simaoseica-dd commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

What and why?

This PR renames the RUM Operations API for consistency and clarity, and introduces a new generic parameter options: OperationOptions? to make the API extensible and avoid coupling the public interface to a single feature (profiling).

Before:

func startFeatureOperation(name: String,operationKey: String? = nil,attributes: [AttributeKey: AttributeValue] = [:])
func succeedFeatureOperation(name: String,operationKey: String? = nil,attributes: [AttributeKey: AttributeValue] = [:])
func failFeatureOperation(name: String,operationKey: String? = nil,reason: RUMFeatureOperationFailureReason,attributes: [AttributeKey: AttributeValue] = [:])

After:

func startOperation(name: String,operationKey: String?,attributes: [AttributeKey: AttributeValue],options: OperationOptions?)
func succeedOperation(name: String,operationKey: String?,attributes: [AttributeKey: AttributeValue])
func failOperation(name: String,operationKey: String?,reason: RUMFeatureOperationFailureReason,attributes: [AttributeKey: AttributeValue])

How?

  • Introduces OperationOptions protocol in DatadogInternal as the extensible options type for operations.
  • Introduces ProfilingOptions (conforming to OperationOptions) to carry the profiling sample rate.
  • Updates RUMMonitorProtocol, its default implementations, Monitor, and NOPMonitor accordingly.
  • Updates API surface files to reference the new API naming

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

@simaoseica-dd
simaoseica-dd requested review from a team as code owners March 27, 2026 19:44
@Valpertui

Copy link
Copy Markdown
Member

Can we put deprecate+rename params on the methods to ease the transition for customers?
We can just make the deprecated method just point to the new method.

See this blog post
example

@available(*, deprecated, renamed: "newMethod")
func oldMethod() {

}

func newMethod() {
    
}

It makes Xcode auto provide "rename" callouts

This also works with more complex methods with multiple parameters

@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-14250/improve-app-launch branch from f9f45d8 to cbb0cb4 Compare April 7, 2026 09:23
Base automatically changed from simaoseica/RUM-14250/improve-app-launch to feature/profiling April 7, 2026 12:31
@simaoseica-dd
simaoseica-dd changed the base branch from feature/profiling to develop April 8, 2026 13:28
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-14250/operations-api branch from 874abe6 to f3bdabe Compare April 8, 2026 13:29
@simaoseica-dd simaoseica-dd changed the title RUM-14250: Rename RUM Operations API RUM-15482: Rename RUM Operations API Apr 8, 2026
maxep
maxep previously approved these changes Apr 8, 2026

@maxep maxep left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! I left a question, but it is good to go as is.

Comment thread DatadogRUM/Sources/RUMMonitorProtocol.swift
cdn34dd
cdn34dd previously approved these changes Apr 8, 2026
@simaoseica-dd
simaoseica-dd dismissed stale reviews from cdn34dd and maxep via 26bf9b6 April 8, 2026 19:05
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-14250/operations-api branch from 904b7c1 to 26bf9b6 Compare April 8, 2026 19:05
@simaoseica-dd
simaoseica-dd requested review from cdn34dd and maxep April 9, 2026 11:54
maxep
maxep previously approved these changes Apr 9, 2026
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-14250/operations-api branch from 26bf9b6 to a1b1395 Compare April 10, 2026 16:21
@simaoseica-dd
simaoseica-dd requested a review from maxep April 13, 2026 08:51
@simaoseica-dd
simaoseica-dd merged commit 65def1c into develop Apr 13, 2026
22 checks passed
@simaoseica-dd
simaoseica-dd deleted the simaoseica/RUM-14250/operations-api branch April 13, 2026 08:52
@maxep maxep mentioned this pull request Apr 16, 2026
5 tasks
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.

4 participants