ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
3.69k stars 501 forks source link

Add wilson tracing support in topics #5893

Open robdrynkin opened 1 week ago

robdrynkin commented 1 week ago

Reasoning: Traces will help us to investigate topics latency issues Current state: Tracing already supported in KV tablet

Usually traceIds are sent via grpc request, but it is not possible in topcis case, because there are only one grpc call per session. One of solutions could be to send trace id in message in the grpc stream

UgnineSirdis commented 1 week ago

Maybe it will be useful to add field string trace_id to WriteRequest: https://github.com/ydb-platform/ydb/blob/main/ydb/public/api/protos/ydb_topic.proto#L145 Usage of this field is like in trace header: https://github.com/ydb-platform/ydb/blob/3d068320db1f2b697ffcbb4f0d541d318e52c5fb/ydb/core/grpc_services/grpc_request_proxy.cpp#L433