Skip to content

Commit

Permalink
feat(uptime): Allow-list SentryUptimeBot in crawlers
Browse files Browse the repository at this point in the history
We don't want to disallow our own bot from producing traces
  • Loading branch information
evanpurkhiser committed Sep 23, 2024
1 parent 9a938e9 commit a5267a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Collect SDK information in profile chunks. ([#3882](https://github.com/getsentry/relay/pull/3882))
- Introduce `trim = "disabled"` type attribute to prevent trimming of spans. ([#3877](https://github.com/getsentry/relay/pull/3877))
- Make the tcp listen backlog configurable and raise the default to 1024. ([#3899](https://github.com/getsentry/relay/pull/3899))
- Allowlist the SentryUptimeBot user-agent. ([#4068](https://github.com/getsentry/relay/pull/4068))

## 24.7.1

Expand Down
4 changes: 3 additions & 1 deletion relay-filter/src/web_crawlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ static WEB_CRAWLERS: Lazy<Regex> = Lazy::new(|| {
static ALLOWED_WEB_CRAWLERS: Lazy<Regex> = Lazy::new(|| {
Regex::new(
r"(?ix)
Slackbot\s1\.\d+ # Slack - see https://api.slack.com/robots
Slackbot\s1\.\d+| # Slack - see https://api.slack.com/robots
SentryUptimeBot # Uptime Checker https://docs.sentry.io/product/alerts/uptime-monitoring/
",
)
.expect("Invalid allowed web crawlers filter Regex")
Expand Down Expand Up @@ -145,6 +146,7 @@ mod tests {
"APIs-Google (+https://developers.google.com/webmasters/APIs-Google.html)",
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36",
"Slackbot 1.0(+https://api.slack.com/robots)",
"SentryUptimeBot/1.0 (+http://docs.sentry.io/product/alerts/uptime-monitoring/)",
];
for user_agent in &normal_user_agents {
let event = testutils::get_event_with_user_agent(user_agent);
Expand Down

0 comments on commit a5267a1

Please sign in to comment.