File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
src/Instrumentation/Laravel Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Nevay \SPI \ServiceLoader ;
6+ use OpenTelemetry \API \Instrumentation \AutoInstrumentation \Instrumentation ;
7+ use OpenTelemetry \Contrib \Instrumentation \Laravel \Hooks ;
8+ use OpenTelemetry \Contrib \Instrumentation \Laravel \LaravelInstrumentation ;
9+
10+ // In case the `tbachert/spi` plugin has not been allowed in composer allow-plugins (root-level).
11+ ServiceLoader::register (Instrumentation::class, LaravelInstrumentation::class);
12+
13+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Console \Command::class);
14+
15+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Contracts \Console \Kernel::class);
16+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Contracts \Http \Kernel::class);
17+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Contracts \Queue \Queue::class);
18+
19+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Foundation \Console \ServeCommand::class);
20+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Foundation \Application::class);
21+
22+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Queue \Queue::class);
23+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Queue \SyncQueue::class);
24+ ServiceLoader::register (Hooks \Hook::class, Hooks \Illuminate \Queue \Worker::class);
Original file line number Diff line number Diff line change 3232 "autoload" : {
3333 "psr-4" : {
3434 "OpenTelemetry\\ Contrib\\ Instrumentation\\ Laravel\\ " : " src/"
35- }
35+ },
36+ "files" : [
37+ " _register.php"
38+ ]
3639 },
3740 "autoload-dev" : {
3841 "psr-4" : {
You can’t perform that action at this time.
0 commit comments