-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move TextMapPropagatorFactoryInterface to SDK
reorganise extension propagator factories into SDK, and add a deptrac rule to allow SDK->Extension dependency. Add PackageDependency attribute to the SDK-housed extension propagator factories.
- Loading branch information
Showing
23 changed files
with
96 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ deptrac: | |
SDK: | ||
- +API | ||
- ConfigSDK | ||
- Extension | ||
- SemConv | ||
- PsrHttp | ||
- HttpPlug | ||
|
34 changes: 34 additions & 0 deletions
34
src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorCloudTrace.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Config\SDK\ComponentProvider\Propagator; | ||
|
||
use Nevay\SPI\ServiceProviderDependency\PackageDependency; | ||
use OpenTelemetry\Config\SDK\Configuration\ComponentProvider; | ||
use OpenTelemetry\Config\SDK\Configuration\ComponentProviderRegistry; | ||
use OpenTelemetry\Config\SDK\Configuration\Context; | ||
use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface; | ||
use OpenTelemetry\Extension\Propagator\CloudTrace\CloudTracePropagator; | ||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; | ||
use Symfony\Component\Config\Definition\Builder\NodeBuilder; | ||
|
||
/** | ||
* @implements ComponentProvider<TextMapPropagatorInterface> | ||
*/ | ||
#[PackageDependency('open-telemetry/extension-propagator-cloudtrace', '^0.0.4')] | ||
final class TextMapPropagatorCloudTrace implements ComponentProvider | ||
{ | ||
/** | ||
* @param array{} $properties | ||
*/ | ||
public function createPlugin(array $properties, Context $context): TextMapPropagatorInterface | ||
{ | ||
return CloudTracePropagator::getInstance(); | ||
} | ||
|
||
public function getConfig(ComponentProviderRegistry $registry, NodeBuilder $builder): ArrayNodeDefinition | ||
{ | ||
return $builder->arrayNode('cloudtrace'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/Context/Propagation/TextMapPropagatorFactoryInterface.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\SDK\Propagation; | ||
|
||
use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface; | ||
use OpenTelemetry\SDK\Common\Services\SpiLoadableInterface; | ||
|
||
interface TextMapPropagatorFactoryInterface extends SpiLoadableInterface | ||
{ | ||
public function create(): TextMapPropagatorInterface; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters