Skip to content

Commit a6e6a64

Browse files
authored
Merge pull request #1212: Fix a bug with telemetry info not propagating into log records
2 parents 2fcc495 + 917175f commit a6e6a64

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## Unreleased
4+
5+
- **Bug Fixes**
6+
- [spiral/telemetry] Telemetry info was not propagated into log records
7+
38
## 3.15.0 - 2025-01-24
49

510
- Core

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"mockery/mockery": "^1.6.12",
143143
"phpunit/phpunit": "^10.5.41",
144144
"ramsey/collection": "^1.3",
145-
"rector/rector": "~2.0.7",
145+
"rector/rector": "~2.0.9",
146146
"spiral/code-style": "^2.2.2",
147147
"spiral/nyholm-bridge": "^1.3",
148148
"spiral/testing": "^2.8.3",

rector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
2424
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitSelfCallRector;
2525
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
26+
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertCountWithZeroToAssertEmptyRector;
2627
use Rector\TypeDeclaration\Rector\Closure\AddClosureNeverReturnTypeRector;
2728
use Rector\TypeDeclaration\Rector\Closure\ClosureReturnTypeRector;
2829
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
@@ -125,6 +126,9 @@
125126
MakeInheritedMethodVisibilitySameAsParentRector::class => [
126127
__DIR__ . '/src/Models/tests/PublicEntity.php',
127128
],
129+
130+
// Explicit behavior is more preferable
131+
AssertCountWithZeroToAssertEmptyRector::class,
128132
])
129133
->withPhpSets(php81: true)
130134
->withPreparedSets(deadCode: true, phpunitCodeQuality: true)

src/Telemetry/src/Monolog/TelemetryProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
use Monolog\LogRecord;
88
use Monolog\Processor\ProcessorInterface;
99
use Psr\Container\ContainerInterface;
10+
use Spiral\Core\Attribute\Proxy;
1011
use Spiral\Telemetry\TracerInterface;
1112

1213
final class TelemetryProcessor implements ProcessorInterface
1314
{
1415
public function __construct(
15-
private readonly ContainerInterface $container,
16+
#[Proxy] private readonly ContainerInterface $container,
1617
) {}
1718

1819
/**

0 commit comments

Comments
 (0)