-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(processor): Fold occurences of property names in function_name #41697
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
Conversation
Swatinem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, though I thought you wanted to do that as part of the UI?
I think native does have some kind of function name cleaning going on, and you can toggle in the UI if you want to have clean functions or full functions. The clean version is used for grouping there.
|
Asked @mitsuhiko and he pointed out that we can do it here instead of in the UI. |
| def format_groups(p): | ||
| if len(p) == 1: | ||
| return p[0] | ||
| return f"\u007b{p[0]}#{len(p)}\u007d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with that but for the record you can do f"{{{p[0]}#{len(p)}}}".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more cowbell braces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
I prefer this being done in ingestion so the response from the API is consistent everywhere including emails, notifications and whatnot. |

Fold multiple consecutive occurrences of the same property name into a single group, excluding the last component.
This is mostly done for React, where some frames have function name like
<object>.children.children.children.onSubmitErrorwhen function is a prop passed down the component stack.