Code Monkey home page Code Monkey logo

Comments (5)

GiedriusS avatar GiedriusS commented on July 21, 2024

Please see https://github.com/thanos-io/promql-engine/pull/325/files and others for a previous attempt at this. We either want to have an improved Select() interface or pass these hints through context.Context somehow.

from thanos.

christopherzli avatar christopherzli commented on July 21, 2024

Hi @GiedriusS thanks so much for the pointer, do you know why it is not merged into upstream?

from thanos.

GiedriusS avatar GiedriusS commented on July 21, 2024

There are still some missing things: https://github.com/thanos-io/promql-engine/pull/325/files#diff-5b6024dfabe0bc120c9efaad778c55c7283d643c0ad2882eb7e47effa7aac384R24. Also, that PR needs some tests.

There was also a suggestion to just pass Select() metadata through context.Context. Perhaps it could be a simple map[string]any underneath with some getters/setters. Maybe it would be simpler to implement compared to that PR?

from thanos.

jnyi avatar jnyi commented on July 21, 2024

Yep, you could consider passing a function into ctx so no need to disrupt the query engine itself, reference about how M3 does that:

https://github.com/databricks/m3/blob/db_main/src/query/api/v1/handler/prom/read.go#L270-L278

and

https://github.com/databricks/m3/blob/db_main/src/query/api/v1/handler/prometheus/handleroptions/headers.go#L121-L123

from thanos.

christopherzli avatar christopherzli commented on July 21, 2024

published a PR here: #7390

from thanos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.