diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 178eb067e..d25a1a2c1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -66,7 +66,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- gh release upload ${{ github.ref_name }} "build/output/ElasticApmAgent_*.zip" "build/output/elastic_apm_profiler_*.zip"
+ gh release upload ${{ github.ref_name }} "build/output/ElasticApmAgent_${{ steps.bootstrap.outputs.agent-version }}.zip" "build/output/elastic_apm_profiler_${{ steps.bootstrap.outputs.agent-version }}-linux-x64.zip"
- if: ${{ success() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
@@ -114,7 +114,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true #continue for now until we see it working in action
run: |
- gh release upload ${{ github.ref_name }} "build/output/elastic_apm_profiler_*.zip"
+ gh release upload ${{ github.ref_name }} "build/output/elastic_apm_profiler_${{ steps.bootstrap.outputs.agent-version }}-win-x64.zip"
post-release:
needs: [ 'release-windows']
diff --git a/.github/workflows/test-windows-iis-reporter.yml b/.github/workflows/test-windows-iis-reporter.yml
index b370fa2ee..ea123af45 100644
--- a/.github/workflows/test-windows-iis-reporter.yml
+++ b/.github/workflows/test-windows-iis-reporter.yml
@@ -12,6 +12,11 @@ jobs:
report:
runs-on: ubuntu-latest
name: IIS Test Summary
+ # disable IIS on CI for now.
+ # Run locally and started failing randomly on github actions
+ # Could be because of plethora of reasons including no disk space
+ # Requires longer investigation
+ if: ${{ false }}
steps:
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
with:
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 9afcb6630..fd7d625cb 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,19 @@ endif::[]
[[release-notes-1.x]]
=== .NET Agent version 1.x
+[[release-notes-1.25.2]]
+==== 1.25.2
+
+This release fixes a bug in `Elastic.Apm.AspNetCore` when using ` UseElasticApm()` not correctly setting status codes.
+The bug was not present in the more commonly used `Elastic.Apm.NetCoreAll` since it uses a `DiagnosticListener` approach.
+With this release we ensure both packages use the exact same `DiagnosticListener` mechanism to instrument ASP.NET Core.
+
+===== Bug fixes
+
+{pull}2213[#2213] Remove ApmMiddleWare, only use DiagnosticSource listener for ASP.NET Core.
+{pull}2239[#2239] Move StartupHooks over to netstandard2.0.
+
+
[[release-notes-1.25.1]]
==== 1.25.1
diff --git a/build/scripts/Build.fs b/build/scripts/Build.fs
index 25eda918f..0f50b0f7f 100644
--- a/build/scripts/Build.fs
+++ b/build/scripts/Build.fs
@@ -218,7 +218,7 @@ module Build =
agentDir.Create()
// copy startup hook to root of agent directory
- !! (Paths.BuildOutput "ElasticApmAgentStartupHook/netcoreapp2.2")
+ !! (Paths.BuildOutput "ElasticApmAgentStartupHook/netstandard2.0")
|> Seq.filter Path.isDirectory
|> Seq.map DirectoryInfo
|> Seq.iter (copyDllsAndPdbs agentDir)
@@ -231,14 +231,14 @@ module Build =
|> Seq.iter (copyDllsAndPdbs (agentDir.CreateSubdirectory(sprintf "%i.0.0" getCurrentApmDiagnosticSourceVersion.Major)))
// assemblies compiled against older version of System.Diagnostics.DiagnosticSource
- !! (Paths.BuildOutput (sprintf "Elastic.Apm.StartupHook.Loader_%i.0.0/netcoreapp2.2" oldDiagnosticSourceVersion.Major))
+ !! (Paths.BuildOutput (sprintf "Elastic.Apm.StartupHook.Loader_%i.0.0/netstandard2.0" oldDiagnosticSourceVersion.Major))
++ (Paths.BuildOutput (sprintf "Elastic.Apm_%i.0.0/netstandard2.0" oldDiagnosticSourceVersion.Major))
|> Seq.filter Path.isDirectory
|> Seq.map DirectoryInfo
|> Seq.iter (copyDllsAndPdbs (agentDir.CreateSubdirectory(sprintf "%i.0.0" oldDiagnosticSourceVersion.Major)))
// assemblies compiled against 6.0 version of System.Diagnostics.DiagnosticSource
- !! (Paths.BuildOutput (sprintf "Elastic.Apm.StartupHook.Loader_%i.0.0/netcoreapp2.2" oldDiagnosticSourceVersion.Major)) //using old version here, because it the netcoreapp2.2 app can't build with diagnosticsource6
+ !! (Paths.BuildOutput (sprintf "Elastic.Apm.StartupHook.Loader_%i.0.0/netstandard2.0" oldDiagnosticSourceVersion.Major)) //using old version here, because it the netcoreapp2.2 app can't build with diagnosticsource6
++ (Paths.BuildOutput (sprintf "Elastic.Apm_%i.0.0/net6.0" diagnosticSourceVersion6.Major))
|> Seq.filter Path.isDirectory
|> Seq.map DirectoryInfo
diff --git a/src/startuphook/Elastic.Apm.StartupHook.Loader/Elastic.Apm.StartupHook.Loader.csproj b/src/startuphook/Elastic.Apm.StartupHook.Loader/Elastic.Apm.StartupHook.Loader.csproj
index 109cdb28d..19d9afedc 100644
--- a/src/startuphook/Elastic.Apm.StartupHook.Loader/Elastic.Apm.StartupHook.Loader.csproj
+++ b/src/startuphook/Elastic.Apm.StartupHook.Loader/Elastic.Apm.StartupHook.Loader.csproj
@@ -1,23 +1,25 @@
-
-
- netcoreapp2.2
- false
-
+
+ netstandard2.0
+ false
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StartupHookLogger.cs
+
+
-
-
- StartupHookLogger.cs
-
-
-
diff --git a/src/startuphook/ElasticApmAgentStartupHook/ElasticApmAgentStartupHook.csproj b/src/startuphook/ElasticApmAgentStartupHook/ElasticApmAgentStartupHook.csproj
index 6ffb43834..5c79c06d5 100644
--- a/src/startuphook/ElasticApmAgentStartupHook/ElasticApmAgentStartupHook.csproj
+++ b/src/startuphook/ElasticApmAgentStartupHook/ElasticApmAgentStartupHook.csproj
@@ -1,9 +1,11 @@
-
- netcoreapp2.2
+ netstandard2.0
ElasticApmAgentStartupHook
false
ElasticApmStartupHook
+
+
+
diff --git a/src/startuphook/ElasticApmAgentStartupHook/StartupHookLogger.cs b/src/startuphook/ElasticApmAgentStartupHook/StartupHookLogger.cs
index 290b6e59d..7bbf532ef 100644
--- a/src/startuphook/ElasticApmAgentStartupHook/StartupHookLogger.cs
+++ b/src/startuphook/ElasticApmAgentStartupHook/StartupHookLogger.cs
@@ -46,19 +46,19 @@ public static StartupHookLogger Create()
public void WriteLine(string message)
{
- if (_enabled)
+ if (!_enabled)
+ return;
+
+ try
+ {
+ var log = $"[{DateTime.Now:u}] {message}";
+ Console.Out.WriteLine(log);
+ Console.Out.Flush();
+ File.AppendAllLines(_logPath, new[] { log });
+ }
+ catch
{
- try
- {
- var log = $"[{DateTime.Now:u}] {message}";
- Console.Out.WriteLine(log);
- Console.Out.Flush();
- File.AppendAllLines(_logPath, new[] { log });
- }
- catch
- {
- // if we can't log a log message, there's not much that can be done, so ignore
- }
+ // if we can't log a log message, there's not much that can be done, so ignore
}
}
}