-
Couldn't load subscription status.
- Fork 15
feat(span): remove clone bound on spantext #1266
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
# Motivation Cloning is very cheap as long as we have a ByteString or a str slice, but if we want to use python strings we need to hold the GIL to clone them. This is not possible in general... But there are no operations requiring us to actual clone the data. # Changes * use an indexmap for the shared dictionary. This datastructure is exactly what we want (O(1) access and insertion order iteration) and keep only one of each value * Use indices into the span slice while computing top level rather than copying the service string
|
# Motivation When we serialize we store the uppper 64 bits of the trace id in a meta tag. But at runtime, we don't want to split it as the trace id still needs to be readable.
e990211 to
2445a48
Compare
BenchmarksComparisonBenchmark execution time: 2025-10-16 11:52:12 Comparing candidate commit ddd1b20 in PR branch Found 17 performance improvements and 6 performance regressions! Performance is the same for 30 metrics, 2 unstable metrics. scenario:benching serializing traces from their internal representation to msgpack
scenario:credit_card/is_card_number/ 3782-8224-6310-005
scenario:credit_card/is_card_number/ 378282246310005
scenario:credit_card/is_card_number/378282246310005
scenario:credit_card/is_card_number/37828224631000521389798
scenario:credit_card/is_card_number_no_luhn/ 3782-8224-6310-005
scenario:credit_card/is_card_number_no_luhn/ 378282246310005
scenario:credit_card/is_card_number_no_luhn/378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631000521389798
scenario:normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...
scenario:normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters
scenario:normalization/normalize_service/normalize_service/[empty string]
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
BaselineOmitted due to size. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1266 +/- ##
==========================================
- Coverage 71.83% 71.77% -0.06%
==========================================
Files 356 356
Lines 56677 56917 +240
==========================================
+ Hits 40714 40854 +140
- Misses 15963 16063 +100
🚀 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
|
Motivation
Cloning is very cheap as long as we have a ByteString or a str slice, but if we want to use python strings we need to hold the GIL to clone them.
This is not possible in general... But there are no operations requiring us to actual clone the data.
Changes