Skip to content

Commit

Permalink
Fixes problem with collecting OpenTelementry traces in PHP services
Browse files Browse the repository at this point in the history
Adds local docker env
Updates RR up to 2023
  • Loading branch information
butschster committed May 31, 2023
1 parent 29f03f5 commit c75128a
Show file tree
Hide file tree
Showing 19 changed files with 385 additions and 20 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ Spiral Framework and the other tools we've used.

## Installation

Clone project into a folder
Clone project into a desired folder

Run console commands

```bash
chmod +x run.sh
./run.sh
docker compose up -d
```

## Services dashboards
Expand Down
11 changes: 10 additions & 1 deletion centrifugo/.rr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.7'
version: '3.0'

rpc:
listen: tcp://0.0.0.0:6001
Expand All @@ -22,3 +22,12 @@ metrics:
status:
address: 127.0.0.1:2114
unavailable_status_code: 503

otel:
insecure: true
compress: false
client: http
exporter: otlp
service_name: rr-centrifugo
service_version: 1.0.0
endpoint: collector:4318
2 changes: 2 additions & 0 deletions centrifugo/app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Spiral\Boot\Bootloader\CoreBootloader;
use Spiral\Bootloader as Framework;
use Spiral\Cqrs\Bootloader\CqrsBootloader;
use Spiral\Debug\Bootloader\DumperBootloader;
use Spiral\DotEnv\Bootloader as DotEnv;
use Spiral\Events\Bootloader\EventsBootloader;
use Spiral\Framework\Kernel;
Expand All @@ -21,6 +22,7 @@ class App extends Kernel
{
protected const SYSTEM = [
CoreBootloader::class,
DumperBootloader::class,
TokenizerBootloader::class,
DotEnv\DotenvBootloader::class,
];
Expand Down
3 changes: 3 additions & 0 deletions centrifugo/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"php": ">=8.1",
"ext-mbstring": "*",
"doctrine/collections": "^1.6",
"open-telemetry/exporter-otlp": "^0.0.17",
"open-telemetry/transport-grpc": "^0.0.17",
"spiral-packages/cqrs": "^2.0",
"spiral-packages/event-bus": "^2.2",
"spiral/framework": "^3.7",
Expand All @@ -33,6 +35,7 @@
"spiral/roadrunner-bridge": "^3.0"
},
"require-dev": {
"spiral/dumper": "^3.0",
"spiral/testing": "^2.3",
"spiral-packages/database-seeder": "^2.1",
"symfony/http-client": "^6.0"
Expand Down
11 changes: 10 additions & 1 deletion cinema/.rr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.7'
version: '3.0'

rpc:
listen: tcp://0.0.0.0:6001
Expand Down Expand Up @@ -52,3 +52,12 @@ metrics:
status:
address: 127.0.0.1:2114
unavailable_status_code: 503

otel:
insecure: true
compress: false
client: http
exporter: otlp
service_name: rr-cinema
service_version: 1.0.0
endpoint: collector:4318
2 changes: 2 additions & 0 deletions cinema/app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Spiral\Boot\Bootloader\CoreBootloader;
use Spiral\Bootloader as Framework;
use Spiral\Cqrs\Bootloader\CqrsBootloader;
use Spiral\Debug\Bootloader\DumperBootloader;
use Spiral\DotEnv\Bootloader as DotEnv;
use Spiral\EventBus\Bootloader\EventBusBootloader;
use Spiral\Events\Bootloader\EventsBootloader;
Expand All @@ -27,6 +28,7 @@ class App extends Kernel
{
protected const SYSTEM = [
CoreBootloader::class,
DumperBootloader::class,
TokenizerBootloader::class,
DotEnv\DotenvBootloader::class,
];
Expand Down
3 changes: 3 additions & 0 deletions cinema/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"php": ">=8.1",
"ext-mbstring": "*",
"doctrine/collections": "^1.6",
"open-telemetry/exporter-otlp": "^0.0.17",
"open-telemetry/transport-grpc": "^0.0.17",
"spiral/cycle-bridge": "^v2.5",
"spiral-packages/cqrs": "^2.0",
"spiral-packages/event-bus": "^2.2",
Expand All @@ -35,6 +37,7 @@
"spiral/roadrunner-bridge": "^3.0"
},
"require-dev": {
"spiral/dumper": "^3.0",
"spiral/testing": "^2.3",
"spiral-packages/database-seeder": "^2.1",
"symfony/http-client": "^6.0"
Expand Down
Loading

0 comments on commit c75128a

Please sign in to comment.