Skip to content
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

[POC] Naming cleanup #203

Merged
merged 9 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,20 @@ deploy/AzureAppServices/
# macOS temporal files
.DS_Store

# profiler output files
src/Datadog.Trace.ClrProfiler.Native/build/

# ignore blog folder from upstream
blog/

# ignore nuke config
.nuke/*

# exception to the ignore rule
!/**/.gitkeep
!/**/.gitkeep

# profiler build files
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/build/
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/deps/
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/CMakeFiles/
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/tmp.*
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/Makefile
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/CMakeCache.txt
src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/cmake_install.cmake
2 changes: 1 addition & 1 deletion .vscode.example/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"razor.disabled": true,
"omnisharp.defaultLaunchSolution": "Datadog.Trace.Minimal.sln"
"omnisharp.defaultLaunchSolution": "OpenTelemetry.AutoInstrumentation.sln"
}
181 changes: 0 additions & 181 deletions Datadog.Trace.proj

This file was deleted.

16 changes: 8 additions & 8 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Datadog.Trace,https://github.com/damianh/LibLog,MIT,Copyright (C) 2011-2017 Dami
Datadog.Trace,https://github.com/serilog/serilog,Apache-2.0,Copyright (c) 2013-2018 Serilog Contributors
Datadog.Trace,https://github.com/serilog/serilog-sinks-file,Apache-2.0,Copyright (c) 2016 Serilog Contributors
Datadog.Trace,https://github.com/JamesNK/Newtonsoft.Json,MIT,Copyright (c) 2007 James Newton-King
Datadog.Trace.ClrProfiler.Managed,https://github.com/kevin-montrose/Sigil,MS-PL,2013-2016 Kevin Montrose
Datadog.Trace.ClrProfiler.Native,https://github.com/dotnet/runtime,MIT,Copyright (c) .NET Foundation and contributors. All rights reserved.
Datadog.Trace.ClrProfiler.Native,https://github.com/Microsoft/clr-samples,MIT,Copyright (c) .NET Foundation and contributors. All rights reserved.
Datadog.Trace.ClrProfiler.Native,https://github.com/MicrosoftArchive/clrprofiler,MIT,Copyright (c) Microsoft Corporation. All rights reserved.
Datadog.Trace.ClrProfiler.Native,https://github.com/nlohmann/json,MIT,Copyright (c) 2013-2018 Niels Lohmann
Datadog.Trace.ClrProfiler.Native,https://github.com/dropbox/miniutf,MIT,"Copyright (c) 2013 Dropbox, Inc."
Datadog.Trace.ClrProfiler.Native,https://github.com/gabime/spdlog,MIT,Copyright (c) 2016 Gabi Melman.
Datadog.Trace.ClrProfiler.Native,https://github.com/fmtlib/fmt,MIT,"Copyright (c) 2012 - present, Victor Zverovich"
OpenTelemetry.AutoInstrumentation.ClrProfiler.Managed,https://github.com/kevin-montrose/Sigil,MS-PL,2013-2016 Kevin Montrose
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/dotnet/runtime,MIT,Copyright (c) .NET Foundation and contributors. All rights reserved.
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/Microsoft/clr-samples,MIT,Copyright (c) .NET Foundation and contributors. All rights reserved.
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/MicrosoftArchive/clrprofiler,MIT,Copyright (c) Microsoft Corporation. All rights reserved.
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/nlohmann/json,MIT,Copyright (c) 2013-2018 Niels Lohmann
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/dropbox/miniutf,MIT,"Copyright (c) 2013 Dropbox, Inc."
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/gabime/spdlog,MIT,Copyright (c) 2016 Gabi Melman.
OpenTelemetry.AutoInstrumentation.ClrProfiler.Native,https://github.com/fmtlib/fmt,MIT,"Copyright (c) 2012 - present, Victor Zverovich"
Datadog.Trace.OpenTracing,https://github.com/opentracing/opentracing-csharp,MIT,Copyright 2016-2017 The OpenTracing Authors
Datadog.Trace.OpenTracing,https://github.com/opentracing-contrib/csharp-netcore,Apache-2.0,
(all),https://github.com/DataDog/dd-trace-dotnet,Apache-2.0,
62 changes: 62 additions & 0 deletions OpenTelemetry.AutoInstrumentation.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<TracerHomeDirectory Condition="'$(TracerHomeDirectory)' == ''">$(MSBuildThisFileDirectory)src\bin\windows-tracer-home</TracerHomeDirectory>
</PropertyGroup>

<ItemGroup>
<CsharpProject Include="src\**\*.csproj" />
<CppProject Include="src\**\*.vcxproj"/>
<CppTestProject Include="test\**\*.vcxproj"/>
<SampleProject Include="test\test-applications\**\*.csproj" />
</ItemGroup>

<Target Name="Restore">
<MSBuild Targets="Restore" Projects="@(CsharpProject);@(CppProject);@(SampleProject)"/>
</Target>

<Target Name="Clean">
<MSBuild Targets="Clean" Projects="@(CsharpProject);@(CppProject);@(SampleProject)"/>
</Target>

