-
Notifications
You must be signed in to change notification settings - Fork 15
[APMSP-1764] Support borrowed buffer for msgpack decoding #1004
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
BenchmarksComparisonBenchmark execution time: 2025-04-10 13:55:57 Comparing candidate commit 27e9dd0 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics. scenario:benching deserializing traces from msgpack to their internal representation
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
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1004 +/- ##
==========================================
+ Coverage 71.52% 71.58% +0.06%
==========================================
Files 337 337
Lines 50583 50707 +124
==========================================
+ Hits 36178 36299 +121
- Misses 14405 14408 +3
🚀 New features to boost your workflow:
|
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
|
34ee871 to
d3b7324
Compare
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.
A few nits but overall nice work.
Co-authored-by: vianney <[email protected]>
1f54961 to
27e9dd0
Compare
What does this PR do?
Use &[u8] in the msgpack decoder instead of Bytes and produce a SpanSlice which contains &str instead of BytesString. This allows to parse non-owned buffer containing traces. It also provides a from_bytes wrapper which uses the same parsing logic but convert the &str to BytesString based on the given Bytes buffer.
Motivation
The trace exporter needs to support reading traces from borrowed buffer.
Additional Notes
This PR also refactors the string, map and number decoding logic to be moved to separate modules.
How to test the change?
Describe here in detail how the change can be validated.