-
Notifications
You must be signed in to change notification settings - Fork 150
Add fallback logic for DD_INTEGRATIONS and DD_DOTNET_TRACER_HOME #579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a21a2ad
66885e1
3c09572
72d6160
4aa5cec
218bfbe
72c8239
28e4412
59175a1
9a8e202
d84194a
464d668
692eb58
4661024
dd5f469
7cd2c2d
66d74ec
22df6c5
a676a4f
6d6e356
1e9f671
0469a2b
432bc86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,7 +151,6 @@ | |
| <ComponentGroup Id="EnvironmentVariables.Machine" Directory="INSTALLFOLDER"> | ||
| <Component Id="EnvironmentVariablesShared" Guid="{C314A305-9C24-4E46-9ECF-E5EEA703BDEA}" Win64="$(var.Win64)"> | ||
| <CreateFolder/> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm removing |
||
| <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> | ||
|
|
||
| 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" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This very simple test program uses |
||
| }, | ||
| "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> |
There was a problem hiding this comment.
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'sprofiler-libdirectory.