Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query execution observability #106

Open
yeya24 opened this issue Nov 1, 2022 · 15 comments
Open

Query execution observability #106

yeya24 opened this issue Nov 1, 2022 · 15 comments

Comments

@yeya24
Copy link
Contributor

yeya24 commented Nov 1, 2022

One thing I feel quite limited is the query logger from the original promql engine. It would be great to have observabilities for the queries being executed through the engine and we can see each queries duration, the query plan, detailed stats, etc.

Some more features could be also nice and I am not sure whether it is in scope of this project. Things like slow queries, top queries, etc. That's usually built in in some relational databases and it would be really powerful to collect those query stats like https://docs.pingcap.com/tidb/dev/top-sql.

@GiedriusS
Copy link
Member

What do you think about adding a new option for a query such as RecordDuration bool as a starter which would tell the engine to capture the used time by each operator? Then, we could expose it through Explain() 🤔

@fpetkovski
Copy link
Collaborator

I think Explain is meant to be used for printing out the plan, but it should be possible to extend it. We can also surface the information through a different method, like Profile: https://github.com/thanos-community/promql-engine/blob/main/engine/engine.go#L181

@PradyumnaKrishna
Copy link
Contributor

Hello, I would like to work on this as a LFx Mentorship Project.

I have some experience in Golang. I am looking to get more information and resources about Thanos project and this issue, to prepare for LFx Mentorship.

@zeus2611
Copy link

zeus2611 commented Feb 2, 2023

hey @yeya24 @GiedriusS @fpetkovski i would like to contribute to this during lfx mentorship period. I have been working on implementing functions in prom-ql engine in thanos. And, i would like to gain more experience and guidance in my open source journey. I'm looking forward to working with you guys.

@GiedriusS
Copy link
Member

Please apply on the LFX website 🤗

@saswatamcode
Copy link
Member

@ConnectBhawna
Copy link

Hi @GiedriusS @yeya24 @fpetkovski , I am interested in learning about this project and want to work on this project under LFX Mentorship.
Please let me know about any materials or resources that I should learn to get a better understanding of the project and its requirements.

Additionally, I was wondering if there is anything else I can do to get started, such as research and learn about the project from the existing documentation.

@GiedriusS
Copy link
Member

@ConnectBhawna you can try compiling and running Thanos locally as per instructions on https://thanos.io/tip/thanos/getting-started.md/. Then, you can try switching to this engine with --query.promql-engine=thanos and explore the code in this repository.

@120EE0980
Copy link

Helloooo!LFX mentorship brought me here..crossing fingers for great contribution experience.

@J0SAL
Copy link

J0SAL commented Feb 21, 2023

Hello @GiedriusS @yeya24 @fpetkovski,
I would love to work on this project. my profile

Please let me know, of any resources or materials I need to know to understand the project better and help me get started.

I have submitted the application for LFX mentorship!

@douglascamata
Copy link

FYI according to #thanos-dev slack, @PradyumnaKrishna got the mentorship from LFX to work on this project. Thank you all for the interest 🙏

@GiedriusS
Copy link
Member

In my opinion, there are two ways of going around this: embedding observability information into each operator that implements VectorOperator interface (and making ObservableOperator interface that extends VectorOperator and allows extracting o11y info) or passing around some OperatorTracker in each Series and Next call. The latter seems simpler. For example, it allows easily combining certain statistics such as total time taken or memory used. In the former case, we would have to traverse the whole tree again to add up duration or memory used values.

@nishchay-veer
Copy link
Contributor

@saswatamcode Are the applications open for LFX mentorship Term 2 ?

@J0SAL
Copy link

J0SAL commented May 13, 2023

Hello, @GiedriusS, @saswatamcode, I am interested in learning about this project and want to work on this project under LFX Mentorship.
Please let me know about any good first steps or resources that I should learn to get a better understanding of the project and its requirements.
I have submitted my application on the LFX portal

@kanha-gupta
Copy link

Hey @yeya24 @GiedriusS
I am interested to work on this. I wanted to ask if we provide visualization for every feature in GUI or terminal mode ?
Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests