Skip to content

Commit

Permalink
add fingerprinting rules (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtanda authored Mar 21, 2023
1 parent 3850087 commit 97df7c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sentry/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type Project struct {
ResolveAge int `json:"resolveAge"`
DataScrubber bool `json:"dataScrubber"`
DataScrubberDefaults bool `json:"dataScrubberDefaults"`
FingerprintingRules string `json:"fingerprintingRules"`
GroupingEnhancements string `json:"groupingEnhancements"`
SafeFields []string `json:"safeFields"`
SensitiveFields []string `json:"sensitiveFields"`
Expand Down Expand Up @@ -159,6 +160,7 @@ type UpdateProjectParams struct {
ResolveAge *int `json:"resolveAge,omitempty"`
Options map[string]interface{} `json:"options,omitempty"`
AllowedDomains []string `json:"allowedDomains,omitempty"`
FingerprintingRules string `json:"fingerprintingRules,omitempty"`
GroupingEnhancements string `json:"groupingEnhancements,omitempty"`
}

Expand Down
6 changes: 6 additions & 0 deletions sentry/projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func TestProjectsService_List(t *testing.T) {
},
"platform": null,
"slug": "pump-station",
"fingerprintingRules": "fingerprinting rule",
"groupingEnhancements": "pump station grouping enhancement rule",
"status": "active"
}
Expand Down Expand Up @@ -216,6 +217,7 @@ func TestProjectsService_List(t *testing.T) {
Type: "letter_avatar",
},
Organization: expectedOrganization,
FingerprintingRules: "fingerprinting rule",
GroupingEnhancements: "pump station grouping enhancement rule",
},
}
Expand Down Expand Up @@ -361,6 +363,7 @@ func TestProjectsService_Get(t *testing.T) {
"name": "Powerful Abolitionist",
"slug": "powerful-abolitionist"
}],
"fingerprintingRules": "fingerprinting rule",
"groupingEnhancements": "pump-station grouping enhancement rule",
"verifySSL": false
}`)
Expand Down Expand Up @@ -417,6 +420,7 @@ func TestProjectsService_Get(t *testing.T) {
AllowedDomains: []string{"*"},
DataScrubber: true,
DataScrubberDefaults: true,
FingerprintingRules: "fingerprinting rule",
GroupingEnhancements: "pump-station grouping enhancement rule",
SafeFields: []string{},
SensitiveFields: []string{},
Expand Down Expand Up @@ -538,6 +542,7 @@ func TestProjectsService_Update(t *testing.T) {
"callSignReviewed": false,
"id": "5",
"subjectTemplate": "[$project] ${tag:level}: $title",
"fingerprintingRules": "fingerprinting rule",
"groupingEnhancements": "Plane Proxy grouping enhancement rule",
"name": "Plane Proxy"
}`)
Expand Down Expand Up @@ -575,6 +580,7 @@ func TestProjectsService_Update(t *testing.T) {
DigestsMaxDelay: 1800,
ResolveAge: 720,
SubjectTemplate: "[$project] ${tag:level}: $title",
FingerprintingRules: "fingerprinting rule",
GroupingEnhancements: "Plane Proxy grouping enhancement rule",
}
assert.Equal(t, expected, project)
Expand Down

0 comments on commit 97df7c9

Please sign in to comment.