Chapter 2 – Native Monitoring in .NET
- Use
Activity.Current?.Id
on the page. For example, like this:<
p>traceparent: <code>@System.Diagnostics.Activity.Current?.Id</code></p>
. - If we have
dotnet-monitor
running as a sidecar, we can connect to its instance corresponding to the problematic service instance, check the metrics and logs, and create dumps. We could even configuredotnet-monitor
to trigger a dump collection based on certain events or resource consumption thresholds.
If we don’t have dotnet-monitor
, but can access service instances, we can install dotnet-monitor
there and get diagnostics information from the running process.
If instances are healthy, but the problem is somewhere inside the telemetry pipeline, troubleshooting steps would depend on the tools we use. For example, with Jaeger we can check logs; the Prometheus UI shows connectivity with targets; the OpenTelemetry collector provides logs and metrics for self...