Skip to content

ref(utils): SDK name tag normalizer #59504

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 11 commits into from
Nov 8, 2023
Merged

ref(utils): SDK name tag normalizer #59504

merged 11 commits into from
Nov 8, 2023

Conversation

vartec
Copy link
Contributor

@vartec vartec commented Nov 7, 2023

#59501 Normalizes SDK tags to reduce their cardinality.
Related to #59075 and #59379.

  • non-Sentry SDK tags are ignored (collapsed into "other")
  • official Sentry SDK tags are normalized and shortened:
    • sentry.javascript.* are mostly kept as-is
    • sentry.native.* are collapsed to 3 levels
    • all other sentry.* are collapsed to 2 levels

@vartec vartec requested a review from lobsterkatie November 7, 2023 03:23
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 7, 2023
@vartec vartec requested a review from ellisonmarks November 7, 2023 03:23
@vartec
Copy link
Contributor Author

vartec commented Nov 7, 2023

I'll create a separate PR to un-revert adding SDK tags using this normalizer.

import functools
import re

_KNOWN_TAGS = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ellisonmarks the unique values for SDK tag would be reduced to this list + "other", so as it stands now, 42 unique values. Is that an acceptable cardinality?

Copy link
Member

Choose a reason for hiding this comment

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

@vartec - after our iterations, what's the new count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lobsterkatie 36 total (35 known + "other")

Copy link
Member

Choose a reason for hiding this comment

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

Given that we started with, what, 270ish? that’s really not too shabby! 🙂

Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

Looks good so far!

@vartec vartec marked this pull request as ready for review November 7, 2023 22:41
@vartec vartec changed the title ref(utils): SDK tag normalizer [WIP] ref(utils): SDK name tag normalizer Nov 7, 2023
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #59504 (b1dc550) into master (0de550e) will increase coverage by 0.00%.
Report is 38 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head b1dc550 differs from pull request most recent head fa9ada4. Consider uploading reports for the commit fa9ada4 to get more accurate results

@@           Coverage Diff           @@
##           master   #59504   +/-   ##
=======================================
  Coverage   80.75%   80.76%           
=======================================
  Files        5171     5172    +1     
  Lines      226911   226928   +17     
  Branches    38148    38152    +4     
=======================================
+ Hits       183250   183273   +23     
+ Misses      38104    38101    -3     
+ Partials     5557     5554    -3     
Files Coverage Δ
src/sentry/utils/tag_normalization.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

🚢

@vartec vartec enabled auto-merge (squash) November 8, 2023 17:59
@vartec vartec merged commit 2e5a39f into master Nov 8, 2023
@vartec vartec deleted the vartec/sdk-tag-normalizer branch November 8, 2023 18:35
vartec pushed a commit that referenced this pull request Nov 9, 2023
…ics (#59572)

This re-applies previously reverted #59379 combining it with #59504 to
normalize SDK tags reducing their cardinality.

Implements: #59053

---------

Co-authored-by: Katie Byers <[email protected]>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
vartec pushed a commit that referenced this pull request Nov 9, 2023
…ics (#59572)

This re-applies previously reverted #59379 combining it with #59504 to
normalize SDK tags reducing their cardinality.

Implements: #59053

---------

Co-authored-by: Katie Byers <[email protected]>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 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.

2 participants