Skip to content
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

fix(profiling): make sure truncated frames are added at the root #11775

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ Datadog::Sample::clear_buffers()
bool
Datadog::Sample::flush_sample(bool reverse_locations)
{
if (reverse_locations) {
std::reverse(locations.begin(), locations.end());
}

if (dropped_frames > 0) {
const std::string name =
"<" + std::to_string(dropped_frames) + " frame" + (1 == dropped_frames ? "" : "s") + " omitted>";
Sample::push_frame_impl(name, "", 0, 0);
}

if (reverse_locations) {
std::reverse(locations.begin(), locations.end());
}

const ddog_prof_Sample sample = {
.locations = { locations.data(), locations.size() },
.values = { values.data(), values.size() },
Expand Down Expand Up @@ -408,7 +408,6 @@ Datadog::Sample::push_absolute_ns(int64_t _timestamp_ns)
return true;
}


bool
Datadog::Sample::push_monotonic_ns(int64_t _monotonic_ns)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
profiling: Fixes an issue where stack v2 would erroneously emplace informational pseudo-frames
on the leaf instead of the root of the callstack.
Loading