GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.32k stars 313 forks source link

Add debug level traces in mito engine #4480

Open WenyXu opened 3 months ago

WenyXu commented 3 months ago

What type of enhancement is this?

Other

What does the enhancement do?

GreptimeDB exports all collected spans using the gRPC-based OTLP protocol (see also).

However, current traces are still not good enough for performance debugging, consider adding more detailed spans in the mito engine. e.g., The time reading bytes from S3, The time building reader, etc.

Implementation challenges

No response

Michaelin007 commented 2 months ago

Hi @WenyXu , I would like to work on this. Can you provide more insight into the problem?

WenyXu commented 2 months ago

Hi @WenyXu , I would like to work on this. Can you provide more insight into the problem?

Hey, I suggest starting with our tracing tutorials. Run a query and check out the traces—you'll probably notice they’re a bit too coarse. For example, we don't really see how much time is spent on things like downloading files or building readers. This issue is about improving that by adding more detailed, debug-level traces in the Mito engine, especially for queries.