Skip to content

Commit

Permalink
Merge pull request #13 from jj22ee/sample-app-fix
Browse files Browse the repository at this point in the history
Update Sample app and fix Integration Test workflow
  • Loading branch information
wangzlei authored Jan 9, 2024
2 parents 5314e5d + e0b6bbd commit 28d6723
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions SampleApp/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ services:
- '../src/Entity/'
- '../src/Kernel.php'

App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']

# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
10 changes: 8 additions & 2 deletions SampleApp/src/Controller/AwsSdkInstrumentationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
use Aws\S3\S3Client;

use OpenTelemetry\API\Trace\SpanKind;
use OpenTelemetry\API\Common\Signal\Signals;
use OpenTelemetry\API\Signals;
use OpenTelemetry\API\LoggerHolder;

use OpenTelemetry\Contrib\Otlp\OtlpUtil;
use OpenTelemetry\Contrib\Otlp\SpanExporter;
Expand All @@ -24,7 +25,12 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

\OpenTelemetry\API\Common\Log\LoggerHolder::set(new \Monolog\Logger('grpc', [new \Monolog\Handler\StreamHandler('php://stderr')]));
use Monolog\Handler\StreamHandler;
use Monolog\Logger;

LoggerHolder::set(
new Logger('grpc', [new StreamHandler('php://stderr')])
);

class AwsSdkInstrumentationController
{
Expand Down

0 comments on commit 28d6723

Please sign in to comment.