Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Feb 27, 2023

It seems that we're tagging events with information about organizations even when it's impossible to have any org info.

We have events tagged with the following info even when it is not possible:

  • org slug
  • org id
  • org context

The only code that sets these three pieces of information is within the sdk.py module (see #45134 for details).

This issues causes finding errors that are for the wrong organization when using organization.slug, thus, wasting time for engineers and customer support.

It is unclear if the root cause comes from a bug in the SDK or the way we tag things in our code base.

This change only clears the invalid tag values to reduce the impact of this issue rather than fixing the root issue.

A sample event can be seen here (private link)

Here's a query showing some transactions that should not have org values set. There may be more transaction since I'm narrowing the query down to just error.value:"Integration matching query does not exist."

Improves WOR-2464

It seems that we're tagging events with information about organizations even when it's impossible to have any org info.

We have events tagged with the following info even when it is not possible:

- org slug
- org id
- org context

The only code that sets these three pieces of information is within the sdk.py module (see #45134 for details).

This issues causes finding errors that are for the wrong organization when using `organization.slug`, thus, wasting time for engineers and customer support.

It is unclear if the root cause comes from a bug in the SDK or the way we tag things in our code base.

This change only clears the invalid tag values to reduce the impact of this issue rather than fixing the root issue.

A sample event can be seen [here](https://sentry.sentry.io/discover/sentry:99c8b9c9d2c241cc90e52c307faa45eb/?field=organization.slug&field=user.display&field=timestamp&name=Integration.DoesNotExist%3A+Integration+matching+query+does+not+exist.&project=1&query=issue%3ASENTRY-W7T&sort=-timestamp&statsPeriod=90d&yAxis=count%28%29) (private link)

Here's a [query](https://sentry.sentry.io/discover/results/?field=transaction&field=count_unique%28organization.slug%29&field=count%28%29&name=Integration.DoesNotExist%3A+Integration+matching+query+does+not+exist.&project=1&query=%21organization.slug%3A%22%22+error.value%3A%22Integration+matching+query+does+not+exist.%22&sort=-transaction&statsPeriod=14d&yAxis=count%28%29) showing some transactions that should not have org values set. There may be more transaction since I'm narrowing the query down to just `error.value:"Integration matching query does not exist."`

Improves [WOR-2464](https://getsentry.atlassian.net/browse/WOR-2464)
@armenzg armenzg self-assigned this Feb 27, 2023
@armenzg armenzg changed the title fix(github_webhooks): Reset org tags and context fix(github_webhooks): Reset org tags and context before available Feb 27, 2023
@armenzg armenzg marked this pull request as ready for review February 27, 2023 18:36
@armenzg armenzg requested a review from a team February 27, 2023 18:36
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 27, 2023
@armenzg armenzg requested a review from a team February 27, 2023 18:55
@armenzg armenzg merged commit e84a52b into master Feb 28, 2023
@armenzg armenzg deleted the armenzg/github/disable-tagging-with-wrong-tags branch February 28, 2023 18:30
armenzg added a commit that referenced this pull request Mar 3, 2023
This is a follow up to #45139 for JIRA and Github enterprise.

It seems that we're tagging events with information about organizations even when it's impossible to have any org info.

We have events tagged with the following info even when it is not possible:

- org slug
- org id
- org context

This issues causes finding errors that are for the wrong organization when using `organization.slug`, thus, wasting time for engineers and customer support.

This change only clears the invalid tag values to reduce the impact of this issue rather than fixing the root issue.

Here's a [query](https://sentry.sentry.io/discover/results/?end=2023-03-04T04%3A59%3A59&field=transaction&field=count_unique%28organization.slug%29&field=count%28%29&name=Integration.DoesNotExist%3A+Integration+matching+query+does+not+exist.&project=1&query=%21organization.slug%3A%22%22+error.value%3A%22Integration+matching+query+does+not+exist.%22&sort=-transaction&start=2023-03-02T05%3A00%3A00&yAxis=count%28%29) showing transactions that should not have org values set.

Fix [WOR-2464](https://getsentry.atlassian.net/browse/WOR-2464)
armenzg added a commit that referenced this pull request Mar 3, 2023
This is a follow up to #45139 for JIRA and Github enterprise.

It seems that we're tagging events with information about organizations
even when it's impossible to have any org info.

We have events tagged with the following info even when it is not
possible:

- org slug
- org id
- org context

This issues causes finding errors that are for the wrong organization
when using `organization.slug`, thus, wasting time for engineers and
customer support.

This change only clears the invalid tag values to reduce the impact of
this issue rather than fixing the root issue.

Here's a
[query](https://sentry.sentry.io/discover/results/?end=2023-03-04T04%3A59%3A59&field=transaction&field=count_unique%28organization.slug%29&field=count%28%29&name=Integration.DoesNotExist%3A+Integration+matching+query+does+not+exist.&project=1&query=%21organization.slug%3A%22%22+error.value%3A%22Integration+matching+query+does+not+exist.%22&sort=-transaction&start=2023-03-02T05%3A00%3A00&yAxis=count%28%29)
showing transactions that should not have org values set.

Fixes [WOR-2464](https://getsentry.atlassian.net/browse/WOR-2464)

[WOR-2464]:
https://getsentry.atlassian.net/browse/WOR-2464?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants