diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index b2977e016..59e6dfd6b 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -97,11 +97,11 @@ module Main = Targets.Target("build", ["restore"; "clean"; "version"], Build.Build) - Targets.Target("build-profiler", ["build"; "clean-profiler"], Build.BuildProfiler) - - Targets.Target("profiler-integrations", ["build-profiler"], Build.ProfilerIntegrations) + Targets.Target("profiler-integrations", Build.ProfilerIntegrations) - Targets.Target("profiler-zip", ["profiler-integrations"], fun _ -> + Targets.Target("build-profiler", ["build"; "profiler-integrations"; "clean-profiler" ], Build.BuildProfiler) + + Targets.Target("profiler-zip", ["build-profiler"], fun _ -> printfn "Running profiler-zip..." let projs = !! (Paths.ProfilerProjFile "Elastic.Apm.Profiler.Managed") diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/AdoNetTypeNames.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/AdoNetTypeNames.cs index 0036fa84d..8ba6ccb94 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/AdoNetTypeNames.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/AdoNetTypeNames.cs @@ -26,7 +26,7 @@ public InstrumentNpgsqlAttribute() Assembly = "Npgsql"; Type = "Npgsql.NpgsqlCommand"; MinimumVersion = "4.0.0"; - MaximumVersion = "6.*.*"; + MaximumVersion = "7.*.*"; Group = "NpgsqlCommand"; } } diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryAsyncIntegration.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryAsyncIntegration.cs index da36b04fb..ed657ca31 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryAsyncIntegration.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryAsyncIntegration.cs @@ -23,16 +23,13 @@ namespace Elastic.Apm.Profiler.Managed.Integrations.AdoNet /// [InstrumentMySqlAttribute(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentNpgsql(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccess(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, - ParameterTypes = new[] { ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccessCore(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, - ParameterTypes = new[] { ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccess(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccessCore(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentMicrosoftDataSqlite(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentSystemDataSqlite(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentSystemDataSql(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentSystemDataSqlClient(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] - [InstrumentMicrosoftDataSqlClient(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, - ParameterTypes = new[] { ClrTypeNames.CancellationToken })] + [InstrumentMicrosoftDataSqlClient(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentSystemData(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] [InstrumentSystemDataCommon(Method = ExecuteNonQueryAsync, ReturnType = TaskInt32, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] public class CommandExecuteNonQueryAsyncIntegration @@ -67,3 +64,4 @@ public static TReturn OnAsyncMethodEnd(TTarget instance, TRetu } } } + diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryWithBehaviorIntegration.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryWithBehaviorIntegration.cs index 25ee8e540..119ace111 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryWithBehaviorIntegration.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteNonQueryWithBehaviorIntegration.cs @@ -21,20 +21,13 @@ namespace Elastic.Apm.Profiler.Managed.Integrations.AdoNet /// int [Command].ExecuteNonQuery(CommandBehavior) /// [InstrumentMySqlAttribute(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentNpgsql(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentOracleManagedDataAccess(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentOracleManagedDataAccessCore(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentMicrosoftDataSqlite(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentSystemDataSqlite(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentOracleManagedDataAccess(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentOracleManagedDataAccessCore(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentMicrosoftDataSqlite(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentSystemDataSqlite(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] [InstrumentSystemDataSql(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentSystemDataSqlClient(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentMicrosoftDataSqlClient(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentSystemDataSqlClient(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] + [InstrumentMicrosoftDataSqlClient(Method = ExecuteNonQuery, ReturnType = ClrTypeNames.Int32, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] public class CommandExecuteNonQueryWithBehaviorIntegration { /// diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderIntegration.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderIntegration.cs index 42737ba1a..55af529ad 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderIntegration.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderIntegration.cs @@ -20,7 +20,6 @@ namespace Elastic.Apm.Profiler.Managed.Integrations.AdoNet /// [*]DataReader [Command].ExecuteReader() /// [InstrumentMySqlAttribute(Method = ExecuteReader, ReturnType = MySql.DataReader)] - [InstrumentNpgsql(Method = ExecuteReader, ReturnType = Npgsql.DataReader)] [InstrumentOracleManagedDataAccess(Method = ExecuteReader, ReturnType = OracleManagedDataAccess.DataReader)] [InstrumentOracleManagedDataAccessCore(Method = ExecuteReader, ReturnType = OracleManagedDataAccess.DataReader)] [InstrumentMicrosoftDataSqlite(Method = ExecuteReader, ReturnType = MicrosoftDataSqlite.DataReader)] diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderWithBehaviorAsyncIntegration.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderWithBehaviorAsyncIntegration.cs index cb1193989..c1b5729dc 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderWithBehaviorAsyncIntegration.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteReaderWithBehaviorAsyncIntegration.cs @@ -22,44 +22,26 @@ namespace Elastic.Apm.Profiler.Managed.Integrations.AdoNet /// Task[*DataReader] [Command].ExecuteReaderAsync(CommandBehavior, CancellationToken) /// Task[DbDataReader] [Command].ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken) /// - [InstrumentMySqlAttribute(Method = ExecuteReaderAsync, ReturnType = MySql.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentNpgsql(Method = ExecuteReaderAsync, ReturnType = Npgsql.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccess(Method = ExecuteReaderAsync, ReturnType = OracleManagedDataAccess.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccessCore(Method = ExecuteReaderAsync, ReturnType = OracleManagedDataAccess.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentMicrosoftDataSqlite(Method = ExecuteReaderAsync, ReturnType = MicrosoftDataSqlite.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataSqlite(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlite.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataSql(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlServer.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataSqlClient(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlServer.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentMicrosoftDataSqlClient(Method = ExecuteReaderAsync, ReturnType = MicrosoftDataSqlServer.TaskDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentMySqlAttribute(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentNpgsql(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccess(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentOracleManagedDataAccessCore(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentMicrosoftDataSqlite(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataSql(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataSqlClient(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentMicrosoftDataSqlClient(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemData(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] - [InstrumentSystemDataCommon(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, - ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMySqlAttribute(Method = ExecuteReaderAsync, ReturnType = MySql.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentNpgsql(Method = ExecuteReaderAsync, ReturnType = Npgsql.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentNpgsql(Method = ExecuteReaderAsync, ReturnType = Npgsql.TaskDataReader, ParameterTypes = new[] { ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccess(Method = ExecuteReaderAsync, ReturnType = OracleManagedDataAccess.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccessCore(Method = ExecuteReaderAsync, ReturnType = OracleManagedDataAccess.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMicrosoftDataSqlite(Method = ExecuteReaderAsync, ReturnType = MicrosoftDataSqlite.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataSqlite(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlite.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataSql(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlServer.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataSqlClient(Method = ExecuteReaderAsync, ReturnType = SystemDataSqlServer.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMicrosoftDataSqlClient(Method = ExecuteReaderAsync, ReturnType = MicrosoftDataSqlServer.TaskDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMySqlAttribute(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentNpgsql(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccess(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentOracleManagedDataAccessCore(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMicrosoftDataSqlite(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataSql(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataSqlClient(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentMicrosoftDataSqlClient(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemData(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] + [InstrumentSystemDataCommon(Method = ExecuteDbDataReaderAsync, ReturnType = TaskDbDataReader, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior, ClrTypeNames.CancellationToken })] public class CommandExecuteReaderWithBehaviorAsyncIntegration { /// diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteScalarWithBehaviorIntegration.cs b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteScalarWithBehaviorIntegration.cs index c2e1d9514..7615c9d0a 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteScalarWithBehaviorIntegration.cs +++ b/src/profiler/Elastic.Apm.Profiler.Managed/Integrations/AdoNet/CommandExecuteScalarWithBehaviorIntegration.cs @@ -21,7 +21,6 @@ namespace Elastic.Apm.Profiler.Managed.Integrations.AdoNet /// object [Command].ExecuteScalar(CommandBehavior) /// [InstrumentMySqlAttribute(Method = ExecuteScalar, ReturnType = ClrTypeNames.Object, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] - [InstrumentNpgsql(Method = ExecuteScalar, ReturnType = ClrTypeNames.Object, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] [InstrumentOracleManagedDataAccess(Method = ExecuteScalar, ReturnType = ClrTypeNames.Object, ParameterTypes = new[] { AdoNetTypeNames.CommandBehavior })] [InstrumentOracleManagedDataAccessCore(Method = ExecuteScalar, ReturnType = ClrTypeNames.Object, diff --git a/src/profiler/Elastic.Apm.Profiler.Managed/integrations.yml b/src/profiler/Elastic.Apm.Profiler.Managed/integrations.yml index a8aa59cbb..e9a9e4fa7 100644 --- a/src/profiler/Elastic.Apm.Profiler.Managed/integrations.yml +++ b/src/profiler/Elastic.Apm.Profiler.Managed/integrations.yml @@ -360,7 +360,7 @@ - System.Threading.Tasks.Task`1 - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteNonQueryAsyncIntegration @@ -370,12 +370,14 @@ type: Npgsql.NpgsqlCommand method: ExecuteNonQuery signature_types: - - System.Int32 + - System.Threading.Tasks.Task`1 + - System.Boolean + - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 - type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteNonQueryIntegration + type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteNonQueryAsyncIntegration action: CallTargetModification - target: assembly: Npgsql @@ -383,12 +385,11 @@ method: ExecuteNonQuery signature_types: - System.Int32 - - System.Data.CommandBehavior minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 - type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteNonQueryWithBehaviorIntegration + type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteNonQueryIntegration action: CallTargetModification - target: assembly: Npgsql @@ -398,7 +399,7 @@ - System.Threading.Tasks.Task`1 - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderAsyncIntegration @@ -406,14 +407,16 @@ - target: assembly: Npgsql type: Npgsql.NpgsqlCommand - method: ExecuteReader + method: ExecuteReaderAsync signature_types: - - Npgsql.NpgsqlDataReader + - System.Threading.Tasks.Task`1 + - System.Data.CommandBehavior + - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 - type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderIntegration + type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderWithBehaviorAsyncIntegration action: CallTargetModification - target: assembly: Npgsql @@ -421,10 +424,9 @@ method: ExecuteReaderAsync signature_types: - System.Threading.Tasks.Task`1 - - System.Data.CommandBehavior - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderWithBehaviorAsyncIntegration @@ -438,7 +440,7 @@ - System.Data.CommandBehavior - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderWithBehaviorAsyncIntegration @@ -451,7 +453,7 @@ - Npgsql.NpgsqlDataReader - System.Data.CommandBehavior minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderWithBehaviorIntegration @@ -464,7 +466,7 @@ - System.Data.Common.DbDataReader - System.Data.CommandBehavior minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteReaderWithBehaviorIntegration @@ -477,7 +479,7 @@ - System.Threading.Tasks.Task`1 - System.Threading.CancellationToken minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteScalarAsyncIntegration @@ -489,24 +491,11 @@ signature_types: - System.Object minimum_version: 4.0.0 - maximum_version: 6.*.* + maximum_version: 7.*.* wrapper: assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteScalarIntegration action: CallTargetModification - - target: - assembly: Npgsql - type: Npgsql.NpgsqlCommand - method: ExecuteScalar - signature_types: - - System.Object - - System.Data.CommandBehavior - minimum_version: 4.0.0 - maximum_version: 6.*.* - wrapper: - assembly: Elastic.Apm.Profiler.Managed, Version=1.22.0.0, Culture=neutral, PublicKeyToken=ae7400d2c189cf22 - type: Elastic.Apm.Profiler.Managed.Integrations.AdoNet.CommandExecuteScalarWithBehaviorIntegration - action: CallTargetModification - name: OracleCommand method_replacements: - target: diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs index c340b3675..741684597 100644 --- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs +++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs @@ -42,7 +42,9 @@ public static IEnumerable TestParameters yield return new object[] { "net462", npgSqlVersion }; npgSqlVersion = "6.0.2"; + yield return new object[] { "net7.0", npgSqlVersion }; + npgSqlVersion = "7.0.2"; yield return new object[] { "net7.0", npgSqlVersion }; } }