Skip to content

Commit

Permalink
ref: Update ownership rule evaluation flow for multiple owners in rule (
Browse files Browse the repository at this point in the history
#7478)

Add that first owner in rule will be assigned in ownership rule doc

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
  • Loading branch information
jangjodi and getsantry[bot] authored Jul 25, 2023
1 parent 12ad220 commit d0f4655
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/docs/product/issues/ownership-rules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ Create external team/user mappings for your GitHub/GitLab teams and users by nav
If you have both ownership rules and code owners, Sentry evaluates an event’s in-app frames against the rules in the following order:

1. Code owners, top-to-bottom

a. If there are multiple owners in the rule, left-to-right

2. Ownership rules, top-to-bottom

a. If there are multiple owners in the rule, left-to-right

After evaluation, the last rule matching returns the assignment. The order of the event’s stacktrace filepaths is irrelevant in determining the rule assignment.

### Example
Expand All @@ -131,15 +136,18 @@ codeowners:*.js #ecosystem
**Ownership Rules:**

```
path:*.js #ecosystem
path:*.js #ecosystem #frontend
path:sentry/api/* #api
url:*subscription* #billing
path:dist/frontend/components/* #frontend
```

When Sentry receives an event with a stacktrace filepath: `dist/frontend/components/sidebar.js`, we:

1. Evaluate against the code owners top-to-bottom; we get one match.
1. Evaluate against the code owners top-to-bottom; we get one match with two owners in the rule.

a. Evaluate the rule left-to-right; we choose the first owner.

2. Evaluate against the ownership rules top-to-bottom; we get two matches.

The matches, in order, are:
Expand Down

1 comment on commit d0f4655

@vercel
Copy link

@vercel vercel bot commented on d0f4655 Jul 25, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev

Please sign in to comment.