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

[RUMF-783] Add view.custom_timings #25

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions samples/view.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"dom_content_loaded": 951715000,
"dom_interactive": 906695000,
"load_event": 2154370000,
"custom_timings": {
"user-timing": 2154570000
},
"action": {
"count": 0
},
Expand Down
10 changes: 10 additions & 0 deletions schemas/view-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@
"minimum": 0,
"readOnly": true
},
"custom_timings": {
"type": "object",
"description": "User custom timings of the view",
"additionalProperties": {
"type": "integer",
"minimum": 0,
"readOnly": true
},
Comment on lines +105 to +109
Copy link
Member

Choose a reason for hiding this comment

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

I think we've been already discussing this and we decided to not go with additionalProperties the same way as we don't use them to model custom context attributes, no? // cc @xgouchet @bcaudan

Anyway, I think we can deal with this both in Kotlin and Swift by expressing it as [String: UInt64] dictionaries.

Copy link
Member

Choose a reason for hiding this comment

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

Well we didn't add this because I didn't know we could constrain the additional properties (i only saw example of "additionalProperties": true).
My guess is that this should actually fix what we wanted and we can make the changes necessary on our side to handle it.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, agree - we can incorporate it into our code generators 👍.

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC previous discussions was more about having additionalProperties: false at every level to constrain our model rather than having additionalProperties: true for some specific parent (like context).

"readOnly": true
},
"is_active": {
"type": "boolean",
"description": "Whether the View corresponding to this event is considered active",
Expand Down