Skip to content

RUM-11595: Extend Vital event to App Launch metrics#302

Merged
simaoseica-dd merged 1 commit into
masterfrom
simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics
Sep 11, 2025
Merged

RUM-11595: Extend Vital event to App Launch metrics#302
simaoseica-dd merged 1 commit into
masterfrom
simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics

Conversation

@simaoseica-dd

@simaoseica-dd simaoseica-dd commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

This PR proposes extending the Vital schema to other features.

Currently, the Vital schema includes some "Feature Operations" parameters. Since the "App Launch" initiative is leveraging vitals, it makes sense to design the schema with scalability in mind.

It introduces new sub schemas of the common vital-common-schema.json:

  • vital-duration-schema.json - Focused on duration properties. It is isolated because Feature Operations doesn't have duration.
  • vital-app-launch-schema.json - Focused on App launch metrics.
  • vital-feature-operations-schema.json - Focused on Feature Operations.

@simaoseica-dd
simaoseica-dd requested review from a team as code owners September 4, 2025 13:08
Comment thread lib/esm/generated/rum.d.ts Outdated
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch 4 times, most recently from e08ef0b to 8d29d80 Compare September 8, 2025 13:29

@BenoitZugmeyer BenoitZugmeyer 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.

Suggestion: add a vital-duration-schema.json, and define a required duration property there. I think the duration property isn't relevant for feature operation so you could remove it from the "common" schema and declare it where it makes sense

Suggestion: move the vital.type in their respective schemas and use oneOf between schemas. It could focus on the vital namespace, and either inherit a "common vital" schema for each type of vital or just do something like:

        "vital": {
          "description": "Vital properties",
          "allOf": [
            {
              "type": "object",
              "required": ["id", "type"],
              "properties": {
                "id": {
                  "type": "string",
                  "description": "UUID of the vital",
                  "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
                  "readOnly": true
                },
                "name": {
                  "type": "string",
                  "description": "Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $",
                  "readOnly": true
                },
                "description": {
                  "type": "string",
                  "description": "Description of the vital. It can be used as a secondary identifier (URL, React component name...)",
                  "readOnly": true
                }
              },
              "readOnly": true
            },
            {
              "oneOf": [
                {
                  "$ref": "vital-duration-schema.json"
                },
                {
                  "$ref": "vital-app-launch-schema.json"
                },
                {
                  "$ref": "vital-feature-operations-schema.json"
                }
              ]
            }
          ],
          "readOnly": true
        },

@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch 3 times, most recently from 2b1b75e to 16dc13b Compare September 9, 2025 12:34
@simaoseica-dd

Copy link
Copy Markdown
Contributor Author

@BenoitZugmeyer Thank you for the suggestion. The contexts are now truly split with the oneOf parameter.

Comment thread schemas/rum/vital-app-launch-schema.json Outdated
Comment thread schemas/rum/vital-app-launch-schema.json Outdated
Comment thread schemas/rum/vital-common-schema.json Outdated
Comment thread schemas/rum/vital-duration-schema.json Outdated
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch from 16dc13b to aa11114 Compare September 9, 2025 15:12
Comment thread lib/cjs/generated/rum.d.ts
Comment thread lib/cjs/generated/rum.d.ts
Comment thread schemas/rum/vital-app-launch-schema.json Outdated
Comment thread schemas/rum/vital-schema.json Outdated
mariedm
mariedm previously approved these changes Sep 9, 2025
Comment thread schemas/rum/vital-schema.json Outdated
Comment thread schemas/rum/vital-schema.json Outdated
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch 3 times, most recently from cc8e477 to 81a205a Compare September 9, 2025 17:32
Comment thread schemas/rum/vital-app-launch-schema.json Outdated
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch from 81a205a to b2dcc47 Compare September 11, 2025 09:43
@simaoseica-dd
simaoseica-dd force-pushed the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch from b2dcc47 to f97f9a2 Compare September 11, 2025 10:09

@aleksandr-gringauz aleksandr-gringauz 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.

LGTM!

@simaoseica-dd
simaoseica-dd merged commit 5a03886 into master Sep 11, 2025
14 checks passed
@simaoseica-dd
simaoseica-dd deleted the simaoseica/RUM-11595/extend-vital-event-to-app-launch-metrics branch September 11, 2025 13:04
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.

7 participants