diff --git a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.cpp b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.cpp index de749e52619c..1d0b738accc1 100644 --- a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.cpp +++ b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.cpp @@ -37,7 +37,8 @@ NetworkProvider::NetworkProvider( _pCorProfilerInfo{ pCorProfilerInfo }, _pManagedThreadList{ pManagedThreadList }, _pConfiguration{ pConfiguration }, - _callstackProvider{ std::move(callstackProvider) } + _callstackProvider{ std::move(callstackProvider) }, + _metricsRegistry{metricsRegistry} { } @@ -59,7 +60,7 @@ bool NetworkProvider::CaptureThreadInfo(NetworkRequestInfo& info) // collect current call stack uint32_t hrCollectStack = E_FAIL; - const auto pStackFramesCollector = OsSpecificApi::CreateNewStackFramesCollectorInstance(_pCorProfilerInfo, _pConfiguration, &_callstackProvider); + const auto pStackFramesCollector = OsSpecificApi::CreateNewStackFramesCollectorInstance(_pCorProfilerInfo, _pConfiguration, &_callstackProvider, _metricsRegistry); pStackFramesCollector->PrepareForNextCollection(); const auto result = pStackFramesCollector->CollectStackSample(threadInfo.get(), &hrCollectStack); diff --git a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.h b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.h index 4ae139de8524..2778caec9b78 100644 --- a/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.h +++ b/profiler/src/ProfilerEngine/Datadog.Profiler.Native/NetworkProvider.h @@ -64,6 +64,7 @@ class NetworkProvider : IFrameStore* _pFrameStore; IConfiguration const* const _pConfiguration; CallstackProvider _callstackProvider; + MetricsRegistry& _metricsRegistry; std::unordered_map _requests; }; \ No newline at end of file