Skip to content

Commit

Permalink
Adjust thread id for skipped samples
Browse files Browse the repository at this point in the history
At some point "SA" stood for "Skipped Allocations", but after a few
renames elsewhere this is kinda confusing so let's make it "SS" for
"Skipped Samples".
  • Loading branch information
ivoanjo committed Jul 24, 2024
1 parent 258e02b commit 16005f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ void thread_context_collector_sample_skipped_allocation_samples(VALUE self_insta

ddog_prof_Label labels[] = {
// Providing .num = 0 should not be needed but the tracer-2.7 docker image ships a buggy gcc that complains about this
{.key = DDOG_CHARSLICE_C("thread id"), .str = DDOG_CHARSLICE_C("SA"), .num = 0},
{.key = DDOG_CHARSLICE_C("thread id"), .str = DDOG_CHARSLICE_C("SS"), .num = 0},
{.key = DDOG_CHARSLICE_C("thread name"), .str = DDOG_CHARSLICE_C("Skipped Samples"), .num = 0},
{.key = DDOG_CHARSLICE_C("allocation class"), .str = DDOG_CHARSLICE_C("(Skipped Samples)"), .num = 0},
};
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/profiling/collectors/thread_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ def self.otel_sdk_available?
end

it 'attributes the skipped samples to a "Skipped Samples" thread' do
expect(single_sample.labels).to include('thread id': 'SA', 'thread name': 'Skipped Samples')
expect(single_sample.labels).to include('thread id': 'SS', 'thread name': 'Skipped Samples')
end

it 'attributes the skipped samples to a "(Skipped Samples)" allocation class' do
Expand Down

0 comments on commit 16005f4

Please sign in to comment.