Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a21a2ad
Remove DD_INTEGRATIONS environment variable from test setup and wix i…
zacharycmontoya Dec 3, 2019
66885e1
Add MissingDotnetTracerHomeEnv to reproductions where DD_INTEGRATIONS…
zacharycmontoya Dec 6, 2019
3c09572
Remove the use of the $(LoadManagedProfilerFromProfilerDirectory) MSB…
zacharycmontoya Dec 6, 2019
72d6160
Modify the integration_loader helpers to only take file_paths as inpu…
zacharycmontoya Dec 6, 2019
4aa5cec
Revert "Remove DD_INTEGRATIONS environment variable from test setup a…
zacharycmontoya Dec 6, 2019
218bfbe
Move MissingDotNetTracerHomeEnv to the samples directory so we can te…
zacharycmontoya Dec 6, 2019
72c8239
Rename new test project to Samples.HttpClient.MissingDotnetTracerHomeEnv
zacharycmontoya Dec 6, 2019
28e4412
Add MissingDotnetTracerHomeEnvTest test. It currently passes because …
zacharycmontoya Dec 6, 2019
59175a1
Add Samples.HttpClient.MissingDotnetTracerHomeEnv to the Linux CI
zacharycmontoya Dec 6, 2019
9a8e202
Edit the test infrastructure to unset environment variables as specif…
zacharycmontoya Dec 6, 2019
d84194a
Fix the AssemblyResolve events for .NET Core and .NET Framework to fi…
zacharycmontoya Dec 6, 2019
464d668
Add debugging statements in initial profiler directory discovery
zacharycmontoya Dec 6, 2019
692eb58
Fix the fallback so we check for Path.GetDirectoryName(DD_INTEGRATION…
zacharycmontoya Dec 7, 2019
4661024
Redo the set of changes to Remove DD_INTEGRATIONS environment from test
zacharycmontoya Dec 7, 2019
dd5f469
Remove DD_INTEGRATION from all tests using EnvironmentHelper and wrec…
zacharycmontoya Dec 7, 2019
7cd2c2d
Perform quick argument check: In the profiler, use DD_DOTNET_TRACER_H…
zacharycmontoya Dec 7, 2019
66d74ec
Reset the integration_loader API's so we can easily test LoadIntegrat…
zacharycmontoya Dec 7, 2019
22df6c5
Add <filesystem> to cor_profiler.cpp
zacharycmontoya Dec 7, 2019
a676a4f
Remove the <filesystem> include, taking care of path joining ourselve…
zacharycmontoya Dec 9, 2019
6d6e356
Revert "Remove the <filesystem> include, taking care of path joining …
zacharycmontoya Dec 9, 2019
1e9f671
Rename GetValues to SplitAndTrim
zacharycmontoya Dec 9, 2019
0469a2b
Add function AppendToPath in util.cpp to do path join for each OS and…
zacharycmontoya Dec 10, 2019
432bc86
Remove <filesystem> include from integration_loader
zacharycmontoya Dec 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Datadog.Trace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyResolveMscorlibReso
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.StackExchange.Redis", "performance\Performance.StackExchange.Redis\Performance.StackExchange.Redis.csproj", "{E41C87E9-7339-4FC0-8791-D57752C5BC12}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.HttpClient.MissingDotnetTracerHomeEnv", "samples\Samples.HttpClient.MissingDotnetTracerHomeEnv\Samples.HttpClient.MissingDotnetTracerHomeEnv.csproj", "{082BEBF8-2BCA-402C-AE2B-E058149B787D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -942,6 +944,16 @@ Global
{E41C87E9-7339-4FC0-8791-D57752C5BC12}.Release|x64.Build.0 = Release|x64
{E41C87E9-7339-4FC0-8791-D57752C5BC12}.Release|x86.ActiveCfg = Release|x86
{E41C87E9-7339-4FC0-8791-D57752C5BC12}.Release|x86.Build.0 = Release|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Debug|Any CPU.ActiveCfg = Debug|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Debug|x64.ActiveCfg = Debug|x64
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Debug|x64.Build.0 = Debug|x64
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Debug|x86.ActiveCfg = Debug|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Debug|x86.Build.0 = Debug|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Release|Any CPU.ActiveCfg = Release|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Release|x64.ActiveCfg = Release|x64
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Release|x64.Build.0 = Release|x64
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Release|x86.ActiveCfg = Release|x86
{082BEBF8-2BCA-402C-AE2B-E058149B787D}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1009,6 +1021,7 @@ Global
{64235C59-8EAB-401A-86B0-C41E513F0AE8} = {AA6F5582-3B71-49AC-AA39-8F7815AC46BE}
{EEA89ACD-CFBB-4F60-A150-74F0A84DF028} = {550AE553-2BBB-4021-B55A-137EF31A6B1F}
{E41C87E9-7339-4FC0-8791-D57752C5BC12} = {CD9D9813-A195-464A-A0F1-59E02D16E181}
{082BEBF8-2BCA-402C-AE2B-E058149B787D} = {AA6F5582-3B71-49AC-AA39-8F7815AC46BE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {160A1D00-1F5B-40F8-A155-621B4459D78F}
Expand Down
5 changes: 2 additions & 3 deletions Test.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<DefineConstants Condition="'$(PerformComprehensiveTesting)'=='true'">$(DefineConstants);COMPREHENSIVE_TESTS</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(ExcludeManagedProfiler)' != 'true' and
'$(LoadManagedProfilerFromProfilerDirectory)' != 'true' ">
<ItemGroup Condition="'$(ExcludeManagedProfiler)' != 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)\src\Datadog.Trace.ClrProfiler.Managed\Datadog.Trace.ClrProfiler.Managed.csproj" />
</ItemGroup>

Expand All @@ -35,7 +34,7 @@
Link="profiler-lib\integrations.json" />
</ItemGroup>

<Target Name="AfterBuildCopyManagedProfiler" AfterTargets="AfterBuild" Condition=" '$(LoadManagedProfilerFromProfilerDirectory)' == 'true'">
<Target Name="AfterBuildCopyManagedProfiler" AfterTargets="AfterBuild">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing $(LoadManagedProfilerFromProfilerDirectory) because it's not intuitive when to use it. For now, while wasteful, we'll always copy all managed binaries to a sample app's profiler-lib directory.

<ItemGroup>
<!-- Subfolders of the output directory should each be a target framework -->
<ManagedProfilerFiles Include="$(ManagedProfilerOutputDirectory)\**\*.dll" Exclude="$(ManagedProfilerOutputDirectory)\*\runtimes\**\*.dll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
<ComponentGroup Id="EnvironmentVariables.Machine" Directory="INSTALLFOLDER">
<Component Id="EnvironmentVariablesShared" Guid="{C314A305-9C24-4E46-9ECF-E5EEA703BDEA}" Win64="$(var.Win64)">
<CreateFolder/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing DD_INTEGRATIONS from our MSI since we can key off DD_DOTNET_TRACER_HOME. If for some reason the user has a different integrations.json file they want to use, they can manually set DD_INTEGRATIONS to prioritize that one.

<Environment Id="DD_INTEGRATIONS" Name="DD_INTEGRATIONS" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]integrations.json" Part="all" />
<Environment Id="DD_DOTNET_TRACER_HOME" Name="DD_DOTNET_TRACER_HOME" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]" Part="all" />
</Component>
</ComponentGroup>
Expand Down
1 change: 0 additions & 1 deletion devenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ SET DD_PROFILER_EXCLUDE_PROCESSES=devenv.exe;Microsoft.ServiceHub.Controller.exe

rem Set dotnet tracer home path
SET DD_DOTNET_TRACER_HOME=%~dp0
SET DD_INTEGRATIONS=%DD_DOTNET_TRACER_HOME%\integrations.json

if "%start_visual_studio%" == "true" (
echo Starting Visual Studio...
Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ then
dotnet publish -f $publishTargetFramework -c $buildConfiguration samples/Samples.AspNetCoreMvc.Netcore3/Samples.AspNetCoreMvc.Netcore3.csproj -p:Configuration=$buildConfiguration -p:ManagedProfilerOutputDirectory="$PUBLISH_OUTPUT"
fi

for sample in Samples.Elasticsearch Samples.Elasticsearch.V5 Samples.ServiceStack.Redis Samples.StackExchange.Redis Samples.SqlServer Samples.MongoDB Samples.HttpMessageHandler Samples.Npgsql Samples.MySql Samples.GraphQL ; do
for sample in Samples.Elasticsearch Samples.Elasticsearch.V5 Samples.ServiceStack.Redis Samples.StackExchange.Redis Samples.SqlServer Samples.MongoDB Samples.HttpMessageHandler Samples.Npgsql Samples.MySql Samples.GraphQL Samples.HttpClient.MissingDotnetTracerHomeEnv ; do
dotnet publish -f $publishTargetFramework -c $buildConfiguration samples/$sample/$sample.csproj -p:Configuration=$buildConfiguration -p:ManagedProfilerOutputDirectory="$PUBLISH_OUTPUT"
done

Expand Down
1 change: 0 additions & 1 deletion docker/with-profiler.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export CORECLR_ENABLE_PROFILING="1"
export CORECLR_PROFILER="{846F5F1C-F9AE-4B07-969E-05C26BC060D8}"
export CORECLR_PROFILER_PATH="${DIR}/src/Datadog.Trace.ClrProfiler.Native/obj/Debug/x64/Datadog.Trace.ClrProfiler.Native.so"
export DD_DOTNET_TRACER_HOME="${DIR}"
export DD_INTEGRATIONS="${DD_DOTNET_TRACER_HOME}/integrations.json"

eval "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Platforms>x64;x86</Platforms>
<PlatformTarget>$(Platform)</PlatformTarget>
<IsPackable>false</IsPackable>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
1 change: 0 additions & 1 deletion reproductions/AutomapperTest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
ENV CORECLR_PROFILER_PATH=/opt/datadog/Datadog.Trace.ClrProfiler.Native.so
ENV DD_DOTNET_TRACER_HOME=/opt/datadog
ENV DD_INTEGRATIONS=/opt/datadog/integrations.json
ENV DD_TRACE_ENABLED=true

FROM mcr.microsoft.com/dotnet/core/sdk:2.1-stretch AS build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
}
},
"Docker": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace.ClrProfiler.Managed" Version="1.8.0" />
<PackageReference Include="Npgsql" Version="4.0.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json",

