Skip to content

Commit

Permalink
Fixes wording in documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Apr 13, 2018
1 parent ef89cae commit 77c0efa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,23 @@ An example of a linear, two level deep span tree using active spans looks like
this in PHP code:

```php
$root = $tracer->startActiveSpan('php');

$controller = $tracer->startActiveSpan('controller');

$http = $tracer->startActiveSpan('http');
file_get_contents('http://php.net');
$http->close();

$controller->close();
// At dispatcher level
$scope = $tracer->startActiveSpan('request');
...
$scope->close();
```
```php
// At controller level
$scope = $tracer->startActiveSpan('controller');
...
$scope->close();
```

$root->close();
```php
// At RPC calls level
$scope = $tracer->startActiveSpan('http');
file_get_contents('http://php.net');
$scope->close();
```

#### Creating a child span assigning parent manually
Expand Down Expand Up @@ -247,8 +253,8 @@ SpanOptions wrapper object. The following keys are valid:
- `child_of` is an object of type `OpenTracing\SpanContext` or `OpenTracing\Span`.
- `references` is an array of `OpenTracing\Reference`.
- `tags` is an array with string keys and scalar values that represent OpenTracing tags.
- `finish_span_on_close` is a boolean that determines whether a span should be finished when the
scope is closed or not.
- `finish_span_on_close` is a boolean that determines whether a span should be finished or not when the
scope is closed.

```php
$span = $tracer->startActiveSpan('my_span', [
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTracing/Tracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function getScopeManager();
* Tracer::getScopeManager()->getActive()->getSpan(),
* and null will be returned if {@link Scope#active()} is null.
*
* @return ScopedSpan|null
* @return Span|null
*/
public function getActiveSpan();

Expand Down

0 comments on commit 77c0efa

Please sign in to comment.