Skip to content

Commit 90208c3

Browse files
Merge b4ef5ef into 0004636
2 parents 0004636 + b4ef5ef commit 90208c3

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

ydb/docs/en/core/recipes/ydb-sdk/debug-jaeger.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
```

ydb/docs/ru/core/recipes/ydb-sdk/debug-jaeger.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,21 @@
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+
```

0 commit comments

Comments
 (0)