-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(JSON): JSON Body Metadata #9593
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
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 3. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the query, it seems to be failing.
Also this feels like the body_json_keys should be a part of metadata package instead and should also use FieldKeySelector struct . @srikanthccv what are your thoughts on this
Also please update the PR name and description as this PR is more than utils and it has all the main metadata functions required for JSON querying to work.
I checked the main PR to get some prior context and I agree. What do you think about keeping How about we make The way I view the work you're doing is that it's laying the foundation for all JSON work going forward. As such, it's better to keep |
Can not be stateless
Will do this later, right now JSONQueryBuilder is acting as a separate branch code that's flag control, it doesn't fit into the current rhythm of QB being stateless, QB would need large changes that I should not touch right now, which I had evaluated at the very start, hence built it in such way My plan is to first overhaul Logs QB, and then based on chaos there afterwards I'll might touch the main QB |
|
Please help me understand why can't it be stateless. |
It needs to know types for each paths existing in warehouse to form the actual queries. e.g. Input value is string but the operator is Contains, existing type is Array of String, the operation would be to look into array of string contains the value give. This type of decision making is required in-flight. |
|
That's what we do in the condition builder + field mapper already. Prepare the right query based on the FieldContext + FieldDataType + Materialised info of the each that it gets. Can you please give an example why can't be the same done that it requires a state management. |
I just iterated over one above. Will give one more example. something.something1[].name something1 here could be a simple Array(JSON) or an Array(Dynamic) based on the state it will form a query to just look into Array(JSON) if it's Array(Dynamic) it will then filter JSON array out of Dynamic and then dive in for name field, if both it will look both cases |
|
I get that, but what I am not able to follow is why there is a need to maintain a state. The relevant context would be available as part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
π Summary
These changes includes some basic utilities that will be used in Body JSON Query Builder
β Changes
π Related Issues
Closes #
π Checklist
π Notes for Reviewers
Note
Introduces body JSON metadata (paths, values, indexes, promotions) and enables body-context JSON querying across logs, with refactored builders/types, new tests, and a collector dependency bump.
telemetrymetadata: list body JSON paths, values, indexes; detect promoted paths; shared table constants.FieldContextBodyandbody.prefix in filters, functions, and aggregations; removeJsonBodyPrefixplumbed arg.BODY_JSON_QUERY_ENABLEDflag; tweakPreparedWhereClausefields; improve LIKE warnings.JSONDataType, indexes) and extendFieldDataType; addFieldContextBodyandBodyJSONStringSearchPrefix.signoz-otel-collectortov0.129.10-rc.9.Written by Cursor Bugbot for commit 1bb60bb. This will update automatically on new commits. Configure here.