-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow ElasticApmStartupHook to work with System.Diagnostics.Diagnosti…
…cSource 4 and 5 (#1138) Allow ElasticApmStartupHook to work with System.Diagnostics.DiagnosticSource 4 and 5 This commit updates the startup hook implementation to allow it to work with applications that are compiled against either System.Diagnostics.DiagnosticSource 4 or 5. Introduce a `DiagnosticSourceVersion` MSBuild property to Elastic.Apm to conditionally reference a different version of System.Diagnostics.DiagnosticSource. The build agent-zip task uses this property to compile Elastic.Apm against both System.Diagnostics.DiagnosticSource 4.x.x and 5.x.x, and package both into the startup hook zip file, under directories 4.0.0 and 5.0.0, respectively. Split the startup hook agent assembly and dependency loading into its own assembly, Elastic.Apm.StartupHook.Loader. The Elastic.Apm.StartupHook.Loader takes a reference on Elastic.Apm, allowing different versions to be compiled for different referenced System.Diagnostics.DiagnosticSource versions. The role of ElasticApmStartupHook is now to determine if a version of System.Diagnostics.DiagnosticSource is already loaded or which version will be loaded, using this information to determine which version of Elastic.Apm.StartupHook.Loader to load and invoke. Other changes: * Update the build project pack target to build nuget packages and the zip file for startup hooks. The CI linux scripts are updated to use the build project pack target, requiring them to look in one directory for nuget packages, and allowing them to artifact the zip file. * Rename ElasticApmStartupHook to ElasticApmAgentStartupHook * Don't build .NET Framework in Release configuration for now Hanging on CI - last successful runs did not build with Release configuration, so running without for now.
- Loading branch information
Showing
33 changed files
with
620 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script runs the dotnet build without the sample projects | ||
# | ||
set -euxo pipefail | ||
|
||
# Remove Full Framework projects | ||
.ci/linux/remove-projects.sh | ||
set -euxo pipefail | ||
|
||
dotnet build | ||
./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Builds a docker image containing all of the assemblies needed to | ||
# auto instrument the APM agent using startup hooks. | ||
# | ||
# Assumes that the agent | ||
|
||
FROM busybox | ||
|
||
RUN mkdir /usr/agent | ||
|
||
# Assumes that the agent directory has been built. | ||
# Run build.[bat|sh] agent-zip to build it | ||
COPY . /usr/agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.