-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add SpanProcessorInterface, rename ExporterInterface and TransportInterface, add getDescription on SampleInterface as described in specifications * fix failing tests and improve Dockerfile for phan and test in order to use docker caching
- Loading branch information
1 parent
2aeb5d1
commit cf85f7d
Showing
17 changed files
with
113 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/vendor | ||
/.git |
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,26 @@ | ||
<?php | ||
|
||
namespace OpenTelemetry; | ||
|
||
use OpenTelemetry\Tracing\Span; | ||
|
||
interface SpanProcessorInterface | ||
{ | ||
/** | ||
* This method is called when a span is started. | ||
* This method is called synchronously on the thread that started the span, | ||
* therefore it should not block or throw exceptions. | ||
*/ | ||
public function onStart(Span $span): void; | ||
|
||
/** | ||
* This method is called when a span is ended. | ||
* This method is called synchronously on the execution thread, | ||
* therefore it should not block or throw an exception. | ||
*/ | ||
public function onEnd(Span $span): void; | ||
|
||
/* The spec mentions a shutdown() function. We don't see this as necessary; | ||
* if an Exporter needs to clean up, it can use a destructor. | ||
*/ | ||
} |
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 |
---|---|---|
@@ -1,14 +1,25 @@ | ||
<?php | ||
namespace OpenTelemetry\Tracing\Sampler; | ||
|
||
/** | ||
* This interface is used to organize sampling logic. | ||
*/ | ||
interface SamplerInterface | ||
{ | ||
const FLAG_SAMPLED = 1; | ||
|
||
/** | ||
* Returns true if we should sample the request. | ||
* | ||
* @return bool | ||
*/ | ||
public function shouldSample(); | ||
public function shouldSample(): bool; | ||
|
||
/** | ||
* Returns the sampler name or short description with the configuration. | ||
* This may be displayed on debug pages or in the logs. | ||
* Example: "ProbabilitySampler{0.000100}" | ||
* @return string | ||
*/ | ||
public function getDescription(): string; | ||
} |
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