-
Notifications
You must be signed in to change notification settings - Fork 15
[profiling] Support OTel signal #1181
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
0172214
to
4b7d80c
Compare
4b7d80c
to
4b9d3be
Compare
BenchmarksComparisonBenchmark execution time: 2025-09-16 20:10:07 Comparing candidate commit d77157c in PR branch Found 10 performance improvements and 1 performance regressions! Performance is the same for 42 metrics, 2 unstable metrics. scenario:benching serializing traces from their internal representation to msgpack
scenario:credit_card/is_card_number/37828224631000521389798
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_name/normalize_name/good
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 #1181 +/- ##
==========================================
+ Coverage 71.61% 71.96% +0.34%
==========================================
Files 354 362 +8
Lines 55939 56838 +899
==========================================
+ Hits 40063 40903 +840
- Misses 15876 15935 +59
🚀 New features to boost your workflow:
|
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've given it a pass! Overall seems quite reasonable, but I have two big comments I'd like to leave on the overall thing:
-
I think we should really really keep somewhere in the crate a list of all the gaps that currently exist and things that would get us to a 100% great implementation. I fear there's too many things lost in small "TODO this" "missing that", and especially on the efficiency side -- serializing everything in-memory first, not streaming; the duplication of samples, etc, those are things that can easily get lost if the code seems to work fine, so I think it's mega-important for us to clearly record them, even though we may not address them in this PR
-
I think this PR would benefit from a trimming down of AI output verbosity. More tests + more comments aren't actually always good, and there's so much trivial stuff and duplication that it was really hard + a huge slog to actually go through this PR and find the important parts (while making sure the other parts were sane).
fn test_sample_conversion_with_labels() { | ||
// Create an internal profile with sample types | ||
let sample_types = [crate::api::ValueType::new("cpu", "nanoseconds")]; | ||
let mut internal_profile = InternalProfile::new(&sample_types, None); | ||
|
||
// Add a function and location | ||
let function = crate::api::Function { | ||
name: "test_function", | ||
system_name: "test_system", | ||
filename: "test_file.rs", | ||
}; | ||
let _function_id = internal_profile.add_function(&function); | ||
|
||
// Add a mapping | ||
let mapping = crate::api::Mapping { | ||
memory_start: 0x1000, | ||
memory_limit: 0x2000, | ||
file_offset: 0, | ||
filename: "test_binary", | ||
build_id: "test_build_id", | ||
}; | ||
let _mapping_id = internal_profile.add_mapping(&mapping); | ||
|
||
let location = crate::api::Location { | ||
mapping, | ||
function, | ||
address: 0x1000, | ||
line: 42, | ||
}; | ||
let location_id = internal_profile.add_location(&location).unwrap(); | ||
|
||
let _stack_trace_id = internal_profile.add_stacktrace(vec![location_id]); |
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.
This is more of a test design choice, but I find that with such a complex file with some many tests, we would benefit from deduplicating common test setup code. Each test case is costing us 30+ lines of code just to get to the interesting bits, and thus it makes it really hard to follow what's actually being tested from the boring always-the-same details.
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.
Took a first pass at doing so
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
|
What does this PR do?
Initial implementation of OTel protocol for libdatadog.
Motivation
OTel is coming, we should see how hard it is to create the signal, and what gotchas we run into
Additional Notes
How to test the change?