1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/sdk/trace
Anthony Mirabella 970755bd08
Enable support for externally-defined ID generators (#1363)
* Enable support for externally-defined ID generators

* Moved the SDK's `internal.IDGenerator` interface to the `sdk/trace`
package.
* Added `trace.WithIDGenerator()` `TracerProviderOption`.

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md with PR info

* Address PR feedback:

* Fix IDGenerator godoc comment
* rename type defaultIDGenerator to randomIDGenerator
* rename defIDGenerator() to defaultIDGenerator()

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Rework trace.IDGenerator interface

* NewTraceID() -> NewIDs(ctx)
** Returns both TraceID and SpanID
* NewSpanID() -> NewSpanID(ctx, traceID)
** Returns only SpanID, has access to TraceID
* Both methods now receive a context, from which they may extract
information
* startSpanInternal() updated to receive a context to pass to the ID
generator

* Drop outdated comment from docblock

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
2020-12-09 20:30:32 -05:00
..
attributesmap_test.go Add missing tests for attributesMap (#1337) 2020-11-18 19:15:26 -05:00
attributesmap.go Add missing tests for attributesMap (#1337) 2020-11-18 19:15:26 -05:00
batch_span_processor_test.go Add parent context to SpanProcessor.OnStart (#1333) 2020-11-16 11:45:49 -05:00
batch_span_processor.go Move Version function and code from global to toplevel (#1330) 2020-11-16 09:30:54 -08:00
benchmark_test.go Move tracing code to trace package (#1307) 2020-11-06 17:13:31 -05:00
config.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
doc.go Update README and documentation to better communicate pre-GA state (#1281) 2020-10-29 09:23:13 -07:00
evictedqueue_test.go Update License header for all source files (#586) 2020-03-23 22:41:10 -07:00
evictedqueue.go chore: adds vanity import for files that don't have it. (#1297) 2020-11-04 09:10:58 -08:00
id_generator.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
provider_test.go Add parent context to SpanProcessor.OnStart (#1333) 2020-11-16 11:45:49 -05:00
provider.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
sampling_test.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
sampling.go Move tracing code to trace package (#1307) 2020-11-06 17:13:31 -05:00
simple_span_processor_test.go Move tracing code to trace package (#1307) 2020-11-06 17:13:31 -05:00
simple_span_processor.go Move Version function and code from global to toplevel (#1330) 2020-11-16 09:30:54 -08:00
span_processor_example_test.go Add parent context to SpanProcessor.OnStart (#1333) 2020-11-16 11:45:49 -05:00
span_processor_test.go Add parent context to SpanProcessor.OnStart (#1333) 2020-11-16 11:45:49 -05:00
span_processor.go Add parent context to SpanProcessor.OnStart (#1333) 2020-11-16 11:45:49 -05:00
span.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
trace_go11.go chore: adds vanity import for files that don't have it. (#1297) 2020-11-04 09:10:58 -08:00
trace_nongo11.go chore: adds vanity import for files that don't have it. (#1297) 2020-11-04 09:10:58 -08:00
trace_test.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
tracer.go Enable support for externally-defined ID generators (#1363) 2020-12-09 20:30:32 -05:00
util_test.go Rename *Provider names (#1190) 2020-09-23 18:16:13 -04:00