libdatadog
libdatadog copied to clipboard
feat(profiling-ffi): expose stack trace ids
What does this PR do?
Creates API surface for adding stack traces independently from their data.
Motivation
This allows C FFI users to re-use the ids when they have some form of external caching already. Specifically designed for Ruby's PoC of heap profiling.
Additional Notes
I haven't gotten to testing it yet, but it's mostly new plumbing for existing internal behavior so it might work already.
How to test the change?
Use ddog_prof_Profile_add_stack_trace to create a stack id, and use ddog_prof_Profile_add_observation to associate values, labels, and optionally a timestamp with the stack id.
For Reviewers
- [ ] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance. - [x] This PR doesn't touch any of that.
Some tests with 'continue-on-error: true' have failed:
- Verify trace-protobuf stats_proto
Created by continue-on-error-comment
Closing due to lack of interest and inactivity. May revisit this in the future.
Thanks Levi for taking a stab at this -- this one is still in my radar as well, but I agree that we can revisit the PR once we're ready for it :)