-
Notifications
You must be signed in to change notification settings - Fork 16
fix(profiling)!: make sure we use the mime type properly #1488
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: main
Are you sure you want to change the base?
Conversation
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
11141f9 to
5d51f82
Compare
| reqwest::multipart::Part::bytes(encoder.finish()?).file_name(file.name.to_string()), | ||
| reqwest::multipart::Part::bytes(encoder.finish()?) | ||
| .file_name(file.name.to_string()) | ||
| .mime_str(file.mime.as_str())?, |
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.
Do we want to add "Content-Encoding" header on the compressed multipart parts?
5d51f82 to
06429f1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1488 +/- ##
==========================================
+ Coverage 70.96% 70.98% +0.01%
==========================================
Files 421 421
Lines 68438 68468 +30
==========================================
+ Hits 48567 48599 +32
+ Misses 19871 19869 -2
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2026-01-28 22:49:32 Comparing candidate commit 06429f1 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
morrisonlevi
left a comment
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.
I didn't finish my review because I have to go pick my son from D&D club, but I thought I'd leave what I have so far.
|
|
||
| fn try_from(mime: MimeType) -> std::result::Result<Self, Self::Error> { | ||
| match mime { | ||
| MimeType::Invalid => anyhow::bail!("Invalid MIME type"), |
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.
I don't mind too much, but something that stood out to me:
- For all prior releases, we didn't send mime types.
- Now suddenly, it's an error to not send one?
- Should we really fail, or do whatever we did before? Should
exporter::MimeTypebe optional, and if it's None, we don't set it or whatever we did before? Then aMimeType.Invalidcan map toNone? - This match isn't exhaustive, because it's
repr(C), I'd be fine with unrecognized, non-zero values being a failure (what is happening?!)
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
What does this PR do?
invalidenum value to catch when the enum was defaulted to 0.Motivation
Additional Notes
Anything else we should know when reviewing?
How to test the change?
New tests.