libdatadog icon indicating copy to clipboard operation
libdatadog copied to clipboard

feat(profiling-ffi): expose stack trace ids

Open morrisonlevi opened this issue 1 year ago • 1 comments

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.

PROF-8435

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.

morrisonlevi avatar Jan 04 '24 23:01 morrisonlevi

Some tests with 'continue-on-error: true' have failed:

  • Verify trace-protobuf stats_proto

Created by continue-on-error-comment

github-actions[bot] avatar Jan 04 '24 23:01 github-actions[bot]

Closing due to lack of interest and inactivity. May revisit this in the future.

morrisonlevi avatar Oct 17 '24 15:10 morrisonlevi

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 :)

ivoanjo avatar Oct 17 '24 15:10 ivoanjo