Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ HEALTHCHECK_FILE_RETRIES=3
HEALTHCHECK_FILE_START_PERIOD=600s
# Set SETUP_JS_SDK_ASSETS to 1 to enable the setup of JS SDK assets
# SETUP_JS_SDK_ASSETS=1
#
# Sentry (and its' surrounding services) uses Statsd for metrics collection.
# It's also the proper way to monitor self-hosted Sentry systems.
# Set STATSD_ADDR to a valid IP:PORT combination to enable Statsd metrics collection.
# STATSD_ADDR=127.0.0.1:8125
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ x-sentry-defaults: &sentry_defaults
SENTRY_EVENT_RETENTION_DAYS:
SENTRY_MAIL_HOST:
SENTRY_MAX_EXTERNAL_SOURCEMAP_SIZE:
SENTRY_STATSD_ADDR: "${STATSD_ADDR:-}"
volumes:
- "sentry-data:/data"
- "./sentry:/etc/sentry"
Expand Down Expand Up @@ -96,8 +97,7 @@ x-snuba-defaults: &snuba_defaults
SENTRY_EVENT_RETENTION_DAYS:
# If you have statsd server, you can utilize that to monitor self-hosted Snuba containers.
# To start, state these environment variables below on your `.env.` file and adjust the options as needed.
SNUBA_STATSD_HOST: # Example value: "100.100.123.123". Must be an IP address, not domain name
SNUBA_STATSD_PORT: # Example value: 8125
SNUBA_STATSD_ADDR: "${STATSD_ADDR:-}"
services:
smtp:
<<: *restart_policy
Expand Down Expand Up @@ -466,6 +466,8 @@ services:
symbolicator:
<<: *restart_policy
image: "$SYMBOLICATOR_IMAGE"
environment:
SYMBOLICATOR_STATSD_ADDR: ${STATSD_ADDR:-127.0.0.1:8125}
command: run -c /etc/symbolicator/config.yml
volumes:
- "sentry-symbolicator:/data"
Expand Down Expand Up @@ -700,6 +702,8 @@ services:
relay:
<<: *restart_policy
image: "$RELAY_IMAGE"
environment:
RELAY_STATSD_ADDR: ${STATSD_ADDR:-127.0.0.1:8125}
volumes:
- type: bind
read_only: true
Expand All @@ -726,6 +730,7 @@ services:
TASKBROKER_KAFKA_CLUSTER: "kafka:9092"
TASKBROKER_KAFKA_DEADLETTER_CLUSTER: "kafka:9092"
TASKBROKER_DB_PATH: "/opt/sqlite/taskbroker-activations.sqlite"
TASKBROKER_STATSD_ADDR: ${STATSD_ADDR:-127.0.0.1:8125}
volumes:
- sentry-taskbroker:/opt/sqlite
depends_on:
Expand Down Expand Up @@ -794,6 +799,7 @@ services:
# Separated by commas. Leaving this unset will default to the systems dns
# resolver.
#UPTIME_CHECKER_HTTP_CHECKER_DNS_NAMESERVERS: "8.8.8.8,8.8.4.4"
UPTIME_CHECKER_STATSD_ADDR: ${STATSD_ADDR:-127.0.0.1:8125}
depends_on:
kafka:
<<: *depends_on-healthy
Expand Down
6 changes: 3 additions & 3 deletions relay/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ processing:
# If you have statsd server, you can utilize that to monitor self-hosted Relay.
# To start, uncomment the following `metrics` section and adjust the options as needed.
#
# metrics:
# statsd: "100.100.123.123:8125" # It is recommended to use IP address instead of domain name
# prefix: "sentry.relay" # Adjust this to your needs, default is "sentry.relay"
metrics:
statsd: "${RELAY_STATSD_ADDR}"
prefix: "sentry.relay" # Adjust this to your needs, default is "sentry.relay"
# sample_rate: 1.0 # Adjust this to your needs, default is 1.0
# # `periodic_secs` is the interval for periodic metrics emitted from Relay.
# # Setting it to `0` seconds disables the periodic metrics.
Expand Down
14 changes: 9 additions & 5 deletions sentry/sentry.conf.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,14 @@ def get_internal_network():
#
# To start, uncomment the following line and adjust the options as needed.

# SENTRY_METRICS_BACKEND = 'sentry.metrics.statsd.StatsdMetricsBackend'
# SENTRY_METRICS_OPTIONS: dict[str, Any] = {
# 'host': '100.100.123.123', # It is recommended to use IP address instead of domain name
# 'port': 8125,
# }
SENTRY_STATSD_ADDR = env("SENTRY_STATSD_ADDR")
if SENTRY_STATSD_ADDR:
host, _, port = SENTRY_STATSD_ADDR.partition(":")
port = int(port or 8125)
SENTRY_METRICS_BACKEND = 'sentry.metrics.statsd.StatsdMetricsBackend'
SENTRY_METRICS_OPTIONS: dict[str, Any] = {
'host': host,
'port': port,
}
# SENTRY_METRICS_SAMPLE_RATE = 1.0 # Adjust this to your needs, default is 1.0
# SENTRY_METRICS_PREFIX = "sentry." # Adjust this to your needs, default is "sentry."
11 changes: 4 additions & 7 deletions symbolicator/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ cache_dir: "/data"
bind: "0.0.0.0:3021"
logging:
level: "warn"
metrics:
statsd: null

sentry_dsn: null # TODO: Automatically fill this with the internal project DSN

# If you have statsd server, you can utilize that to monitor self-hosted Symbolicator.
# To start, uncomment the following line and adjust the options as needed.
#
# metrics:
# statsd: "100.100.123.123:8125" # It is recommended to use IP address instead of domain name
# prefix: "sentry.symbolicator" # Adjust this to your needs, default is "symbolicator"
metrics:
statsd: "${SYMBOLICATOR_STATSD_ADDR}" # It is recommended to use IP address instead of domain name
prefix: "sentry.symbolicator" # Adjust this to your needs, default is "symbolicator"
Loading