greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

Adopt span tracing in hot code path

Open waynexia opened this issue 2 years ago • 6 comments

What problem does the new feature solve?

Log and metrics are already integrated into our code base. Span tracing is another tool to further improve observability. We can start the adoption from insert/query/server modules first.

What does the feature do?

Add tracing::instrument to some critical paths

Implementation challenges

No response

waynexia avatar Feb 16 '23 11:02 waynexia

Important notes about tracing crate:

  1. It's not stable yet
  2. It has relatively poor performance
  3. It's not fully compatible with opentelemetry libraries

morigs avatar Mar 06 '23 16:03 morigs

Maybe minitrace is also a good choice.

v0y4g3r avatar Apr 14 '23 12:04 v0y4g3r

Maybe minitrace is also a good choice.

100x❕

waynexia avatar Apr 14 '23 12:04 waynexia

IIRC @zhongzc is the author of minitrace. Do you have some ideas we can move forward this issue?

Otherwise, I'd prefer move this issue to Ideas until we found concrete work items.

tisonkun avatar Apr 09 '24 06:04 tisonkun

We end up using tracing to instrument the code for better integration with existing tracking-logging infrastructure. But there are still some problems like post-sampling, multi-parent span etc.

waynexia avatar Apr 09 '24 06:04 waynexia

there are still some problems like post-sampling, multi-parent span

This is precisely the realm of minitrace. If it is critical to the need, switching to minitrace is an option, and I would be happy to provide guidance on how to use it.

zhongzc avatar Apr 09 '24 06:04 zhongzc