Skip to content

Commit

Permalink
Add more precise description
Browse files Browse the repository at this point in the history
  • Loading branch information
XSAM committed Oct 9, 2020
1 parent 7e39f65 commit 91be904
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ instrumentation libraries from capturing metrics by the same name.

### Shutdown

Exporting pending metrics.
Shuts down the provider.

The `Shutdown` API MAY be implemented by invoking `Shutdown` within internal processors.
The `Shutdown` API provides a way for provider to do any cleanup required.

### Global Meter provider

Expand Down
4 changes: 2 additions & 2 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ number of `TracerProvider` instances.
The `TracerProvider` MUST provide the following functions:

- Get a `Tracer`
- Shutdown the provider (exporting pending spans)
- Shuts down the provider

That `Tracer()` API MUST accept the following parameters:

Expand Down Expand Up @@ -126,7 +126,7 @@ the tracer could, for example, do a look-up with its name+version in a map in
the `TracerProvider`, or the `TracerProvider` could maintain a registry of all
returned `Tracer`s and actively update their configuration if it changes.

The `Shutdown` API MAY be implemented by invoking `Shutdown` within internal processors.
The `Shutdown` API provides a way for provider to do any cleanup required.

## Tracing Context Utilities

Expand Down
22 changes: 20 additions & 2 deletions specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<summary>Table of Contents</summary>

* [Sampling](#sampling)
* [Tracer Creation](#tracer-creation)
* [Tracer Provider](#tracer-provider)
* [Additional Span Interfaces](#additional-span-interfaces)
* [Span Processor](#span-processor)
* [Span Exporter](#span-exporter)
Expand Down Expand Up @@ -180,7 +180,9 @@ Optional parameters:
|present|false|true|`localParentSampled()`|
|present|false|false|`localParentNotSampled()`|

## Tracer Creation
## Tracer Provider

### Tracer Creation

New `Tracer` instances are always created through a `TracerProvider` (see
[API](api.md#tracerprovider)). The `name` and `version` arguments
Expand All @@ -201,6 +203,22 @@ Note: Implementation-wise, this could mean that `Tracer` instances have a
reference to their `TracerProvider` and access configuration only via this
reference.

### Shutdown

`Shutdown` SHOULD be called only once for each `TracerProvider` instance. After
the call to `Shutdown`, subsequent calls to get `Tracer` are not allowed. SDKs
SHOULD ignore these calls gracefully, if possible.

`Shutdown` SHOULD provide a way to let the caller know whether it succeeded,
failed or timed out.

`Shutdown` SHOULD complete or abort within some timeout. `Shutdown` can be
implemented as a blocking API or an asynchronous API which notifies the caller
via a callback or an event. Language library authors can decide if they want to
make the shutdown timeout configurable.

The `Shutdown` API MAY be implemented by invoking `Shutdown` within internal processors.

## Additional Span Interfaces

The [API-level definition for Span's interface](api.md#span-operations)
Expand Down

0 comments on commit 91be904

Please sign in to comment.