Giter VIP home page Giter VIP logo

Comments (6)

dilyevsky avatar dilyevsky commented on June 9, 2024

Looks like this is still relevant? Can I take this?

from tsdb.

fabxc avatar fabxc commented on June 9, 2024

Sure, that would be great.
I think we converged towards adding new matcher types for sets and prefixes to prometheus/tsdb and then add separate functions to actually disassemble a regex and creating set and prefix matcher types out of those.

from tsdb.

dilyevsky avatar dilyevsky commented on June 9, 2024

So I just got to this... I can see the first part (direct posting lookup for equal matcher) is done. What are "set matchers" supposed to be exactly? Can you point me to the discussion?

Also I assume you mean some simple heuristic for regex prefix extraction? e.g. only optimize regex or the form "^abc" or something like that? I tried to read up on regex index search optimization but couldn't find much info...

from tsdb.

gouthamve avatar gouthamve commented on June 9, 2024

Hey, so it was decided that we should not add optimisations to the regexp-matcher but rather create new matchers and have prometheus parse its queries and send in the correct matcher kind into tsdb. For example if ^abc was given to prometheus, then it will send in NotMatcher(abc).

So one thing you can do is to add a prefix matcher like the Equal and Regexp matchers.

For example, the prefix matcher with the prefix: abc will match the strings abcd, abccc and so on.

Once this matcher is added, we can actually optimise the queries that are like {path~="/users"} in prometheus to detect prefix matching and send it down to tsdb.

Let me know if anything is unclear or if you have any doubts while implementing.

from tsdb.

cstyan avatar cstyan commented on June 9, 2024

Should this still be open? Looks like the prefix matcher was added.

from tsdb.

krasi-georgiev avatar krasi-georgiev commented on June 9, 2024

Yes I think can be closed now.

from tsdb.

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.