Skip to content

Commit 06d0fb1

Browse files
feat(uptime): Enable uptime in self-hosted (#3787)
1 parent d3a068d commit 06d0fb1

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RELAY_IMAGE=getsentry/relay:nightly
1515
SYMBOLICATOR_IMAGE=getsentry/symbolicator:nightly
1616
TASKBROKER_IMAGE=getsentry/taskbroker:nightly
1717
VROOM_IMAGE=getsentry/vroom:nightly
18+
UPTIME_CHECKER_IMAGE=getsentry/uptime-checker:nightly
1819
HEALTHCHECK_INTERVAL=30s
1920
HEALTHCHECK_TIMEOUT=1m30s
2021
HEALTHCHECK_RETRIES=10

docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ services:
305305
command: rust-consumer --storage spans --consumer-group snuba-spans-consumers --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset
306306
profiles:
307307
- feature-complete
308+
snuba-uptime-results-consumer:
309+
<<: *snuba_defaults
310+
command: rust-consumer --storage uptime_monitor_checks --consumer-group snuba-uptime-results --auto-offset-reset=latest --max-batch-time-ms 750 --no-strict-offset-reset
311+
profiles:
312+
- feature-complete
308313
symbolicator:
309314
<<: *restart_policy
310315
image: "$SYMBOLICATOR_IMAGE"
@@ -415,6 +420,11 @@ services:
415420
command: run consumer monitors-clock-tasks --consumer-group monitors-clock-tasks
416421
profiles:
417422
- feature-complete
423+
uptime-results:
424+
<<: *sentry_defaults
425+
command: run consumer uptime-results --consumer-group uptime-results
426+
profiles:
427+
- feature-complete
418428
post-process-forwarder-transactions:
419429
<<: *sentry_defaults
420430
command: run consumer --no-strict-offset-reset post-process-forwarder-transactions --consumer-group post-process-forwarder --synchronize-commit-log-topic=snuba-transactions-commit-log --synchronize-commit-group transactions_group
@@ -533,6 +543,28 @@ services:
533543
- sentry-vroom:/var/vroom/sentry-profiles
534544
profiles:
535545
- feature-complete
546+
uptime-checker:
547+
<<: *restart_policy
548+
image: "$UPTIME_CHECKER_IMAGE"
549+
command: run
550+
environment:
551+
UPTIME_CHECKER_RESULTS_KAFKA_CLUSTER: kafka:9092
552+
UPTIME_CHECKER_REDIS_HOST: redis://redis:6379
553+
# Set to `true` will allow uptime checks against private IP addresses
554+
UPTIME_CHECKER_ALLOW_INTERNAL_IPS: "false"
555+
# The number of times to retry failed checks before reporting them as failed
556+
UPTIME_CHECKER_FAILURE_RETRIES: "1"
557+
# DNS name servers to use when making checks in the http checker.
558+
# Separated by commas. Leaving this unset will default to the systems dns
559+
# resolver.
560+
#UPTIME_CHECKER_HTTP_CHECKER_DNS_NAMESERVERS: "8.8.8.8,8.8.4.4"
561+
depends_on:
562+
kafka:
563+
<<: *depends_on-healthy
564+
redis:
565+
<<: *depends_on-healthy
566+
profiles:
567+
- feature-complete
536568

537569
volumes:
538570
# These store application data that should persist across restarts.

sentry/sentry.conf.example.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,24 @@ def get_internal_network():
329329
"organizations:continuous-profiling",
330330
"organizations:continuous-profiling-stats",
331331
)
332+
# Uptime related flags
333+
+ (
334+
"organizations:uptime",
335+
"organizations:uptime-create-issues",
336+
# TODO(epurkhiser): We can remove remove these in 25.8.0 since
337+
# we'll have released this issue group type
338+
# (https://github.com/getsentry/sentry/pull/94827)
339+
"organizations:issue-uptime-domain-failure-visible",
340+
"organizations:issue-uptime-domain-failure-ingest",
341+
"organizations:issue-uptime-domain-failure-post-process-group",
342+
)
332343
}
333344
)
334345

346+
# TODO(epurkhiser): In 25.8.0 we can drop this option override as we've made it
347+
# default in sentry (https://github.com/getsentry/sentry/pull/94822)
348+
SENTRY_OPTIONS["uptime.snuba_uptime_results.enabled"] = True
349+
335350
#######################
336351
# MaxMind Integration #
337352
#######################

0 commit comments

Comments
 (0)