Skip to content

Commit d0f4655

Browse files
ref: Update ownership rule evaluation flow for multiple owners in rule (#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>
1 parent 12ad220 commit d0f4655

File tree

1 file changed

+10
-2
lines changed
  • src/docs/product/issues/ownership-rules

1 file changed

+10
-2
lines changed

src/docs/product/issues/ownership-rules/index.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,13 @@ Create external team/user mappings for your GitHub/GitLab teams and users by nav
116116
If you have both ownership rules and code owners, Sentry evaluates an event’s in-app frames against the rules in the following order:
117117

118118
1. Code owners, top-to-bottom
119+
120+
a. If there are multiple owners in the rule, left-to-right
121+
119122
2. Ownership rules, top-to-bottom
120123

124+
a. If there are multiple owners in the rule, left-to-right
125+
121126
After evaluation, the last rule matching returns the assignment. The order of the event’s stacktrace filepaths is irrelevant in determining the rule assignment.
122127

123128
### Example
@@ -131,15 +136,18 @@ codeowners:*.js #ecosystem
131136
**Ownership Rules:**
132137

133138
```
134-
path:*.js #ecosystem
139+
path:*.js #ecosystem #frontend
135140
path:sentry/api/* #api
136141
url:*subscription* #billing
137142
path:dist/frontend/components/* #frontend
138143
```
139144

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

142-
1. Evaluate against the code owners top-to-bottom; we get one match.
147+
1. Evaluate against the code owners top-to-bottom; we get one match with two owners in the rule.
148+
149+
a. Evaluate the rule left-to-right; we choose the first owner.
150+
143151
2. Evaluate against the ownership rules top-to-bottom; we get two matches.
144152

145153
The matches, in order, are:

0 commit comments

Comments
 (0)