Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-1000 Use View.customTimings from actual schema instead of RUMEvent #406

Merged
merged 5 commits into from
Feb 9, 2021

Conversation

acgh
Copy link
Contributor

@acgh acgh commented Feb 9, 2021

What and why?

The JSON Schema for RUM Event models "custom timings" of a view using the additionalProperties keyword of the JSON Schema spec.

This keyword was not supported until #399, and prior to that the SDK had to use a few workarounds to store the custom timings in memory until the eventual encoding into JSON.

In this PR we leverage #399 to remove the workarounds and directly encode customTimings from View models.

How?

In this PR we:

  • Remove the filter on customTimings423f095
  • Update the data models by running the codegen tool 8b70eab
  • Remove the few workarounds relying on RUMEvent and impact JSONDecoder d829781

Review checklist

  • Existing unit and integration tests pass
  • Run the Example app with the RUM Manual Instrumentation scenario and check the payload in the web UI. Like so:

Screenshot 2021-02-09 at 11 36 25

Screenshot 2021-02-09 at 11 36 47

Screenshot 2021-02-09 at 11 37 13

Screenshot 2021-02-09 at 11 37 40

  • Make sure each commit and the PR mention the Issue number or JIRA reference

@acgh acgh requested a review from a team as a code owner February 9, 2021 13:04
Copy link
Member

@ncreated ncreated left a comment

Choose a reason for hiding this comment

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

Looks 💯👌

Comment on lines +36 to +42
protocol AnyMockable {
static func mockAny() -> Self
}

protocol RandomMockable {
static func mockRandom() -> Self
}
Copy link
Member

Choose a reason for hiding this comment

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

Nice 💪! I feel that we could even push this further with some level of code generation in the future 💡.

@acgh acgh self-assigned this Feb 9, 2021
@acgh acgh merged commit 3389fe5 into master Feb 9, 2021
@acgh acgh deleted the acgh/rumm-1000-use-view-custom-timings-from-schema branch February 9, 2021 16:59
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