Skip to content

opentelemetry_span_log propagate original trace_id (and initial_query_id) for Distributed queries #77375

@UnamedRus

Description

@UnamedRus

Company or project name

No response

Use case

Correlate queries over Distributed tables/cluster functions

Describe the solution you'd like

leaf queries will use trace_id of parent query on node initiator.

{'clickhouse.thread_id':'54561','db.statement':'SELECT ......;','clickhouse.query_id':'d0e4d1ae-09e8-4074-86e9-2fac7475b115','clickhouse.initial_query_id':'3b9d5438-9d9b-51e1-702a-d2b794cdd352','clickhouse.query_status':'QueryFinish','clickhouse.read_rows':'1101019534','clickhouse.read_bytes':'48725526358','clickhouse.memory_usage':'7072537'}

It also would be nice to "sync" clock across nodes. (or to get their difference across instances)
May be, it can be done via ProfileEvent in query_log

Also, if opentelemetry_span_log on opentelemetry_trace_processors make spans for individual processors, can we connect spans from block produced on remote instance to it's processing on original node.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions