-
Notifications
You must be signed in to change notification settings - Fork 19
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
Introduced named JQ filters to cover most common filters and simplify the definition of the weaver.yaml
config file.
#211
Comments
I'd like to start working on this. I'll keep you posted about my progress in the next few days. |
Thanks! For your information, I am currently working on #230 . Please act as if it doesn’t exist, and we’ll find a way to merge the two PRs. |
As an alternative, I'd like to suggest pre-populating data in both the JQ and jinja contexts. I.e. I'd still be great to have some filters to filter based on stability which is dynamic, but that's a much smaller concern. The benefit: people don't even need to write |
@lmolkova, @jsuereth I like the idea. We can make the definition of the JQ filter optional and generate a predefined version of the resolved registry that presents an organization of groups by signal types. We still need to define more precisely the exact organization of these groups, such as how they are sorted, whether we support certain filtering parameters, and so on. We can implement this without breaking what already exists. |
@lmolkova, @jsuereth What about defining those groups as follow:
Similar predefined groups could be created for spans. @lmolkova I'm not sure what you mean by |
I've been digging around looking for the right files in the right directory to change. I don't know where yet. After thinking about both the original proposal and alternatives, I actually wonder if "doing nothing" at the moment is the right approach. Meantime, I've noticed some typos and repetition in docs. I will submit a PR to fix that while mulling this over a bit more. |
@haidong I agree, it's better to mature this idea first before implementing any alternatives. |
Closed because we decided to follow a different approach, see #246 |
Motivation
JQ is a very powerful language for expressing filtering, projections, sorting, and grouping, but the learning curve to master it is significant. In most scenarios, documentation and code authors will reuse existing JQ expressions, and the definition of new JQ filters will be uncommon and reserved for advanced Weaver developers.
Proposal
We propose to introduce named JQ expressions that can be directly referenced in the weaver.yaml configuration files. A catalog of the most common JQ expressions will also be defined in an extensible way.
Currently, we have complex JQ expression like these ones:
We could create a catalog of the most common JQ expressions and assign a name to each entry (see below). A default catalog will be provided by Weaver, but users should also be able to extend it with their own filters. More details on the hierarchical definition of the Weaver configuration in #230.
With this catalog, the
weaver.yaml
configuration file will be:Important note: The exact content of the predefined JQ filters catalog is not yet in its final state.
Related Issues
The text was updated successfully, but these errors were encountered: