refactor(trace-utils): replace use_v05_format bool and remove infallible expect#1946
Draft
anais-raison wants to merge 11 commits intomainfrom
Draft
refactor(trace-utils): replace use_v05_format bool and remove infallible expect#1946anais-raison wants to merge 11 commits intomainfrom
anais-raison wants to merge 11 commits intomainfrom
Conversation
Contributor
📚 Documentation Check Results📦
|
Contributor
🔒 Cargo Deny Results📦
|
Contributor
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
|
✨ Fix all issues with BitsAI or with Cursor
|
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Replaces the
use_v05_format: bool parameter incollect_trace_chunkswith the existing TraceEncoding enum, and removes#[allow(clippy::expect_used)] + .expect("infallible...")in the v04 msgpack encoder.Motivation
Follow-up to #1896, addressing review comments:
collect_trace_chunksgave no context at the call site — you had to look up the function signature to understand what true/false meant. Using TraceEncoding makes the intent explicit.collect_and_process_tracesmatch had a catch-all arm that computed a bool from the format — replaced with exhaustive V04/V05 arms..expect("infallible...")with a clippy allow to handle an error that can never occur. Replaced withlet _ = ..., consistent with what was already done in the v1 encoder.Additional Notes
How to test the change?
Existing tests.