From 16005f4befb7322b0d0fc0a8387fbaee0fc95ae3 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Wed, 24 Jul 2024 09:47:02 +0100 Subject: [PATCH] Adjust thread id for skipped samples 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". --- .../collectors_thread_context.c | 2 +- spec/datadog/profiling/collectors/thread_context_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/datadog_profiling_native_extension/collectors_thread_context.c b/ext/datadog_profiling_native_extension/collectors_thread_context.c index a7de125f62d..5b4de6dbf28 100644 --- a/ext/datadog_profiling_native_extension/collectors_thread_context.c +++ b/ext/datadog_profiling_native_extension/collectors_thread_context.c @@ -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}, }; diff --git a/spec/datadog/profiling/collectors/thread_context_spec.rb b/spec/datadog/profiling/collectors/thread_context_spec.rb index b61eff66659..ec0f30f9d44 100644 --- a/spec/datadog/profiling/collectors/thread_context_spec.rb +++ b/spec/datadog/profiling/collectors/thread_context_spec.rb @@ -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