26.9.0+: Sentry backend floods the internal project with its own trace metrics and client reports (force-disable-internal-project no longer honoured)
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, docker-compose, python
- Lĩnh vực
- devops, observability
Hướng nghiên cứu
Start by comparing src/sentry/utils/sdk.py and the self-hosted configuration files sentry/sentry.conf.example.py and config.example.yml; the issue says the SDK setup changed between 26.8.0 and 26.9.0. Check how internal SDK telemetry is configured and which setting controls it. Done means the default or a documented switch prevents unwanted internal metrics and client reports while preserving errors, cron check-ins, and spans.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Self-Hosted Version
26.10.0
CPU Architecture
x86_64
Docker Version
29.8.0
Docker Compose Version
5.5.1
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Upgrade from 26.8.0 to 26.10.0
Steps to Reproduce
- Run self-hosted 26.8.0 with the default
sentry/config.yml, which containstransaction-events.force-disable-internal-project: true. - Upgrade to 26.10.0 with
./install.shand start the stack. - Look at the
internalproject (project id 1) and at ClickHouse insert/merge activity.
Expected Result
As in 26.8.0: the Sentry backend reports its own errors to the internal project. It does not send a continuous stream of its own telemetry that self-hosted users never look at.
Actual Result
Sentry's own SDK now continuously sends trace metrics and client reports to the internal project. ClickHouse, Kafka and the consumers stay busy all the time on an otherwise almost idle instance.
Measurements on our instance (all user projects together send only a handful of events per day):
| 26.8.0 | 26.10.0 | |
|---|---|---|
| Accepted outcomes, per hour | ~7k (all projects) | ~1.6M for project 1 (mostly TRACE_METRIC_BYTE) |
Client-discarded LOG_BYTE outcomes for project 1, per 3 min |
0 | ~530k |
eap_items rows with item_type = METRIC for project 1 |
0 | ~74k per day |
| ClickHouse inserts per minute | not measured (low: data volume was only uptime results) | ~80 (outcomes_* ×47, eap_items ×31), each followed by a merge |
CPU, as Munin averages in % of one core (8 vCPU host; 26.8.0 = a full day; 26.10.0 = ~18h):
| 26.8.0 | 26.10.0 | |
|---|---|---|
| clickhouse | 18.6 | 123.6 |
| kafka | 20.2 | 34.9 |
| taskworker | 7.2 | 22.1 |
| relay | 4.0 | 9.9 |
| host user + system (sum over all cores) | 77 | 151 |
Almost all of the metrics (99%) are viewer_context.observation with point=task_execute, so one per taskworker task execution.
At startup, Sentry also warns that the option from the default config no longer exists:
* Unknown config option found: 'transaction-events.force-disable-internal-project'
Cause, as far as I can tell: src/sentry/utils/sdk.py was rewritten between 26.8.0 and 26.9.0, and 26.10.0 has the same code. The MultiplexingTransport, which checked transaction-events.force-disable-internal-project and store.use-relay-dsn-sample-rate, was removed. configure_sdk() now calls sentry_sdk.init() directly with the internal project's DSN and trace_lifecycle="stream", so nothing filters this traffic any more. On top of that:
- sentry-sdk 2.72 always sends metrics.
enable_metrics=Falseonly logs "The enable_metrics option has no effect and will be removed in the next major". LoggingIntegration(sentry_logs_level=logging.INFO, capture_sentry_logs=True)turns every INFO log line into a log record.before_send_logdrops it (ourlogs.sentry-emit-rolloutis 0), but each drop is still sent as a client report.
Workaround in sentry/sentry.conf.py:
def _drop_internal_metric(metric, hint):
return None
SENTRY_SDK_CONFIG["before_send_metric"] = _drop_internal_metric
SENTRY_SDK_CONFIG["send_client_reports"] = False
After a restart, the project 1 metric and client-report outcomes dropped to 0, and ClickHouse inserts went from ~80 to ~12 per minute. Errors, cron check-ins and spans from the backend still reach the internal project.
CPU with the workaround (Munin averages over the following ~3h, % of one core): clickhouse 123.6 → 40.4, kafka 34.9 → 21.8, taskworker 22.1 → 12.5, relay 9.9 → 5.6, host user + system 151 → 120.
ClickHouse stays above the 26.8.0 level (~40% vs ~19%) even with the workaround. That part seems unrelated to this issue; it coincides with the ClickHouse 25.3 → 25.8 bump in 26.9.0, where queries and merges together use only ~1.5% of a core and the rest goes to background threads.
Suggestion: ship an equivalent default in sentry.conf.example.py, or bring back a self-hosted switch that turns off the backend's own telemetry, and remove the obsolete transaction-events.force-disable-internal-project from config.example.yml.
Event ID
No response
- Ngôn ngữ chính
- Shell
- Star
- 9.7k
- Fork
- 2k
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/self-hosted
-
Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
getsentry/self-hosted#4644 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
getsentry/self-hosted#4518 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Waiting for: Product Owner
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 73/100
getsentry/self-hosted#4642 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Waiting for: Community
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
getsentry/self-hosted#4637 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Waiting for: Product Owner
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
getsentry/self-hosted#4634 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của getsentry/self-hosted
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ajithakdev/claude-desktop-rpm#43 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aws/aws-networking-best-practices#256 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:terraform source:reader type:content-error
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
stephrobert/blog-roadmap#268 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
ChatGPT directory is behind mainĐang mởopenai-directory
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100