"DD_TRACE_DEBUG": "false"
},
"use64Bit": true,
"nativeDebugging": true
Expand All @@ -45,9 +42,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json",

"DD_TRACE_DEBUG": "false"
},
"applicationUrl": "http://localhost:54567/",
"nativeDebugging": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"use64Bit": true,
"nativeDebugging": true
Expand All @@ -43,7 +42,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"applicationUrl": "http://localhost:54566/",
"nativeDebugging": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<!-- override to remove net452 -->
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461</TargetFrameworks>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<!-- Required to build multiple projects with the same Configuration|Platform, which is needed for the CI library/version matrix -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<!-- Required to build multiple projects with the same Configuration|Platform, which is needed for the CI library/version matrix -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions samples/Samples.GraphQL/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"use64Bit": true,
"nativeDebugging": true
Expand All @@ -43,7 +42,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"applicationUrl": "http://localhost:54568/",
"nativeDebugging": true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace MissingDotnetTracerHomeEnv
{
internal class Program
{
private static async Task<int> Main()
{
try
{
var baseAddress = new Uri("https://www.example.com/");
var regularHttpClient = new HttpClient { BaseAddress = baseAddress };
await regularHttpClient.GetAsync("default-handler");
Console.WriteLine("All is well!");
}
catch (Exception ex)
{
Console.Error.WriteLine(ex);
return (int)ExitCode.UnknownError;
}

return (int)ExitCode.Success;
}
}

enum ExitCode : int
{
Success = 0,
UnknownError = -10
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"profiles": {
"Samples.HttpClient.MissingDotnetTracerHomeEnv": {
"commandName": "Project",
"environmentVariables": {
"COR_ENABLE_PROFILING": "1",
"COR_PROFILER": "{846F5F1C-F9AE-4B07-969E-05C26BC060D8}",
"COR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"CORECLR_ENABLE_PROFILING": "1",
"CORECLR_PROFILER": "{846F5F1C-F9AE-4B07-969E-05C26BC060D8}",
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This very simple test program uses DD_INTEGRATIONS and doesn't use DD_DOTNET_TRACER_HOME to simulate a user who has upgraded the profiler without updating the environment variables.

},
"nativeDebugging": true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ExcludeManagedProfiler>true</ExcludeManagedProfiler>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<Reference Include="System.Net.Http" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LoadManagedProfilerFromProfilerDirectory>true</LoadManagedProfilerFromProfilerDirectory>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Datadog.Trace\Datadog.Trace.csproj" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion samples/Samples.MongoDB/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
1 change: 0 additions & 1 deletion samples/Samples.MySql/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
1 change: 0 additions & 1 deletion samples/Samples.Npgsql/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"CORECLR_PROFILER_PATH": "$(ProjectDir)$(OutputPath)profiler-lib\\Datadog.Trace.ClrProfiler.Native.dll",

"DD_DOTNET_TRACER_HOME": "$(ProjectDir)$(OutputPath)profiler-lib",
"DD_INTEGRATIONS": "$(ProjectDir)$(OutputPath)profiler-lib\\integrations.json"
},
"nativeDebugging": true
}
Expand Down
Loading