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: Make gauges a possible value in Snuba RH topic #188

Closed
wants to merge 3 commits into from

Conversation

ayirr7
Copy link
Member

@ayirr7 ayirr7 commented Nov 2, 2023

The schema for Snuba release health/metrics topic is not flexible enough currently to support the shared upstream ingest metrics topic schema. This adds gauges as a possible value to the release health topic, though it is not actually supported in release health.

The upstream schema (ingest-metrics) is shared between BOTH generic metrics and release health, and as a result, we are noticing typing problems in Sentry codebase which we are not able to simply ignore.

@ayirr7 ayirr7 requested a review from a team as a code owner November 2, 2023 18:07
Copy link

github-actions bot commented Nov 2, 2023

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/sentry: pip:sentry-kafka-schemas==0.1.32 (upgrade)
  • getsentry/snuba: pip:sentry-kafka-schemas==0.1.32 (upgrade)
  • getsentry/snuba: rust:sentry-kafka-schemas==0.1.32 (upgrade)

latest version: 0.1.33

changes considered breaking

schemas/snuba-metrics.v1.schema.json

  • {"path": ".value.<anyOf:2>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "count"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "last"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "max"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "min"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "sum"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"RequiredAdd": {"property": "count"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"RequiredAdd": {"property": "last"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"RequiredAdd": {"property": "max"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"RequiredAdd": {"property": "min"}}}
    
  • {"path": ".value.<anyOf:2>", "change": {"RequiredAdd": {"property": "sum"}}}
    
benign changes

schemas/snuba-metrics.v1.schema.json

  • {"path": ".value", "change": {"TypeAdd": {"added": "object"}}}
    

⚠️ 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.

@ayirr7 ayirr7 changed the title fix: Make gauges a possible value in RH fix: Make gauges a possible value in Snuba RH topic Nov 2, 2023
@ayirr7 ayirr7 requested a review from lynnagara November 2, 2023 18:40
@lynnagara
Copy link
Member

@ayirr7 Should I close this PR? Or are you still intending to merge it?

@ayirr7
Copy link
Member Author

ayirr7 commented Mar 1, 2024

@lynnagara, we can close this PR. I think the original question would require a bit more thought.

@ayirr7 ayirr7 closed this Mar 1, 2024
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.

3 participants