diff --git a/src/Elastic.Apm/Api/Service.cs b/src/Elastic.Apm/Api/Service.cs index 4a827d2bd..07107c7a9 100644 --- a/src/Elastic.Apm/Api/Service.cs +++ b/src/Elastic.Apm/Api/Service.cs @@ -96,8 +96,8 @@ static bool CheckForLoadedAssembly(string name) // Legacy mechanism: if the profiler is loaded add a `p` suffix to Agent.Version service.Agent.Version += "-p"; // Check if profiler was injected via K8S hook. - var envvars =new EnvironmentVariables(logger); - if (envvars.SafeCheckValue("ELASTIC_APM_ACTIVATION_METHOD", "K8S") + var envvars = new EnvironmentVariables(logger); + if (envvars.SafeCheckValue("ELASTIC_APM_ACTIVATION_METHOD", "K8S") || envvars.SafeCheckValue("ELASTIC_APM_ACTIVATION_METHOD", "K8S_ATTACH")) activationMethod = Consts.ActivationK8SAttach; else diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/DuckTyping/DuckType.Statics.cs b/src/profiler/Elastic.Apm.Profiler.Managed/DuckTyping/DuckType.Statics.cs index e4c1ba5c2..06e95ca64 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/DuckTyping/DuckType.Statics.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/DuckTyping/DuckType.Statics.cs @@ -66,7 +66,7 @@ public static partial class DuckType private static Dictionary> _ignoresAccessChecksToAssembliesSetDictionary = new Dictionary>(); #pragma warning restore IDE0044, IDE1006 - + internal static long AssemblyCount => _assemblyCount; internal static long TypeCount => _typeCount; diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Continuations/ValueTaskContinuationGeneratorTests.cs b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Continuations/ValueTaskContinuationGeneratorTests.cs index c49190903..688157da1 100644 --- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Continuations/ValueTaskContinuationGeneratorTests.cs +++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Continuations/ValueTaskContinuationGeneratorTests.cs @@ -23,7 +23,7 @@ public static TReturn OnAsyncMethodEnd(TTarget instance, TRetu returnValue; [Fact] - public async ValueTask SuccessTest() + public async Task SuccessTest() { var tcg = new ValueTaskContinuationGenerator(); var cTask = tcg.SetContinuation(this, GetPreviousTask(), null, CallTargetState.GetDefault());