Skip to content

feat: Remove unused fields from subscription results #88

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

Merged
merged 5 commits into from
Apr 4, 2023

Conversation

lynnagara
Copy link
Member

Whilst creating this schema and integrating it into Snuba and Sentry we discovered there were some fields ("profile" and "trace_output") being published that were essentially internal Snuba data and are completely unused by Sentry in the results consumer. Let's remove them from the schema and example.

Since "additionalProperties" is true, this is a backward compatible change and old messages still in the pipeline will not fail validation.

Whilst creating this schema and integrating it into Snuba and Sentry
we discovered there were some fields ("profile" and "trace_output") being
published that were essentially internal Snuba data and are completely
unused by Sentry. Let's remove them from the schema and example.

Since "additionalProperties" is true, this is a backward compatible change
and old messages still in the pipeline will not fail validation.
@lynnagara lynnagara requested a review from ceorourke April 1, 2023 00:11
@lynnagara lynnagara requested a review from a team as a code owner April 1, 2023 00:11
@lynnagara lynnagara requested a review from a team April 1, 2023 00:11
@github-actions
Copy link

github-actions bot commented Apr 1, 2023

This pull request contains the following schema changes bogusvalue ()

# schemas/subscription-results.v1.schema.json

!!! WARNING: changes considered breaking:

## Removed the property .payload.result, so it is no longer accepted. Maybe use additionalProperties?
{"path": ".payload.result", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "profile"}}}

## Removed the property .payload.result, so it is no longer accepted. Maybe use additionalProperties?
{"path": ".payload.result", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "trace_output"}}}

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

I'm not particularly against removing this, but I think extra data was included so we could log if needed for debugging. If this isn't that useful for debugging I'm happy to remove though.

@lynnagara
Copy link
Member Author

lynnagara commented Apr 1, 2023

I'm not particularly against removing this, but I think extra data was included so we could log if needed for debugging. If this isn't that useful for debugging I'm happy to remove though.

Thanks for the context, I did not realise it was intentional. Looking at getsentry/sentry#46647 I don't think it would be logged anywhere (at least after this PR) since it's immediately transformed to a SubscriptionUpdate without those keys... do you think we want to add 'em back there too then?

@lynnagara
Copy link
Member Author

Happy to close this and leave them in if you think that's best, i just assumed it was internal snuba stuff

@wedamija
Copy link
Member

wedamija commented Apr 3, 2023

Happy to close this and leave them in if you think that's best, i just assumed it was internal snuba stuff

I don't feel too strongly either way, I'm not even sure if this info is useful for debugging. I'll leave it up to you, we can always add it back in later if we need it for some reason

@lynnagara
Copy link
Member Author

Since neither of us feel too strongly, I think we should merge this. Reasons:

  • i don't actually see where this is being logged in sentry
  • i think it's better to simplify if these fields don't really serve a purpose

@lynnagara lynnagara disabled auto-merge April 4, 2023 00:43
@lynnagara lynnagara merged commit 68f61bf into main Apr 4, 2023
@lynnagara lynnagara deleted the remove-profile-trace-output branch April 4, 2023 00:58
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