<!-- default target -->
<Target Name="Build">
<MSBuild Targets="Build" Projects="@(CsharpProject);@(CppProject)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="BuildFrameworkReproductions">
<MSBuild Targets="Build" Projects="@(FrameworkReproduction)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="BuildCsharp">
<MSBuild Targets="Restore" Projects="@(CsharpProject)" Properties="Platform=AnyCPU">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>

<MSBuild Targets="Build" Projects="@(CsharpProject)" Properties="Platform=AnyCPU">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="BuildCpp">
<MSBuild Targets="Build" Projects="@(CppProject)" Condition="'$(Platform)' == 'x64' OR '$(Platform)' == 'All'" Properties="Platform=x64">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>

<MSBuild Targets="Build" Projects="@(CppProject)" Condition="'$(Platform)' == 'x86' OR '$(Platform)' == 'All' OR '$(Buildx86Profiler)' == 'true'" Properties="Platform=x86">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="BuildCppTests">
<MSBuild Targets="Build" Projects="@(CppTestProject)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

</Project>
10 changes: 4 additions & 6 deletions Datadog.Trace.sln → OpenTelemetry.AutoInstrumentation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
MinimumVisualStudioVersion = 15.0.26124.0
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native", "src\Datadog.Trace.ClrProfiler.Native\Datadog.Trace.ClrProfiler.Native.vcxproj", "{91B6272F-5780-4C94-8071-DBBA7B4F67F3}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenTelemetry.AutoInstrumentation.ClrProfiler.Native", "src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.vcxproj", "{91B6272F-5780-4C94-8071-DBBA7B4F67F3}"
ProjectSection(ProjectDependencies) = postProject
{AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77} = {AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native.DLL", "src\Datadog.Trace.ClrProfiler.Native\Datadog.Trace.ClrProfiler.Native.DLL.vcxproj", "{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.DLL", "src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.DLL.vcxproj", "{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}"
ProjectSection(ProjectDependencies) = postProject
{AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77} = {AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77}
EndProjectSection
Expand All @@ -22,8 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.cmd = build.cmd
build.ps1 = build.ps1
build.sh = build.sh
build_poc.sh = build_poc.sh
Datadog.Trace.proj = Datadog.Trace.proj
Directory.Build.props = Directory.Build.props
GlobalSuppressions.cs = GlobalSuppressions.cs
integrations.json = integrations.json
Expand All @@ -40,7 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9E5F0022-0A5
src\GlobalSuppressions.cs = src\GlobalSuppressions.cs
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Datadog.Trace.ClrProfiler.Managed.Loader", "src\Datadog.Trace.ClrProfiler.Managed.Loader\Datadog.Trace.ClrProfiler.Managed.Loader.csproj", "{AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.AutoInstrumentation.ClrProfiler.Managed.Loader", "src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Managed.Loader\OpenTelemetry.AutoInstrumentation.ClrProfiler.Managed.Loader.csproj", "{AB8596C1-CFDA-4A5E-9E9C-74A3DF9AED77}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.AspNetCoreMvc31", "samples\Samples.AspNetCoreMvc31\Samples.AspNetCoreMvc31.csproj", "{303F8E41-691F-4453-AB7D-88A0036C0465}"
EndProject
Expand All @@ -67,7 +65,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OldReference", "samples\Old
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{67941CB3-DC46-4E26-B7BF-8B27A298A2E8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native.Tests", "test\Datadog.Trace.ClrProfiler.Native.Tests\Datadog.Trace.ClrProfiler.Native.Tests.vcxproj", "{5728056A-51AA-4FF5-AD0C-E86E44E36102}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.Tests", "test\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.Tests\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.Tests.vcxproj", "{5728056A-51AA-4FF5-AD0C-E86E44E36102}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test-applications", "test-applications", "{7A9D19CA-E5FF-4FB1-A89A-B1C92BEC8982}"
EndProject
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It would be good to have some automation here to test without doing to much stuf

1. Remove `Datadog.Trace.Tracer` and a lot of related code.
We can just keep the AutoInstrumentation integration boilerplate for HTTP Client and ASP.NET.
1. Change the `Datadog.Trace.ClrProfiler.Instrumentation.Initialize()` method
1. Change the `OpenTelemetry.AutoInstrumentation.ClrProfiler.Instrumentation.Initialize()` method
so that it will be the place where the global OTel trace provider will be configured.

It would be good to have a checkpoint here where the instrumented application is NOOP-instrumented.
Expand All @@ -45,7 +45,7 @@ It would be good to have a checkpoint here where the instrumented application is
[question](https://cloud-native.slack.com/archives/C01N3BC2W7Q/p1620994235161800)
1. Add manual instrumentation to the applications.
1. Try auto-instrumentation using ActivitySource
e.g. in `Datadog.Trace.ClrProfiler.AutoInstrumentation.Http.HttpClient.HttpMessageHandlerCommon`.
e.g. in `OpenTelemetry.AutoInstrumentation.ClrProfiler.AutoInstrumentation.Http.HttpClient.HttpMessageHandlerCommon`.
1. Test with different versions of OTel SDK in runtime.
1. Try using `AppDomain.CurrentDomain.AssemblyResolve +=` to add a fallback
if the instrumented app does not reference the OTel SDK.
Expand Down
Loading