diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba8f817d..6f0df922a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Added experimental package `spans` with tracing adapter interfaces for OpenTelemetry, OpenTracing, etc. * Added `db.Topic().DescribeTopicConsumer()` method for displaying consumer information * Marked as deprecated options `ydb.WithDatabase(database)` and `ydb.WithEndpoint(endpoint)` diff --git a/spans/spans.go b/spans/spans.go index 515096b67..f310c2c32 100644 --- a/spans/spans.go +++ b/spans/spans.go @@ -8,8 +8,13 @@ import ( ) type ( + // KeyValue is key-value attribute for attaching into span KeyValue = kv.KeyValue - Span interface { + + // Span is an interface of spans in specific tracing system + // + // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental + Span interface { TraceID() (_ string, valid bool) Link(link Span, attributes ...KeyValue) @@ -20,6 +25,10 @@ type ( End(attributes ...KeyValue) } + + // Adapter is interface of specific tracing system adapters + // + // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental Adapter interface { trace.Detailer