getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
336 stars 1.47k forks source link

[grouping] Improve explanation of sibling frame stacktrace rules #8589

Open lobsterkatie opened 12 months ago

lobsterkatie commented 12 months ago

Core or SDK?

Core Sentry product

Which part? Which one?

Custom grouping rules

Description

In this section of the Product > Data Management > Issue Grouping > Stacktrace Rules page, we give examples of the sibling frame syntax being used, but don't actually explain specifically what each of the two new pieces of syntax (| and [...]) means. This makes it really hard to figure out how to do anything other than what happens to be shown in the examples, or perhaps slight variations thereof.

For reference, this issue is inspired by a question asked in Slack by one of our solutions engineers (lightly edited):

Hey team, Is it possible for Sibling Matching to work at more than one level? ie, if function foo() calls function bar(), I want to exclude both of those, but only if bar() then calls baz(). If bar() does not call baz() though, I want to leave them alone.

Would something like this work?

stack.function:foo | [ stack.function: bar ] | [stack.function: baz] -group

Can sibling syntax be used with more than 2 matchers?

You can see from this question that not only do we not cover the issue at hand (multiple levels), but our docs are sufficiently unclear that (at least the way I read the docs) there's a mistake in his syntax. I think that to exclude both the foo() and the bar() frames it'd need to be stack.function:foo | stack.function: bar | [stack.function: baz] -group instead. To be clear, this is not to throw him under the bus, but to illustrate that even someone who knows Sentry well and who read the docs closely could be misled. (Either that, or it's me being misled. Regardless, this points to a need for more clarity.)

Suggested Solution

Explain the syntax, answer the question posed, and maybe give a few more examples while we're at it.

┆Issue is synchronized with this Jira Improvement by Unito

getsantry[bot] commented 12 months ago

Routing to @getsentry/product-owners-issues for triage ⏲️