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

Adds missing schemas + data for metrics to snowplow stats ping #48476

Merged
merged 37 commits into from
Oct 15, 2024

Conversation

escherize
Copy link
Contributor

@escherize escherize commented Oct 8, 2024

resolves #48424

Most of the info for this section was in the legacy stats info. The new stuff is calculated in ->snowplow-metric-info.

The specified tags are included with "metrics".

Also, I refactored this to be more repl-friendly. We can call generate-instance-stats! from the repl to see its value.

This adds the jsonschema for "metrics" section, as well as "grouped_metrics".

@escherize escherize changed the title adds data + schema for metrics stats ping Adds metric snowplow data + schema for metrics Oct 8, 2024
@metabase-bot metabase-bot bot added the .Team/AdminWebapp Admin and Webapp team label Oct 8, 2024
@escherize escherize added the no-backport Do not backport this PR to any branch label Oct 8, 2024
@escherize escherize marked this pull request as ready for review October 8, 2024 21:43
@escherize escherize requested a review from camsaul as a code owner October 8, 2024 21:43
Copy link
Contributor

@Somtom Somtom left a comment

Choose a reason for hiding this comment

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

Really excited to see our progress on this migration. I left a few questions and one blocking nitpick that should be easy to resolve :)

- revert changes to 1-0-0
- add metrics section to new file: 1-0-1
- bump ::instance_stats to "1-0-1"
- add tags into 1-0-1
- make the code return tags (empty for now until we know what to tag things.)

- also fix test that broke from shuffling settings around
@escherize escherize requested a review from noahmoss October 10, 2024 02:02
@escherize
Copy link
Contributor Author

escherize commented Oct 11, 2024

I've tested this with snowplow mini, and it accepts the value 🎉.

Open question:

  • According to the snowplow docs, adding a required field (as we are in this PR) is a breaking change and should mean bumping to 2-0-0. However I also read that we generally shouldn't need to do that, so I could use some clarity there.

Answered:

  • Let's go with a 2-0-0 version.

@escherize escherize changed the title Adds metric snowplow data + schema for metrics Adds missing schemas + data for metrics to snowplow stats ping Oct 14, 2024
- add maxLength to some strings
- Add description to setting.items.tags
- add maxLength, and {min,max}imum to setting.items.value
Copy link
Contributor

@Somtom Somtom left a comment

Choose a reason for hiding this comment

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

Sorry for the back and forth but there were new infos based on the discussion with SnowcatCloud

@albertoperdomo
Copy link
Member

Should this not be backported to the 51 release branch so it makes it into 51? I see the no-backport label.

@escherize escherize added backport Automatically create PR on current release branch on merge and removed no-backport Do not backport this PR to any branch labels Oct 15, 2024
@escherize
Copy link
Contributor Author

Should this not be backported to the 51 release branch so it makes it into 51? I see the no-backport label.

Thanks, I've switched the labels so we will backport it.

- remove analytics_uuid string length == 36 check
- adds assertion to ensure required fields are set (and it passes)
- adds info for embedding settings
- adds length info to the schema to pass jsonschema linting
@escherize
Copy link
Contributor Author

Since we don't have telemetry data for embedding usage, we've expedited that piece and added the query_executions_by_source grouped metric in this PR.

@escherize escherize merged commit e5c181b into master Oct 15, 2024
131 checks passed
@escherize escherize deleted the add-metrics-to-snowplow-ping branch October 15, 2024 20:47
github-automation-metabase pushed a commit that referenced this pull request Oct 15, 2024
* adds data + schema for metrics stats ping

* remove comment

* annotate todos

* fill in the rest of the metrics values

- and add defaults

* fix some definitions + use a single timestamp

* shuffle stuff around to appease the namespace linter

- we aren't reaching into the api API, so the linter is more of a
  formality here.

* update docstring

* fix jsonschema, maybe

* review responses

- revert changes to 1-0-0
- add metrics section to new file: 1-0-1
- bump ::instance_stats to "1-0-1"
- add tags into 1-0-1
- make the code return tags (empty for now until we know what to tag things.)

- also fix test that broke from shuffling settings around

* remove a footgun

* add tags to metrics,

add grouped_metrics to jsonschema 1-0-1

format 1-0-1

* indent

* cljfmt

* version should match filename

* update instance stats 1-0-1 schema

* require `tags` in grouped_metric + snowcat comment

* fix formatting noise

* update schema to make it valid

* remove grouped_metrics from instance_stats schema

* cljfmt appeasement

* unbin cache_num_queries_cached value

- alphabetize metrics generation

* we can now guarantee metric values will be ints

* jsonschema for instance_uuid, settings, and grouped_metrics

* add analytics_uuid and make it required

* lint + alphabetize instance stats json schema

* update setting key type

- add maxLength to some strings

* lint jsonschema

- Add description to setting.items.tags
- add maxLength, and {min,max}imum to setting.items.value

* Bump instance stats to 2-0-0

- remove analytics_uuid string length == 36 check
- adds assertion to ensure required fields are set (and it passes)
- adds info for embedding settings

* adds a grouped-metric to stats ping

- adds length info to the schema to pass jsonschema linting

* cljfmt
github-automation-metabase added a commit that referenced this pull request Oct 15, 2024
… (#48760)

* adds data + schema for metrics stats ping

* remove comment

* annotate todos

* fill in the rest of the metrics values

- and add defaults

* fix some definitions + use a single timestamp

* shuffle stuff around to appease the namespace linter

- we aren't reaching into the api API, so the linter is more of a
  formality here.

* update docstring

* fix jsonschema, maybe

* review responses

- revert changes to 1-0-0
- add metrics section to new file: 1-0-1
- bump ::instance_stats to "1-0-1"
- add tags into 1-0-1
- make the code return tags (empty for now until we know what to tag things.)

- also fix test that broke from shuffling settings around

* remove a footgun

* add tags to metrics,

add grouped_metrics to jsonschema 1-0-1

format 1-0-1

* indent

* cljfmt

* version should match filename

* update instance stats 1-0-1 schema

* require `tags` in grouped_metric + snowcat comment

* fix formatting noise

* update schema to make it valid

* remove grouped_metrics from instance_stats schema

* cljfmt appeasement

* unbin cache_num_queries_cached value

- alphabetize metrics generation

* we can now guarantee metric values will be ints

* jsonschema for instance_uuid, settings, and grouped_metrics

* add analytics_uuid and make it required

* lint + alphabetize instance stats json schema

* update setting key type

- add maxLength to some strings

* lint jsonschema

- Add description to setting.items.tags
- add maxLength, and {min,max}imum to setting.items.value

* Bump instance stats to 2-0-0

- remove analytics_uuid string length == 36 check
- adds assertion to ensure required fields are set (and it passes)
- adds info for embedding settings

* adds a grouped-metric to stats ping

- adds length info to the schema to pass jsonschema linting

* cljfmt

Co-authored-by: bryan <bryan.maass@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/AdminWebapp Admin and Webapp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Metrics to snowplow stat ping
6 participants