Skip to content

Commit

Permalink
Add interface for IDs Generator mechanism.
Browse files Browse the repository at this point in the history
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
  • Loading branch information
NathanielRN and anuraaga committed Nov 21, 2020
1 parent 33e0d6c commit ccd5f52
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ release.

## Unreleased

- Add requirement that the SDK allow custom generation of Trace IDs and Span IDs
([#1006](https://github.com/open-telemetry/opentelemetry-specification/pull/1006))

## v0.7.0 (11-18-2020)

New:
Expand Down Expand Up @@ -73,8 +76,8 @@ New:
([#1136](https://github.com/open-telemetry/opentelemetry-specification/pull/1136/))
- Add guidelines for OpenMetrics interoperability
([#1154](https://github.com/open-telemetry/opentelemetry-specification/pull/1154))
- Add requirement that the SDK allow custom generation of Trace IDs and Span IDs
([#1006](https://github.com/open-telemetry/opentelemetry-specification/pull/1006))
- Add OTEL_TRACE_SAMPLER_ARG env variable definition
([#1202](https://github.com/open-telemetry/opentelemetry-specification/pull/1202))

Updates:

Expand Down
11 changes: 11 additions & 0 deletions specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,17 @@ both the `TraceId` and the `SpanId`.
The SDK SHOULD by default randomly generate the bytes for both the `TraceId` and
the `SpanId`.

The SDK MAY provide this functionality by allowing custom implementations of
an interface like `IdsGenerator` below, which provides extension points for two
methods, one to generate a `SpanID` and one to generate a `TraceId`.

```
IdsGenerator {
String generateSpanId()
String generateTraceId()
}
```

### Shutdown

This method provides a way for provider to do any cleanup required.
Expand Down

0 comments on commit ccd5f52

Please sign in to comment.