Skip to content

RUM-16325 timeseries: Update RUM JSON schemas and regenerate models#3555

Open
satween wants to merge 2 commits into
feature/timeseriesfrom
tvaleev/feature/timeseries-RUM-16325-schema-update
Open

RUM-16325 timeseries: Update RUM JSON schemas and regenerate models#3555
satween wants to merge 2 commits into
feature/timeseriesfrom
tvaleev/feature/timeseries-RUM-16325-schema-update

Conversation

@satween

@satween satween commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the RUM JSON schemas to the latest definitions and regenerates the corresponding Kotlin models and API surface. Also improves the json-schema code generator so OneOfPrimitiveOptionGenerator shares the knownTypes registry with FileGenerator, avoiding duplicate type resolution.

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)

@satween satween changed the title RUM-16325: Update RUM JSON schemas and regenerate models RUM-16325 timeseries: Update RUM JSON schemas and regenerate models Jun 18, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@satween satween force-pushed the tvaleev/feature/timeseries-RUM-16325-schema-update branch 3 times, most recently from 0419b26 to 5c8c3b4 Compare June 18, 2026 15:31
@satween satween marked this pull request as ready for review June 18, 2026 15:32
@satween satween requested review from a team as code owners June 18, 2026 15:32
@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.59%. Comparing base (4e287bb) to head (147653a).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/timeseries    #3555      +/-   ##
======================================================
- Coverage               72.62%   72.59%   -0.03%     
======================================================
  Files                     980      980              
  Lines                   36053    36053              
  Branches                 6033     6033              
======================================================
- Hits                    26181    26171      -10     
+ Misses                   8198     8197       -1     
- Partials                 1674     1685      +11     
Files with missing lines Coverage Δ
...nal/timeseries/serializer/MemoryEventSerializer.kt 87.72% <100.00%> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread features/dd-sdk-android-rum/src/main/json/rum/_stream-schema.json Outdated
@aleksandr-gringauz

Copy link
Copy Markdown
Contributor

OneOfPrimitiveOptionGenerator shares the knownTypes registry with FileGenerator, avoiding duplicate type resolution

Yes, we already have this knownTypes mechanism and it makes sense to add it to the OneOfPrimitiveTypeOptionGenerator.

No call to action, just a thought.

I have once concern about this knownTypes approach in general (not only in oneOf(primitives) case) - the name of the resulting class depends on the order of traversal. For example in ViewEvent we have 2 structurally identical fields: context and featureFlags. In ViewEvent they have a type Context. It is weird that featureFlags field has type Context that has nothing to do with it`. Also if we at some point introduce a third one the name can change for already existing ones breaking the backward compatibility.

The oneOf-primitive option generator kept its own private knownTypes set
that was never cleared between files, unlike every other generator which
shares (and clears per file) the FileGenerator set. As a result, when two
top-level models contained a structurally identical oneOf of primitives
(e.g. the Path = oneOf[string,integer] from the shared _graphql schema,
referenced by both ResourceEvent and ErrorEvent), the second model's
option subclasses extended the first model's nested sealed class
(ErrorEvent.String : ResourceEvent.Path()), which fails to compile.

Wire the shared knownTypes set into OneOfPrimitiveOptionGenerator so each
model resolves its own nested type. Add a dedicated regression test that
generates two models sharing an identical oneOf-primitive and asserts the
second does not leak a reference to the first's nested type.
@satween satween force-pushed the tvaleev/feature/timeseries-RUM-16325-schema-update branch from 5c8c3b4 to 41ecfd9 Compare June 19, 2026 12:27
Comment thread features/dd-sdk-android-rum/api/dd-sdk-android-rum.api Outdated
Regenerate RUM models and API surface from the updated JSON schemas: new
graphql/stream/trace/transition/vital-duration/view_update schemas and
updated action/error/resource/view definitions.
@satween satween force-pushed the tvaleev/feature/timeseries-RUM-16325-schema-update branch from 41ecfd9 to 147653a Compare June 19, 2026 13:17
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