Skip to content

Commit aebf2d5

Browse files
committed
ref: update sentry_project docs with examples of fingerprinting_rules and grouping_enhancements
[skip ci]
1 parent 5304d9e commit aebf2d5

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/resources/project.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ resource "sentry_project" "default" {
3131
releases = ["1.*", "[!3].[0-9].*"]
3232
error_messages = ["TypeError*", "*: integer division or modulo by zero"]
3333
}
34+
35+
fingerprinting_rules = <<-EOT
36+
# force all errors of the same type to have the same fingerprint
37+
error.type:DatabaseUnavailable -> system-down
38+
# force all memory allocation errors to be grouped together
39+
stack.function:malloc -> memory-allocation-error
40+
EOT
41+
grouping_enhancements = <<-EOT
42+
# remove all frames above a certain function from grouping
43+
stack.function:panic_handler ^-group
44+
# mark all functions following a prefix in-app
45+
stack.function:mylibrary_* +app
46+
EOT
3447
}
3548
```
3649

examples/resources/sentry_project/resource.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,17 @@ resource "sentry_project" "default" {
1616
releases = ["1.*", "[!3].[0-9].*"]
1717
error_messages = ["TypeError*", "*: integer division or modulo by zero"]
1818
}
19+
20+
fingerprinting_rules = <<-EOT
21+
# force all errors of the same type to have the same fingerprint
22+
error.type:DatabaseUnavailable -> system-down
23+
# force all memory allocation errors to be grouped together
24+
stack.function:malloc -> memory-allocation-error
25+
EOT
26+
grouping_enhancements = <<-EOT
27+
# remove all frames above a certain function from grouping
28+
stack.function:panic_handler ^-group
29+
# mark all functions following a prefix in-app
30+
stack.function:mylibrary_* +app
31+
EOT
1932
}

0 commit comments

Comments
 (0)