andersundsehr / sentry-async
为 Symfony 的异步 Sentry - 燃烧并忘记
1.0.0
2023-11-24 08:07 UTC
Requires
- ext-fileinfo: *
- sentry/sentry-symfony: ^4.12.0
Requires (Dev)
- pluswerk/grumphp-config: ^6.1
This package is auto-updated.
Last update: 2024-09-24 10:07:48 UTC
README
要启用异步传输,请配置 Sentry 使用我们的传输工厂。
此扩展包含默认的 file_queue,可以在 config/packages/sentry.yaml 中进行配置
sentry: transport_factory: AUS\SentryAsync\Transport\TransportFactory sentry_async: file_queue: compress: true limit: 200 directory: '%kernel.cache_dir%/sentry_async/'
实际上,您可以使用其他队列功能,并在 config/services.yaml 中自行处理
App\Queue\ExampleQueue: public: true AUS\SentryAsync\Transport\TransportFactory: $queue: '@App\Queue\ExampleQueue'
在 src/Queue/ExampleQueue 中的另一个传输类示例
<?php declare(strict_types=1); namespace App\Queue; use AUS\SentryAsync\Queue\Entry; use AUS\SentryAsync\Queue\QueueInterface; class ExampleQueue implements QueueInterface { public function pop(): ?Entry { } public function push(Entry $entry): void { } }