File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,21 @@ Below are examples of the code enabling Jaeger tracing in different {{ ydb-short
134134 ```
135135
136136{% endlist %}
137+
138+ {{ ydb-short-name }} Go SDK now outputs the Jaeger Trace ID to the logs.
139+ This makes it easier to correlate log entries with traces in Jaeger during debugging and performance analysis.
140+ To ensure this functionality works correctly, it’s important to connect the adapters in a specific order — first ` otel ` , then ` logger ` .
141+
142+ ``` go
143+ import (
144+ ydbOtel " github.com/ydb-platform/ydb-go-sdk-otel"
145+ ydbZap " github.com/ydb-platform/ydb-go-sdk-zap"
146+ )
147+ ...
148+ db , err := ydb.Open (ctx,
149+ os.Getenv (" YDB_CONNECTION_STRING" ),
150+ ydbOtel.WithTraces (tracing.WithDetails (trace.DetailsAll )),
151+ ydbZap.WithTraces (logger, trace.DetailsAll ),
152+ )
153+ ...
154+ ```
Original file line number Diff line number Diff line change 135135
136136
137137{% endlist %}
138+
139+ {{ ydb-short-name }} Go SDK теперь выводит Jaeger Trace ID в логи.
140+ Это позволяет проще сопоставлять записи логов с трэйсами в Jaeger при отладке и анализе производительности.
141+ Чтобы эта функциональность работала корректно, важно подключать адаптеры в определённом порядке — сначала ` otel` потом ` logger` .
142+
143+ ` ` ` go
144+ import (
145+ ydbOtel "github.com/ydb-platform/ydb-go-sdk-otel"
146+ ydbZap "github.com/ydb-platform/ydb-go-sdk-zap"
147+ )
148+ ...
149+ db, err := ydb.Open(ctx,
150+ os.Getenv("YDB_CONNECTION_STRING"),
151+ ydbOtel.WithTraces(tracing.WithDetails(trace.DetailsAll)),
152+ ydbZap.WithTraces(logger, trace.DetailsAll),
153+ )
154+ ...
155+ ` ` `
You can’t perform that action at this time.
0 commit comments