Skip to content

fix(sentry): use safer published defaults - #1080

Merged
huangdijia merged 1 commit into
mainfrom
codex/sentry-safer-defaults
Aug 9, 2026
Merged

fix(sentry): use safer published defaults#1080
huangdijia merged 1 commit into
mainfrom
codex/sentry-safer-defaults

Conversation

@huangdijia

@huangdijia huangdijia commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • disable Sentry metrics, default metrics, and command metrics unless explicitly enabled
  • reduce the published transport channel size from 65535 to 512
  • reduce the published transport concurrency limit from 1000 to 100
  • change the published transport timeout value from -1 to 0
  • synchronize the queue and concurrency examples across both component READMEs and all four documentation locales

Why

The previous published defaults enabled metric collection automatically and allowed a very large transport queue and concurrency limit. More conservative published defaults reduce the risk of excessive resource consumption under sustained event volume or a slow Sentry endpoint.

Impact

Applications publishing the Sentry configuration receive opt-in metric collection and tighter transport queue and concurrency values. All settings remain configurable through the existing environment variables.

Implementation note

CoHttpTransport currently applies only positive transport_timeout values, so the published zero timeout does not change runtime enqueue behavior in this PR. The documentation does not claim otherwise.

Validation

  • composer test:lint
  • vendor/bin/pest --group sentry (43 tests, 73 assertions)
  • npm run docs:check (56 pages across 4 locales)
  • git diff --check

Summary by CodeRabbit

  • 功能调整

    • Sentry 指标采集默认关闭,减少默认运行开销。
    • 传输队列容量调整为 512,并发限制调整为 100。
    • 传输超时默认值调整为 0
  • 文档

    • 更新多语言 Sentry 配置示例,使参数说明与当前默认设置保持一致。

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

本次更新 Sentry 的指标默认开关和传输默认参数。运行时传输超时改为 0。多语言文档和 README 同步更新通道容量与并发限制示例。

Changes

Sentry 配置更新

Layer / File(s) Summary
运行时默认配置
src/sentry/publish/sentry.php
将三个指标配置默认值改为 false。将传输通道大小改为 512,并发限制改为 100,超时改为 0
配置示例同步
docs/*/components/sentry.md, src/sentry/README*.md
同步各语言配置示例,将通道容量改为 512,并发限制改为 100。文档未新增传输超时配置。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

兔子检查配置门,
指标默认静静关。
通道调整五百一十二,
并发限制一百整。
文档示例同步完成。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了 Sentry 发布默认值的安全调整,涵盖指标开关、传输容量、并发限制和超时设置。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/sentry-safer-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@huangdijia
huangdijia force-pushed the codex/sentry-safer-defaults branch from ea5346c to 35ef2d6 Compare August 9, 2026 05:18
@huangdijia huangdijia changed the title fix(sentry): use safer metrics and transport defaults fix(sentry): use safer published defaults Aug 9, 2026
@huangdijia
huangdijia marked this pull request as ready for review August 9, 2026 07:25
@huangdijia
huangdijia merged commit c814785 into main Aug 9, 2026
106 of 107 checks passed
@huangdijia
huangdijia deleted the codex/sentry-safer-defaults branch August 9, 2026 07:26
huangdijia added a commit that referenced this pull request Aug 9, 2026
Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant