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

fix(generic-metrics): Use floating point as sample weight #326

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

john-z-yang
Copy link
Member

Overview

Use floating point as weights instead of integers

@john-z-yang john-z-yang requested review from a team as code owners August 6, 2024 21:46
Copy link

github-actions bot commented Aug 6, 2024

versions in use:

The following repositories use one of the schemas you are editing. It is recommended to roll out schema changes in small PRs, meaning that if those used versions lag behind the latest, it is probably best to update those services before rolling out your change.

  • getsentry/relay: rust:sentry-kafka-schemas==0.1.86 (upgrade)
  • getsentry/snuba: pip:sentry-kafka-schemas==0.1.103 (upgrade)
  • getsentry/snuba: rust:sentry-kafka-schemas==0.1.103 (upgrade)
  • getsentry/sentry: pip:sentry-kafka-schemas==0.1.102 (upgrade)

latest version: 0.1.104

changes considered breaking

schemas/ingest-metrics.v1.schema.json

  • {"path": ".sample_weight", "change": {"RangeAdd": {"added": "minimum", "value": 1.0}}}
    
  • {"path": ".sample_weight", "change": {"RangeAdd": {"added": "maximum", "value": 1.8446744073709552e+19}}}
    

schemas/snuba-generic-metrics.v1.schema.json

  • {"path": ".sample_weight", "change": {"RangeAdd": {"added": "minimum", "value": 1.0}}}
    
  • {"path": ".sample_weight", "change": {"RangeAdd": {"added": "maximum", "value": 1.8446744073709552e+19}}}
    
benign changes

schemas/ingest-metrics.v1.schema.json

  • {"path": ".sample_weight", "change": {"TypeAdd": {"added": "number"}}}
    

schemas/snuba-generic-metrics.v1.schema.json

  • {"path": ".sample_weight", "change": {"TypeAdd": {"added": "number"}}}
    

⚠️ This PR contains breaking changes. Normally you should avoid that and make
your consumer backwards-compatible (meaning that updated consumers can still
accept old messages). There are a few exceptions:

  • If consumers already require these invariants in practice, and you're
    just adjusting the JSON schema to reality, ignore this warning.

  • If you know what you are doing, this change could potentially be rolled out
    to producers first, but that's not a flow we support.

@john-z-yang john-z-yang merged commit b11ccf7 into main Aug 6, 2024
16 of 17 checks passed
@john-z-yang john-z-yang deleted the metrics-sampling-float branch August 6, 2024 22:48
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