Skip to content

Commit

Permalink
Merge pull request #50 from opentracing/minor_fixes_in_docs
Browse files Browse the repository at this point in the history
Minor fixes in documentation.
  • Loading branch information
jcchavezs authored Feb 19, 2018
2 parents c6c586f + 60b46a9 commit 80012b4
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 13 deletions.
9 changes: 5 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ e.g.
Fixes #1
Closes #2
-->
# Fixes #

### Short description of what this PR does:
-
-

### Checklist
- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
Expand All @@ -18,6 +21,4 @@ Closes #2
- [ ] I have added necessary documentation about the functionality in the appropriate .md file
- [ ] I have added in line documentation to the code I modified

### Short description of what this PR does:
-
-
Closes #
7 changes: 7 additions & 0 deletions src/OpenTracing/Exceptions/InvalidReferenceArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
*/
final class InvalidReferenceArgument extends InvalidArgumentException
{
/**
* @return InvalidReferenceArgument
*/
public static function forEmptyType()
{
return new self('Reference type can not be an empty string');
}

/**
* @param mixed $context
* @return InvalidReferenceArgument
*/
public static function forInvalidContext($context)
{
return new self(sprintf(
Expand Down
7 changes: 7 additions & 0 deletions src/OpenTracing/Exceptions/InvalidReferencesSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
*/
final class InvalidReferencesSet extends DomainException
{
/**
* @param string $message
* @return InvalidReferencesSet
*/
public static function create($message)
{
return new self($message);
}

/**
* @return InvalidReferencesSet
*/
public static function forMoreThanOneParent()
{
return new self('Span can not have more than one parent, either one as child_of or either one as follows_from');
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTracing/Exceptions/InvalidSpanOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
final class InvalidSpanOption extends InvalidArgumentException
{
/**
* @return InvalidSpanOption
*/
public static function forIncludingBothChildOfAndReferences()
{
return new self('Either "childOf" or "references" options are accepted but not both.');
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTracing/Exceptions/SpanContextNotFound.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*/
final class SpanContextNotFound extends DomainException
{
/**
* @return SpanContextNotFound
*/
public static function create()
{
return new self('SpanContext not found in extract carrier');
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTracing/GlobalTracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function set(Tracer $tracer)
public static function get()
{
if (self::$instance === null) {
self::$instance = Tracer::create();
self::$instance = NoopTracer::create();
}

return self::$instance;
Expand Down
2 changes: 0 additions & 2 deletions src/OpenTracing/Scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/**
* A {@link Scope} formalizes the activation and deactivation of a {@link Span}, usually from a CPU standpoint.
*
* <p>
* Many times a {@link Span} will be extant (in that {@link Span#finish()} has not been called) despite being in a
* non-runnable state from a CPU/scheduler standpoint. For instance, a {@link Span} representing the client side of an
* RPC will be unfinished but blocked on IO while the RPC is still outstanding. A {@link Scope} defines when a given
Expand All @@ -17,7 +16,6 @@ interface Scope
* Mark the end of the active period for the current thread and {@link Scope},
* updating the {@link ScopeManager#active()} in the process.
*
* <p>
* NOTE: Calling {@link #close} more than once on a single {@link Scope} instance leads to undefined
* behavior.
*/
Expand Down
1 change: 0 additions & 1 deletion src/OpenTracing/ScopeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function activate(Span $span);
* Return the currently active {@link Scope} which can be used to access the currently active
* {@link Scope#getSpan()}.
*
* <p>
* If there is an {@link Scope non-null scope}, its wrapped {@link Span} becomes an implicit parent
* (as {@link References#CHILD_OF} reference) of any
* newly-created {@link Span} at {@link Tracer.SpanBuilder#startActive(boolean)} or {@link SpanBuilder#start()}
Expand Down
10 changes: 5 additions & 5 deletions src/OpenTracing/Tracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ public function extract($format, $carrier);
* Allow tracer to send span data to be instrumented.
*
* This method might not be needed depending on the tracing implementation
* but one should make sure this method is called after the request is finished.
* As an implementor, a good idea would be to use register_shutdown_function
* or fastcgi_finish_request in order to not to delay the end of the request to the client.
* but one should make sure this method is called after the request is delivered
* to the client.
*
* @see register_shutdown_function()
* @see fastcgi_finish_request()
* As an implementor, a good idea would be to use {@see register_shutdown_function}
* or {@see fastcgi_finish_request} in order to not to delay the end of the request
* to the client.
*/
public function flush();
}

0 comments on commit 80012b4

Please sign in to comment.