-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
599 additions
and
143 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
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,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Example; | ||
|
||
use OpenTelemetry\SDK\Resource\ResourceDetectorFactoryInterface; | ||
use OpenTelemetry\SDK\Resource\ResourceDetectorInterface; | ||
|
||
class TestResourceDetectorFactory implements ResourceDetectorFactoryInterface | ||
{ | ||
|
||
public function create(): ResourceDetectorInterface | ||
{ | ||
return new TestResourceDetector(); | ||
} | ||
|
||
public function type(): string | ||
{ | ||
return 'test'; | ||
} | ||
|
||
public function priority(): int | ||
{ | ||
return 0; | ||
} | ||
} |
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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\API\Baggage\Propagation; | ||
|
||
use OpenTelemetry\Context\Propagation\TextMapPropagatorFactoryInterface; | ||
use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface; | ||
|
||
class BaggagePropagatorFactory implements TextMapPropagatorFactoryInterface | ||
{ | ||
public function create(): TextMapPropagatorInterface | ||
{ | ||
return BaggagePropagator::getInstance(); | ||
} | ||
|
||
public function type(): string | ||
{ | ||
return 'baggage'; | ||
} | ||
|
||
public function priority(): int | ||
{ | ||
return 0; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/API/Trace/Propagation/TraceContextPropagatorFactory.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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\API\Trace\Propagation; | ||
|
||
use OpenTelemetry\Context\Propagation\TextMapPropagatorFactoryInterface; | ||
use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface; | ||
|
||
class TraceContextPropagatorFactory implements TextMapPropagatorFactoryInterface | ||
{ | ||
public function create(): TextMapPropagatorInterface | ||
{ | ||
return TraceContextPropagator::getInstance(); | ||
} | ||
|
||
public function type(): string | ||
{ | ||
return 'tracecontext'; | ||
} | ||
|
||
public function priority(): int | ||
{ | ||
return 0; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Context\Propagation; | ||
|
||
class NoopTextMapPropagatorFactory implements TextMapPropagatorFactoryInterface | ||
{ | ||
public function create(): TextMapPropagatorInterface | ||
{ | ||
return NoopTextMapPropagator::getInstance(); | ||
} | ||
|
||
public function type(): string | ||
{ | ||
return 'none'; | ||
} | ||
|
||
public function priority(): int | ||
{ | ||
return 0; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Context/Propagation/TextMapPropagatorFactoryInterface.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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenTelemetry\Context\Propagation; | ||
|
||
interface TextMapPropagatorFactoryInterface | ||
{ | ||
public function create(): TextMapPropagatorInterface; | ||
public function type(): string; | ||
public function priority(): int; | ||
} |
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
Oops, something went wrong.