Datadog.Trace.ClrProfiler.Native
See original GitHub issueRunning a full framework console app on windows server, tracer 2.18, agent 7.39.2.1
log is dumping this line and apm isn’t working: https://github.com/DataDog/dd-trace-dotnet/blob/dff77dd9b50f8a3dd6b5d35687aaaa617904d9a4/tracer/src/Datadog.Trace/ContinuousProfiler/ProfilerStatus.cs#L73
any clear indication as to what would cause this? same setup is working in another env
with the same configuration and apm is working on this machine for other apps (mix of services, iis sites, console apps). Not sure if the root cause is Failed to get the runtime-id from native: Unable to load DLL 'Datadog.Trace.ClrProfiler.Native'
Relevant logs:
2022-11-02 17:37:26.839 +00:00 [INF] Using ApiWebRequestFactory for discovery transport. { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:26.909 +00:00 [INF] Using ApiWebRequestFactory for trace transport. { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:26.999 +00:00 [INF] Building automatic tracer { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.004 +00:00 [INF] Failed to get the runtime-id from native: Unable to load DLL 'Datadog.Trace.ClrProfiler.Native': The specified module could not be found. (Exception from HRESULT: 0x8007007E) { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.039 +00:00 [INF] Continuous Profiler is enabled. { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.044 +00:00 [WRN] No profiler related feature(s) will be enabled. Failed to retrieve profiler status native pointer. System.DllNotFoundException: Unable to load DLL 'Datadog.Profiler.Native': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Datadog.Trace.ContinuousProfiler.NativeInterop.NativeMethods.GetProfilerStatusPointer()
at Datadog.Trace.ContinuousProfiler.NativeInterop.GetProfilerStatusPointer()
at Datadog.Trace.ContinuousProfiler.ProfilerStatus.EnsureNativeIsIntialized()
{ MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.109 +00:00 [INF] Using ApiWebRequestFactory for telemetry transport. { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.110 +00:00 [INF] Using ApiWebRequestFactory for telemetry transport direct to intake. { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }
2022-11-02 17:37:27.374 +00:00 [INF] DATADOG TRACER CONFIGURATION - {"date":"2022-11-02T17:37:27.3620794+00:00","os_name":"Windows","os_version":"Microsoft Windows NT 6.2.9200.0","version":"2.18.0.0","platform":"x64","lang":".NET Framework","lang_version":"4.8","env":"prod","enabled":true,"service":"REDACTED_SERVICE_NAME","agent_url":"http://127.0.0.1:8126/","agent_transport":"Default","debug":false,"health_checks_enabled":false,"analytics_enabled":false,"sample_rate":null,"sampling_rules":null,"tags":[],"log_injection_enabled":true,"runtime_metrics_enabled":true,"disabled_integrations":[],"routetemplate_resourcenames_enabled":true,"routetemplate_expansion_enabled":false,"querystring_reporting_enabled":true,"obfuscation_querystring_regex_timout":200.0,"partialflush_enabled":false,"partialflush_minspans":500,"runtime_id":"7a8c630f-ff6a-4146-ba5c-69b24ce38936","agent_reachable":true,"agent_error":"","appsec_enabled":false,"appsec_trace_rate_limit":100,"appsec_rules_file_path":"(default)","appsec_libddwaf_version":"(none)","iast_enabled":false,"iast_deduplication_enabled":true,"iast_weak_hash_algorithms":"HMACMD5,MD5,HMACSHA1,SHA1","iast_weak_cipher_algorithms":"DES,TRIPLEDES,RC2","direct_logs_submission_enabled_integrations":[],"direct_logs_submission_enabled":false,"direct_logs_submission_error":"","exporter_settings_warning":["No transport configuration found, using default values"],"dd_trace_methods":"","activity_listener_enabled":false,"profiler_enabled":false,"code_hotspots_enabled":false,"wcf_obfuscation_enabled":true,"data_streams_enabled":false,"span_sampling_rules":null} { MachineName: ".", Process: "[61536 REDACTED]", AppDomain: "[1 REDACTED.exe]", TracerVersion: "2.18.0.0" }```
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Tracing .NET Core Applications
Datadog, the leading service for cloud-scale monitoring. ... Trace.ClrProfiler.Native.so export DD_DOTNET_TRACER_HOME=/opt/datadog # Set additional Datadog ...
Read more >齐国隆冬强/dd-trace-dotnet
Trace.AspNet\Datadog.Trace.AspNet.csproj rem Build C++ projects rem The native profiler depends on the Datadog.Trace.ClrProfiler.Managed.
Read more >NET Auto-Instrumentation
These Auto-Installers are forked from Datadog's contribution of their tracers to the OpenTelemetry ... Trace.ClrProfiler.Native.so export ...
Read more >Datadog.Trace 2.35.0
Trace NuGet package. This package contains the Datadog .NET APM tracer for configuring custom instrumentation. If you are only using automatic instrumentation, ...
Read more >Debugging a native deadlock in a .NET Linux application
I started by using the pstacks command to get an overview of the callstacks: This revealed one thread executing Datadog.Trace.Agent.Api.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @andrewlock
from what i can tell the cli app is the only one that had the env var issue (set at runtime) so i’d expect the iis app to be working. i did uninstall / reinstall the tracer msi.
Two quick questions come to mind:
true
in the docs and others expect1
- could getting that wrong cause issues?FYI I did open a support ticket 24 hours ago. pretty quiet there so far.
PS - I kept an eye out for you at Dash. Wanted to thank you for the great blog and everything you put out there for the dotnet community.
Ah, yes, that would totally make sense. We hook very early into the execution process (before the application starts executing your code) so by then it’s too late to set the variables. Thanks for the update!