-
Notifications
You must be signed in to change notification settings - Fork 153
ingest events; instrument quickwit ingest and search functions #1058
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
base: dev
Are you sure you want to change the base?
Conversation
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.
Important
Looks good to me! 👍
Reviewed everything up to 830167e in 42 seconds. Click for details.
- Reviewed
36lines of code in1files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. app-server/src/quickwit/client.rs:6
- Draft comment:
New tracing import: Ensure it’s ordered/grouped consistently with other imports. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. app-server/src/quickwit/client.rs:69
- Draft comment:
Instrumentation added on 'ingest' function. Skipping 'self' and 'spans' is appropriate to avoid logging large data, but consider if 'index_id' should also be explicitly mentioned. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. app-server/src/quickwit/client.rs:89
- Draft comment:
Instrumentation on 'search_spans' logs the 'query_body' parameter. Verify that it doesn’t expose sensitive or overly large data. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. app-server/src/quickwit/client.rs:121
- Draft comment:
Instrumentation on 'build_doc_batch' skips 'spans'. Ensure this is intentional to prevent logging voluminous data. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_sOHOuf0xuqfRc7V5
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Caution
Changes requested ❌
Reviewed a56e9fd in 2 minutes and 31 seconds. Click for details.
- Reviewed
399lines of code in9files - Skipped
0files when reviewing. - Skipped posting
8draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. app-server/src/quickwit/client.rs:68
- Draft comment:
Good instrumentation update. The generic parameterT: serde::Serializeadds flexibility. Ensure that any type passed truly serializes to the expected document format for Quickwit ingestion. - Reason this comment was not posted:
Confidence changes required:30%<= threshold50%None
2. app-server/src/quickwit/consumer.rs:176
- Draft comment:
The changes correctly support both spans and events. As a potential enhancement, consider ingesting spans and events concurrently (usingfutures::join!ortry_join!) to reduce overall latency if performance becomes a concern. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. app-server/src/quickwit/mod.rs:45
- Draft comment:
The introduction ofQuickwitIndexedEventand the untagged enumIndexerQueuePayloadcleanly supports both spans and events. Ensure that the untagged enum remains unambiguous during serialization/deserialization as the data structure evolves. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%This comment is asking the author to ensure that a specific behavior remains consistent as the data structure evolves. It is not making a specific suggestion or pointing out a specific issue with the current code. It is more of a general cautionary note, which violates the rule against asking the author to ensure behavior is intended or tested.
4. app-server/src/quickwit/producer.rs:19
- Draft comment:
Potential Issue: The function returns early ifspansis empty, even ifeventsare not. Consider adjusting the condition to publish the payload when either spans or events are present. - Reason this comment was not posted:
Comment was on unchanged code.
5. app-server/src/traces/consumer.rs:382
- Draft comment:
When publishing to the Quickwit indexing queue, both spans and events are converted and passed to the producer. Verify that downstream consumers correctly handle cases where one of the arrays might be empty, especially in light of the producer’s early return condition. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
6. frontend/lib/quickwit/indexes/events.yaml:1
- Draft comment:
The events index configuration looks well defined with version bumped to 0.8. Verify that field mappings (especially for booleans and text) match expected query patterns in production. - Reason this comment was not posted:
Confidence changes required:30%<= threshold50%None
7. frontend/lib/quickwit/indexes/spans.yaml:1
- Draft comment:
The spans index configuration is updated to version 0.8. Ensure that the field mappings, tokenizers, and retention policy remain consistent with production requirements. - Reason this comment was not posted:
Confidence changes required:30%<= threshold50%None
8. frontend/lib/quickwit/migrations.ts:121
- Draft comment:
The migration script correctly handles index creation. Note that once an index is created, most configuration changes are ignored, so ensure initial settings are final. - Reason this comment was not posted:
Confidence changes required:30%<= threshold50%None
Workflow ID: wflow_iuL5DPGJEIaBMNO2
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
app-server/src/db/events.rs
Outdated
| } | ||
|
|
||
| pub fn is_exception(&self) -> bool { | ||
| self.name.to_lowercase().trim() == "exception" |
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.
Consider using eq_ignore_ascii_case (e.g. self.name.eq_ignore_ascii_case("exception")) instead of converting to lowercase and trimming. This avoids extra allocation.
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.
Important
Looks good to me! 👍
Reviewed f085ae0 in 34 seconds. Click for details.
- Reviewed
26lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. app-server/src/db/events.rs:36
- Draft comment:
Good improvement: using eq_ignore_ascii_case avoids allocating a new string. Ensure that event names will always be ASCII since this method only handles ASCII case comparisons. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. app-server/src/quickwit/producer.rs:19
- Draft comment:
The condition now checks that both spans and events are empty before returning early, which aligns with the combined payload approach. Looks good. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_Xol6Tknn6uoXLTnZ
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Looks good to me! 👍
Reviewed cdca2f5 in 1 minute and 49 seconds. Click for details.
- Reviewed
30lines of code in1files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/lib/quickwit/indexes/events.yaml:7
- Draft comment:
Removed 'stored: false' from 'is_exception'. Confirm this omission is intentional for search results. - Reason this comment was not posted:
Comment looked like it was already resolved.
2. frontend/lib/quickwit/indexes/events.yaml:11
- Draft comment:
Removed 'stored: false' from 'project_id'. Ensure this aligns with desired retrieval behavior. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =40%<= threshold50%The comment is asking the author to ensure that the removal ofstored: falsealigns with the desired behavior. This is asking for confirmation of intention, which is against the rules. However, it does point out a specific change that might affect behavior, which could be useful. I need to evaluate if this is more of a suggestion or a request for confirmation.
3. frontend/lib/quickwit/indexes/events.yaml:19
- Draft comment:
Changed 'span_id' fast flag from false to true. Verify this change meets indexing performance and search expectations. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%The comment is asking the PR author to verify the change meets certain expectations, which violates the rule against asking the author to ensure behavior is intended or tested. It doesn't provide a specific suggestion or point out a specific issue.
4. frontend/lib/quickwit/indexes/events.yaml:20
- Draft comment:
New 'id' field added. Consider if an explicit 'stored' setting is needed for consistent retrieval. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This comment is asking the author to "consider" whether a setting is needed, which is speculative and not actionable. It doesn't say there's definitely a problem - it's asking the author to think about it. The comment doesn't provide evidence that the current configuration is wrong. Looking at the existing fields in the file, many don't have explicitstoredsettings, suggesting there's a default behavior. The comment is essentially asking "did you think about this?" rather than pointing out a concrete issue. This violates the rule about not asking the author to confirm their intention or double-check things. Maybe there's a specific reason why theidfield would need special handling compared to other fields? Perhaps in this particular system, IDs should always be stored or never stored, and the comment is trying to prevent a common mistake? Even if there were a best practice about ID fields, the comment doesn't state what it is or why it matters. It just asks the author to "consider" it, which is not actionable. If there was a specific requirement, the comment should state it definitively rather than asking the author to think about it. This comment should be deleted. It's asking the author to "consider" something without providing concrete guidance or identifying a definite issue. It's speculative and asks the author to double-check their work, which violates the rules.
Workflow ID: wflow_iXPc7iiMy9rXiEZe
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| field_mappings: | ||
| - name: is_exception | ||
| type: bool | ||
| fast: true |
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.
stored false or need it when querying?
Note
Add Quickwit event indexing alongside spans, make ingest generic/instrumented, and update index configs.
QuickwitIndexedEvent,IndexerQueueMessage, andIndexerQueuePayloadinapp-server/src/quickwit/mod.rs.attributesfor spans/events inapp-server/src/quickwit/consumer.rs; ingest tospansand neweventsindexes.Event::is_exception()inapp-server/src/db/events.rs.ingestandbuild_doc_batchgeneric overserde::Serializeand add#[instrument]toingest,search_spans,build_doc_batchinapp-server/src/quickwit/client.rs.app-server/src/quickwit/producer.rs.app-server/src/quickwit/consumer.rs.frontend/lib/quickwit/indexes/events.yamland bumpfrontend/lib/quickwit/indexes/spans.yamlto version"0.8".frontend/lib/quickwit/migrations.ts.Written by Cursor Bugbot for commit cdca2f5. This will update automatically on new commits. Configure here.
Important
Add tracing to Quickwit client, generalize ingest, and introduce event indexing with new models, queue payload, consumer/producer logic, and index configs.
#[instrument]toingest,search_spans, andbuild_doc_batch; makeingest<T: Serialize>generic.QuickwitIndexedEvent,IndexerQueueMessage, andIndexerQueuePayload(spans+events or spans-only); extendQuickwitIndexedSpanunchanged.Event::is_exception()for flagging exceptions.publish_spans_for_indexingnow publishes bothspansandeventsin a single payload with size checks.attributesfor spans and events, and ingests tospansandeventsindexes with per-ingest error handling and reconnect.indexes/events.yaml(v0.8) defining event fields and search settings.indexes/spans.yamlto v0.8.migrations.tsto initialize indexes (skip if existing, note immutability of most config).This description was created by
for cdca2f5. You can customize this summary. It will automatically update as commits are pushed.