[APMSP-1764] Support borrowed buffer for msgpack decoding#1004
Merged
anais-raison merged 9 commits intomainfrom Apr 10, 2025
Merged
[APMSP-1764] Support borrowed buffer for msgpack decoding#1004anais-raison merged 9 commits intomainfrom
anais-raison merged 9 commits intomainfrom
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 Report❌ 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:
|
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
|
34ee871 to
d3b7324
Compare
VianneyRuhlmann
approved these changes
Apr 9, 2025
Contributor
VianneyRuhlmann
left a comment
There was a problem hiding this comment.
A few nits but overall nice work.
Co-authored-by: vianney <[email protected]>
1f54961 to
27e9dd0
Compare
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?
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.