-
Notifications
You must be signed in to change notification settings - Fork 205
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
Allow ElasticApmStartupHook to work with System.Diagnostics.DiagnosticSource 4 and 5 #1138
Allow ElasticApmStartupHook to work with System.Diagnostics.DiagnosticSource 4 and 5 #1138
Conversation
This commit updates the pack and publish build functions to pack and publish all releasable artifacts.
…cSource 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 `UseDiagnosticSourceFour` MSBuild property to Elastic.Apm to conditionally reference System.Diagnostics.DiagnosticSource 4.x.x or 5.x.x. The build agent-zip task uses the 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. Split the startup hook agent assembly and dependency loading into its own assembly, Elastic.Apm.StartupHook.Loader, compiled against Elastic.Apm, allowing different versions to be compiled for different referenced System.Diagnostics.DiagnosticSource versions. ElasticApmStartupHook now determines if a version of System.Diagnostics.DiagnosticSource is already loaded, using this to determine which version of Elastic.Apm.StartupHook.Loader to load and invoke.
Codecov Report
@@ Coverage Diff @@
## master #1138 +/- ##
===========================================
+ Coverage 49.83% 79.55% +29.71%
===========================================
Files 155 160 +5
Lines 6188 6543 +355
===========================================
+ Hits 3084 5205 +2121
+ Misses 3104 1338 -1766
Continue to review full report at Codecov.
|
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
|
run tests |
This commit updates 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.
Remove addition of JunitXml.TestLogger. Added through Directory.Build.props
Without this causes a FileLoadException. Looks to be related to coverlet-coverage/coverlet#449
run tests |
Hangs on CI - last successful runs did not build with Release configuration, so trying this.
The build target
A similar approach would help with #1073 |
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.
Nice 👍
Added a few minor things I noticed.
Will merge this in and follow up with a PR with automated tests. Manually tested with ASP.NET Core 3.1 and ASP.NET 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
UseDiagnosticSourceFour
MSBuild property to Elastic.Apm to conditionally referenceSystem.Diagnostics.DiagnosticSource
4.x.x or 5.x.x. The build agent-zip task uses the 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.Split the startup hook agent assembly and dependency loading into its own assembly,
Elastic.Apm.StartupHook.Loader
, compiled against Elastic.Apm, allowing different versions to be compiled for different referencedSystem.Diagnostics.DiagnosticSource
versions.ElasticApmStartupHook
now determines if a version ofSystem.Diagnostics.DiagnosticSource
is already loaded, using this to determine which version ofElastic.Apm.StartupHook.Loader
to load and invoke.Update the build project
pack
target to build nuget packages and the zip file for startup hooks, and update CI linux scripts to use the build projectpack
target. This change requires the CI scripts to look in one directory for nuget packages, and allows artifacting the zip file.Closes #1072
Closes #1134