Skip to content

Commit 14883aa

Browse files
committed
Cs fixer
1 parent a3679c1 commit 14883aa

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/FilebeatContextProcessor.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ public function __invoke(LogRecord $record): LogRecord
2121

2222
$record->extra = array_merge($record->extra, self::traceExtras());
2323

24-
25-
2624
if (isset($record->context['exception']) && $record->context['exception'] instanceof Throwable) {
2725
$record->extra = array_merge($record->extra, self::errorExtras($record->context['exception']));
2826
}
@@ -81,26 +79,26 @@ public static function phpExtras(): array
8179

8280
public function traceExtras(): array
8381
{
84-
if(class_exists(\OpenTelemetry\Context\Context::class)){
82+
if (class_exists(\OpenTelemetry\Context\Context::class)) {
8583
$context ??= \OpenTelemetry\Context\Context::getCurrent();
8684
$spanContext = \OpenTelemetry\API\Trace\Span::fromContext($context)->getContext();
85+
8786
return [
8887
'trace' => [
8988
'id' => $spanContext->getTraceId(),
90-
]
89+
],
9190
];
9291
}
9392

94-
if(class_exists(\Elastic\Apm\ElasticApm::class)) {
93+
if (class_exists(\Elastic\Apm\ElasticApm::class)) {
9594
$traceId = \Elastic\Apm\ElasticApm::getCurrentTransaction()->getTraceId();
9695

9796
return [
9897
'trace' => [
9998
'id' => $traceId,
100-
]
99+
],
101100
];
102101
}
103102

104-
105103
}
106104
}

0 commit comments

Comments
 (0)