-
-
Notifications
You must be signed in to change notification settings - Fork 27
refactor(sentry): remove deprecated features and unused configuration #990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Remove `enable_tracing` config option from sentry.php (deprecated/unused) - Remove Metrics-related singleton aspects (Metrics::getInstance and MetricsUnit::getInstance) - Remove W3C traceparent from Carrier and CarrierPacker utilities This cleanup simplifies the Sentry integration by removing features that are no longer needed.
Walkthrough移除 Sentry PHP 配置中的 Changes
Sequence Diagram(s)sequenceDiagram
participant Span
participant Carrier
participant CarrierPacker
note over Span,Carrier `#E8F6EF`: 旧流程(之前)
Span->>Carrier: fromSpan() -> [SENTRY_TRACE, BAGGAGE, TRACEPARENT]
Carrier->>CarrierPacker: pack([SENTRY_TRACE, BAGGAGE, TRACEPARENT])
CarrierPacker->>CarrierPacker: json_encode([...]) -> payload
par 新流程(当前改动)
Span->>Carrier: fromSpan() -> [SENTRY_TRACE, BAGGAGE]
Carrier->>CarrierPacker: pack([SENTRY_TRACE, BAGGAGE])
CarrierPacker->>CarrierPacker: json_encode([...]) -> payload
end
note right of CarrierPacker `#FFF4E6`: unpack 仍可读取第三元素(兼容外部提供的 TRACEPARENT)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 分钟
Possibly related PRs
Suggested reviewers
诗
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.php📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
tests/**/*.php📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
🔇 Additional comments (2)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PHPStan (2.1.31)At least one path must be specified to analyse. 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. Comment |
…#990) * refactor(sentry): remove deprecated features and unused configuration - Remove `enable_tracing` config option from sentry.php (deprecated/unused) - Remove Metrics-related singleton aspects (Metrics::getInstance and MetricsUnit::getInstance) - Remove W3C traceparent from Carrier and CarrierPacker utilities This cleanup simplifies the Sentry integration by removing features that are no longer needed. * fix(tests): remove traceparent key from Carrier data expectations --------- Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
Summary
This PR removes deprecated and unused features from the Sentry integration to simplify the codebase:
enable_tracingconfiguration option fromsentry.php(no longer needed)Metrics::getInstanceandMetricsUnit::getInstance)CarrierandCarrierPackerutilitiesChanges
Configuration (
src/sentry/publish/sentry.php)enable_tracingconfig option as it's deprecated/unusedSingleton Aspects (
src/sentry/src/Aspect/SingletonAspect.php)\Sentry\Metrics\Metrics::class . '::getInstance'\Sentry\Metrics\MetricsUnit::class . '::getInstance'Carrier Utilities (
src/sentry/src/Util/Carrier.php&CarrierPacker.php)Constants::TRACEPARENT(W3C traceparent) from carrier dataSENTRY_TRACEandBAGGAGE)Benefits
Test Plan
Summary by CodeRabbit
版本更新说明