[PROF-7307] Record allocation type when sampling objects #3096
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?
This PR extends the
Profiling::Collectors::ThreadContext
support for sampling allocated objects to also record the object's class.Motivation:
This will enable us to provide the "Allocations by Allocated Type" feature in the Datadog UX.
Additional Notes:
N/A
How to test the change?
This change includes test coverage. Right now, there's no way to exercise this code other than through tests, because we haven't yet wired it up to trigger during actual Ruby VM allocations. This will come at a later date.
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance
.