Skip to content

Commit

Permalink
Fix TelemetryProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Jan 2, 2024
1 parent 974670b commit 7d08cac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Telemetry/src/Monolog/TelemetryProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public function __construct(

public function __invoke(LogRecord|array $record): array
{
if ($record instanceof LogRecord) {
$record = $record->toArray();

Check warning on line 22 in src/Telemetry/src/Monolog/TelemetryProcessor.php

View check run for this annotation

Codecov / codecov/patch

src/Telemetry/src/Monolog/TelemetryProcessor.php#L22

Added line #L22 was not covered by tests
}

$tracer = $this->container->get(TracerInterface::class);
\assert($tracer instanceof TracerInterface);

Expand Down

0 comments on commit 7d08cac

Please sign in to comment.