Commit Graph

4 Commits

Author SHA1 Message Date
Zach Montoya 4ce932f6d1
[Windows] Eager assembly load of managed profiler code (#462)
Implementation Changes (Enabled only on Windows for now):
* Creates a new library called Datadog.Trace.ClrProfiler.Managed.Loader that is embedded in the native profiler image. When the type is loaded, it has a static constructor to call Assembly.Load on our managed profiler code in a try-catch block.

* On first JITCompilationStarted, dynamically emit IL to load the Datadog.Trace.ClrProfiler.Managed.Loader assembly and attempt to load the managed profiler code.

* Change the native profiler so no edits are made in the JITCompilationStarted event unless the managed profiler code is already loaded.

* Keep track of the app domain of mscorlib, the managed profiler assembly, and the method caller's assembly and do not edit the IL of a method if referencing the managed profiler assembly would invalidate the caller's domain-neutral assembly reference closure.


Tests and Results:
* Enable a subset of integration tests on Windows. Smoke tests and the E2E HttpClientTests are now run on Windows.

* Fixes System.IO.FileNotFoundException when trying to load (Assembly.Load) the managed profiler but it cannot be found. Adds a smoke test called AssemblyLoad.FileNotFoundException to verify the behavior (Windows-only for now).

* Fixes System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. Adds a smoke test called SecurityGrant.FileNotFoundException to verify the behavior (only runs on .NET Framework).
2019-08-12 15:30:05 -07:00
Lucas Pimentel adebdd5bf9
fix C++ builds (and make them faster) (#288)
* remove unused vcpkgs

* read platform from env var is available

* for Windows builds, use nlohmann.json NuGet package instead of vcpkg

* remove unused scripts

* add the two managed projects required to run native integration tests

* remove vcpkg references in test project

* add nlohmann.json nuget package to test project

* remove unused vcpkg script
2019-03-21 07:35:30 -04:00
Chad Boyd 16734d2b42 Add WebForms integration (#263)
* shelve over to other machine
* adding ref to demo
* bug fixes and instrumention for webforms auto integration, void method integrations, adding shared interfaces and services for decorating traces (instead of inlining code dependencies in each integration, etc
* copying over webforms sample from demo project for integration test purposes, consolidating the http module for use elsewhere possibly while keeping webforms integration able ot be defined auto vs. web config
* updating code format, moving http module for webforms to derived class
* pr feedback re: dotsettings
* pr feedback, dropping AspNetWebForms related stuff, just AspNet
* test update for framework
* test update for race condition
2019-03-07 17:27:44 -05:00
Chad Boyd 4f5d5c1ec4
Simple organization (#261)
* shelve over to other machine

* config

* adding ref to demo
2019-02-12 08:19:56 -08:00