GuideInformationIT

Review related-log sampling when migrating to Application Insights .NET SDK 3.x

Which trace-sampling relationships should a .NET SDK 3.x migration test preserve?

A controlled technology lifecycle progressing from assessment to approved production.
DSE visual intelligenceManaged IT operationsGuide · 2 min read
Executive summary

What you need to know

Which trace-sampling relationships should a .NET SDK 3.x migration test preserve?

Potentially affected

Applications migrating Application Insights .NET SDK 2.x instrumentation to the OpenTelemetry-based .NET SDK 3.x.

DSE recommendation

Validate related logs alongside their parent trace rather than checking only aggregate telemetry arrival after the upgrade.

Source facts

Application Insights .NET SDK 3.x applies the same sampling settings to requests and dependencies; it does not support separate settings for those two signals. Related logs inherit their parent trace’s sampling decision by default, with EnableTraceBasedLogsSampler available to disable that behavior. Microsoft prohibits mixing 2.x and 3.x packages, or using SDK 3.x alongside the Azure Monitor OpenTelemetry Distro in one application. Microsoft Learn.

Applicability

This concerns the .NET SDK 3.x migration path, not every OpenTelemetry collector or language SDK. Keep the intended sampling policy explicit before comparing old and new telemetry populations.

DSE recommendation

Validate related logs alongside their parent trace rather than checking only aggregate telemetry arrival after the upgrade. Identify a representative request, its dependency and its related log records in the migration test. Have the application owner decide whether the default trace-related log policy matches the intended diagnostic use. Do not change the switch merely to increase visible records without considering the desired correlation and volume.

Verification

Review the resolved package set and effective sampling configuration in a controlled environment. Exercise repeatable sample requests and compare the observed parent-child relationships with the approved policy. Include any intentional independent-log behavior in the test expectation. Preserve the configuration and representative outcomes before rollout; a nonempty destination table alone should not be reported as proof that the migration retained its intended trace and log relationships.

Official references

Microsoft Learn: Application Insights OpenTelemetry migration. Source reviewed September 9, 2026.

Primary reference

Review the official source

Migrate Application Insights Classic API Software Development Kits (SDKs) to Azure Monitor OpenTelemetry - Azure Monitor | Microsoft Learn · Verified September 9, 2026

Open official reference ↗
Plan the next step

Need help applying this guidance safely?

DSE can help confirm applicability, protect service continuity, and validate the result across physical security and IT systems.

Talk with DSE