Sentry Transport Plugin #2
butschster
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Implemented: https://github.com/roadrunner-plugins/sentry-transport
The Sentry Transport plugin for RoadRunner is designed to handle Sentry event transmission asynchronously, eliminating the performance impact of blocking HTTP requests in PHP applications. The plugin receives Sentry events via RPC calls from PHP and manages their transmission to Sentry services using efficient Go routines with built-in rate limiting and retry mechanisms.
Motivation
Current Problems
Proposed Solution
Project Structure
Core Components
1. Plugin Core (
plugin.go)Service,Named,Provider2. Configuration (
config.go)3. RPC Interface (
rpc.go)SendBatch(events []SentryEvent)- Send multiple events4. HTTP Transport (
transport.go)5. Rate Limiter (
rate_limiter.go)X-Sentry-Rate-Limitsheader6. Event Queue (
queue.go)7. Retry Mechanism (
retry.go)Configuration Schema
Data Structures
Sentry Event Structure
Sequence Diagram
sequenceDiagram participant PHP as PHP Application participant RPC as RR Sentry RPC participant Queue as Event Queue participant Worker as Worker Pool participant RL as Rate Limiter participant Sentry as Sentry API PHP->>RPC: SendEvent(sentryEvent) RPC->>RPC: Validate Event RPC->>Queue: Enqueue Event RPC-->>PHP: Acknowledge (immediate) Queue->>Worker: Dequeue Event Worker->>RL: Check Rate Limits alt Rate Limited RL-->>Worker: Wait/Backoff Worker->>Worker: Schedule Retry else Not Rate Limited Worker->>Sentry: HTTP POST Event alt Success Response Sentry-->>Worker: 200 OK Worker->>RL: Update Rate Limits else Rate Limit Response Sentry-->>Worker: 429 + Headers Worker->>RL: Parse Rate Limit Headers Worker->>Queue: Requeue with Delay else Error Response Sentry-->>Worker: 4xx/5xx Error Worker->>Worker: Schedule Retry end end Note over Worker: Metrics & LoggingIntegration Examples
PHP Integration
Beta Was this translation helpful? Give feedback.
All reactions