-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathConfigProvider.php
More file actions
92 lines (88 loc) · 3.82 KB
/
ConfigProvider.php
File metadata and controls
92 lines (88 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
declare(strict_types=1);
/**
* This file is part of friendsofhyperf/components.
*
* @link https://github.com/friendsofhyperf/components
* @document https://github.com/friendsofhyperf/components/blob/main/README.md
* @contact [email protected]
*/
namespace FriendsOfHyperf\Sentry;
class ConfigProvider
{
public function __invoke(): array
{
defined('BASE_PATH') or define('BASE_PATH', '');
return [
'aspects' => [
Aspect\BreadcrumbAspect::class,
Aspect\CacheAspect::class,
Aspect\CoroutineAspect::class,
Aspect\FilesystemAspect::class,
Aspect\GracefulAspect::class,
Aspect\GuzzleHttpClientAspect::class,
Aspect\LoggerAspect::class,
Aspect\RedisAspect::class,
// Aspect\SingletonAspect::class,
Aspect\SentrySdkAspect::class,
Metrics\Aspect\CounterAspect::class,
Metrics\Aspect\HistogramAspect::class,
Tracing\Aspect\AmqpProducerAspect::class,
Tracing\Aspect\AsyncQueueJobMessageAspect::class,
Tracing\Aspect\CacheAspect::class,
Tracing\Aspect\CoordinatorAspect::class,
Tracing\Aspect\CoroutineAspect::class,
Tracing\Aspect\DbAspect::class,
Tracing\Aspect\DbConnectionAspect::class,
Tracing\Aspect\ElasticsearchAspect::class,
Tracing\Aspect\ElasticsearchRequestAspect::class,
Tracing\Aspect\FilesystemAspect::class,
Tracing\Aspect\GrpcAspect::class,
Tracing\Aspect\GuzzleHttpClientAspect::class,
Tracing\Aspect\KafkaProducerAspect::class,
Tracing\Aspect\RpcAspect::class,
Tracing\Aspect\RpcEndpointAspect::class,
Tracing\Aspect\RedisConnectionAspect::class,
Tracing\Aspect\RedisAspect::class,
Tracing\Aspect\TraceAnnotationAspect::class,
Tracing\Aspect\ViewRenderAspect::class,
],
'commands' => [
Command\AboutCommand::class,
Command\TestCommand::class,
],
'dependencies' => [
\Sentry\ClientBuilder::class => Factory\ClientBuilderFactory::class,
\Sentry\State\HubInterface::class => Factory\HubFactory::class,
\Sentry\Transport\TransportInterface::class => Transport\CoHttpTransport::class,
],
'listeners' => [
Listener\SetupSentryListener::class,
Listener\EventHandleListener::class => PHP_INT_MAX - 1,
Crons\Listener\EventHandleListener::class => PHP_INT_MAX - 1,
Metrics\Listener\DBPoolWatcher::class,
Metrics\Listener\OnBeforeHandle::class,
Metrics\Listener\OnCoroutineServerStart::class,
Metrics\Listener\OnMetricFactoryReady::class,
Metrics\Listener\OnWorkerStart::class,
Metrics\Listener\QueueWatcher::class,
Metrics\Listener\RedisPoolWatcher::class,
Metrics\Listener\RequestWatcher::class,
Tracing\Listener\EventHandleListener::class => PHP_INT_MAX, // !! Make sure it is the first one to handle the event
],
'annotations' => [
'scan' => [
'class_map' => [],
],
],
'publish' => [
[
'id' => 'config',
'description' => 'The config file for sentry.',
'source' => __DIR__ . '/../publish/sentry.php',
'destination' => BASE_PATH . '/config/autoload/sentry.php',
],
],
];
}
}