Page MenuHomePhabricator

Update guide to creating a custom schema for Metrics Platform
Closed, ResolvedPublic3 Estimated Story Points

Description

Update https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_a_Custom_Schema:

  • Update example (T369687)
  • Add details about choosing from an existing custom schema
  • Add link to validate step

See also:

Notes:

Event Timeline

apaskulin renamed this task from Update guide to creating a custom schema to Update guide to creating a custom schema for Metrics Platform.Aug 16 2024, 10:42 PM

This task is now ready for review. Please read Metrics Platform/How to/Create a Custom Schema, and ensure that the content is accurate and completene. Note the question under Create a schema. Feel free to make any corrections or additions directly to the doc. I based this on the example patches for the custom translation schema and this Slack thread.

I'm unsure about what to do with Metrics Platform/Analytics/Fragments. This page was moved from the Event Platform docs into the Metrics Platform docs in 2021, but it doesn't seem to be relevant for users creating custom schemas for Metrics Platform since it refers to fragments used by the Metrics Platform fragments instead of the Metrics Platform fragments we want custom schema creators to use (for example: jsonschema/fragment/analytics/common vs jsonschema/fragment/analytics/product_metrics/common). We could consider this content no longer useful and redirect the page to Metrics Platform/How to/Create a Custom Schema, but Metrics Platform/Analytics/Fragments is linked to from this Event Platform guide, so I suspect the content on Metrics Platform/Analytics/Fragments still has value for someone. Maybe users of Event Platform or Metrics Platform maintainers? If we do want to keep the page, can we remove the content about the WIP schemas?

apaskulin added a subscriber: phuedx.

@phuedx would you be able to review this one? (See request in the latest comment)

This task is now ready for review. Please read Metrics Platform/How to/Create a Custom Schema, and ensure that the content is accurate and completene (sic).

Done. It's great! Thanks!

Note the question under Create a schema.

Nice catch. I think that's an inconsistency that should be resolved but that's out of scope for this task. I'll create a Spike to cover organising these fragments consistently and mark it as Medium/High priority as it's something that we should sort out now before it gets difficult to change.

I'm unsure about what to do with Metrics Platform/Analytics/Fragments. This page was moved from the Event Platform docs into the Metrics Platform docs in 2021, but it doesn't seem to be relevant for users creating custom schemas for Metrics Platform since it refers to fragments used by the Metrics Platform fragments instead of the Metrics Platform fragments we want custom schema creators to use (for example: jsonschema/fragment/analytics/common vs jsonschema/fragment/analytics/product_metrics/common). We could consider this content no longer useful and redirect the page to Metrics Platform/How to/Create a Custom Schema, but Metrics Platform/Analytics/Fragments is linked to from this Event Platform guide, so I suspect the content on Metrics Platform/Analytics/Fragments still has value for someone. Maybe users of Event Platform or Metrics Platform maintainers? If we do want to keep the page, can we remove the content about the WIP schemas?

Looking at the history of that page, I think it was created back when Metrics Platform was actually the Better Use of Data project/program and predates a lot of the work that the Data Products team has done (although, interestingly, we've pretty much trodden the same path). Is there a recommended way to preserve the page but also mark it as not relevant?

Additionally, we might also want to look at some of those schema fragments and either remove them so as to reduce confusion or fold them into Metrics Platform 🤔

Being bold. My two notes above are out of scope for this task and should be made into follow-on tasks.

Thanks, @phuedx! That sounds great. Regarding switching the links from GitLab to Gerrit, I had originally linked to GitLab since the Gerrit repo is marked as archived.

Is there a recommended way to preserve the page but also mark it as not relevant?

I'll add an "archived" banner, which will preserve the content and mark it as irrelevant.

Thanks, @phuedx! That sounds great. Regarding switching the links from GitLab to Gerrit, I had originally linked to GitLab since the Gerrit repo is marked as archived.

My mistake! I had thought that the Gerrit repo was still authoritative. I'll switch them back…