diff --git a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/AllocationsProvider.cpp b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/AllocationsProvider.cpp index 312143739832..93b0f4dc498b 100644 --- a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/AllocationsProvider.cpp +++ b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/AllocationsProvider.cpp @@ -232,7 +232,7 @@ void AllocationsProvider::OnAllocation(std::chrono::nanoseconds timestamp, // TODO: we need to check that threads are not jumping from one AppDomain to the other too frequently // because we might be receiving this event 1 second after it has been emitted - // It this is the case, we should simply set the AppDomainId to -1 all the time. + // It this is the case, we should simply set the AppDomainId to 0 all the time. AppDomainID appDomainId; if (SUCCEEDED(_pCorProfilerInfo->GetThreadAppDomain(threadInfo->GetClrThreadId(), &appDomainId))) { @@ -240,15 +240,13 @@ void AllocationsProvider::OnAllocation(std::chrono::nanoseconds timestamp, } else { - rawSample.AppDomainId = -1; + rawSample.AppDomainId = 0; } } else // create a fake IThreadInfo that wraps the OS thread id (no name, no profiler thread id) { rawSample.ThreadInfo = std::make_shared(threadId); - - // TODO: do we need to set to -1? - // rawSample.AppDomainId = -1; + rawSample.AppDomainId = 0; } // rawSample.AllocationSize = objectSize; diff --git a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/ContentionProvider.cpp b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/ContentionProvider.cpp index 20b63f858cc0..8b234bb937ec 100644 --- a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/ContentionProvider.cpp +++ b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/ContentionProvider.cpp @@ -214,15 +214,13 @@ void ContentionProvider::AddContentionSample(std::chrono::nanoseconds timestamp, } else { - rawSample.AppDomainId = -1; + rawSample.AppDomainId = 0; } } else // create a fake IThreadInfo that wraps the OS thread id (no name, no profiler thread id) { rawSample.ThreadInfo = std::make_shared(threadId); - - // TODO: do we need to set to -1? - //rawSample.AppDomainId = -1; + rawSample.AppDomainId = 0; } }