[onboarding] make `DD_DOTNET_TRACER_HOME` optional in managed loader by lucaspimentel · Pull Request #7568 · DataDog/dd-trace-dotnet

@lucaspimentel changed the title Lpimentel/remove tracer home dependency make DD_DOTNET_TRACER_HOME optional

Sep 25, 2025

chatgpt-codex-connector[bot]

andrewlock

@lucaspimentel lucaspimentel changed the base branch from master to lpimentel/managed-loader-cleanup

October 2, 2025 02:41

chatgpt-codex-connector[bot]

@lucaspimentel lucaspimentel changed the title make DD_DOTNET_TRACER_HOME optional [onboarding] make DD_DOTNET_TRACER_HOME optional

Oct 8, 2025

andrewlock

Distinguish between two failure scenarios:
- DD_DOTNET_TRACER_HOME not set and auto-detection failed
- DD_DOTNET_TRACER_HOME set but invalid

This helps users quickly understand whether the issue is with
explicit configuration or auto-detection from profiler paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add debug logs to show which method was used to determine the tracer
home directory:
- Explicit DD_DOTNET_TRACER_HOME environment variable
- Architecture-specific profiler path (e.g., CORECLR_PROFILER_PATH_64)
- Generic profiler path fallback (e.g., CORECLR_PROFILER_PATH)

This helps with troubleshooting customer issues and provides visibility
into the auto-detection feature.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

@lucaspimentel lucaspimentel changed the title [onboarding] make DD_DOTNET_TRACER_HOME optional [onboarding] make DD_DOTNET_TRACER_HOME optional in managed loader

Oct 23, 2025

bouwkast

@lucaspimentel @claude

…n test

Adds explicit checks at the start of WhenOmittingTracerHome_InstrumentsApp
to verify that DD_DOTNET_TRACER_HOME is not set in both:
- The test's custom environment variables
- The system environment

This makes the test's preconditions clear and ensures we're actually
testing the fallback behavior when the variable is absent, protecting
against both test setup errors and system environment pollution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

andrewlock added a commit that referenced this pull request

Oct 24, 2025

andrewlock added a commit that referenced this pull request

Oct 24, 2025
…" (#7704)

## Summary of changes

This reverts commit d0fe312 (#7568).

## Reason for change

This broke the profiler integration tests on master (and we're not
entirely sure why)

lucaspimentel added a commit that referenced this pull request

Oct 24, 2025
Add new sections to help developers investigate test failures:

1. **Determining If Failures Are Related to Your Changes**
   - How to compare builds before/after your commit
   - Commands to list recent master builds and compare failed tasks
   - Explanation of master-only tests that don't run on PRs

2. **Understanding Test Infrastructure**
   - Finding test configuration and environment variable setup
   - Common gotchas (e.g., profiler tests disabling tracer)
   - Cross-cutting test failures between components
   - Tracing error messages to source code

These additions document investigation techniques used to diagnose
profiler test failures after PR #7568, including:
- Comparing master builds to determine if failures are new vs pre-existing
- Reading test infrastructure code to understand environment setup
- Understanding how changes in one component (tracer) can affect tests
  for another component (profiler)
- Using grep to trace error messages back to source code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

lucaspimentel added a commit that referenced this pull request

Oct 29, 2025
## Summary of changes

Adds two new sections to
`docs/development/CI/TroubleshootingCIFailures.md`:
1. **Determining If Failures Are Related to Your Changes** - Compare
builds to identify new vs pre-existing failures
2. **Understanding Test Infrastructure** - Investigate test
configuration and cross-cutting failures

## Reason for change

While investigating profiler test failures after PR #7568, I developed
investigation techniques that aren't documented. These will help
developers diagnose similar issues faster.

## Implementation details

- Commands to compare master builds and identify new failures
- How to find test configuration (environment variables, helper classes)
- Understanding cross-cutting failures (e.g., tracer changes affecting
profiler tests)
- Tracing error messages to source code using grep

## Test coverage

N/A - Documentation only

## Other details

Based on investigation of profiler test failures caused by PR #7568's
managed loader auto-detection feature.

Co-authored-by: Claude <noreply@anthropic.com>