Skip to content
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

Add support for Aerospike.Client v8 #6424

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tracer/build/PackageVersionsGeneratorDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,12 +603,13 @@
"SampleProjectName": "Samples.Aerospike",
"NugetPackageSearchName": "Aerospike.Client",
"MinVersion": "4.0.0",
"MaxVersionExclusive": "8.0.0",
"MaxVersionExclusive": "9.0.0",
"SpecificVersions": [
"4.0.*",
"4.*.*",
"5.*.*",
"7.*.*"
"7.*.*",
"8.*.*"
],
"VersionConditions": [{
"MinVersion": "6.0.0",
Expand Down
24 changes: 24 additions & 0 deletions tracer/build/PackageVersionsLatestMajors.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -3984,6 +3984,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net6.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.3.1;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
Expand All @@ -4008,6 +4014,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.3.1;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -4032,6 +4044,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.3.1;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
Expand All @@ -4056,6 +4074,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Couchbase\Samples.Couchbase.csproj">
<Properties>ApiVersion=2.7.27;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net462</TargetFramework>
Expand Down
24 changes: 24 additions & 0 deletions tracer/build/PackageVersionsLatestMinors.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -21486,6 +21486,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net6.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
Expand Down Expand Up @@ -21588,6 +21594,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
Expand Down Expand Up @@ -21690,6 +21702,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
Expand Down Expand Up @@ -21792,6 +21810,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Couchbase\Samples.Couchbase.csproj">
<Properties>ApiVersion=2.4.8;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net462</TargetFramework>
Expand Down
24 changes: 24 additions & 0 deletions tracer/build/PackageVersionsLatestSpecific.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -5478,6 +5478,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net6.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
Expand All @@ -5502,6 +5508,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net7.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -5526,6 +5538,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net8.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=4.0.3;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
Expand All @@ -5550,6 +5568,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Aerospike\Samples.Aerospike.csproj">
<Properties>ApiVersion=8.0.0;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net9.0</TargetFramework>
<RequiresDockerDependency>All</RequiresDockerDependency>
<SampleName>Samples.Aerospike</SampleName>
</PackageVersionSample>
<PackageVersionSample Include="test\test-applications\integrations\Samples.Couchbase\Samples.Couchbase.csproj">
<Properties>ApiVersion=2.4.8;RestoreRecursive=false;BuildProjectReferences=false</Properties>
<TargetFramework>net462</TargetFramework>
Expand Down
4 changes: 2 additions & 2 deletions tracer/build/supported_calltargets.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@
"Item3": 0
},
"MaximumVersion": {
"Item1": 7,
"Item1": 8,
"Item2": 65535,
"Item3": 65535
},
Expand All @@ -848,7 +848,7 @@
"Item3": 0
},
"MaximumVersion": {
"Item1": 7,
"Item1": 8,
"Item2": 65535,
"Item3": 65535
},
Expand Down
2 changes: 1 addition & 1 deletion tracer/build/supported_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"minVersionTestedInclusive": "4.0.3",
"maxVersionSupportedInclusive": "7.4.0",
"maxVersionAvailableInclusive": "8.0.0",
"maxVersionTestedInclusive": "7.4.0"
"maxVersionTestedInclusive": "8.0.0"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion tracer/dependabot/Datadog.Dependabot.Integrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- Integration: AerospikeClient -->
<!-- Assembly: AerospikeClient -->
<!-- Latest package https://www.nuget.org/packages/Aerospike.Client/8.0.0 -->
<PackageReference Include="Aerospike.Client" Version="7.4.0" />
<PackageReference Include="Aerospike.Client" Version="8.0.0" />

<!-- Integration: Amazon.Lambda.RuntimeSupport -->
<!-- Assembly: Amazon.Lambda.RuntimeSupport -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ public static Scope CreateScope<TTarget>(Tracer tracer, TTarget target)
tags.SetName = key.SetName;
tags.UserKey = key.UserKey.ToString();
}
else if (target.TryDuckCast<HasKeyV8>(out var hasKeyV8))
{
var key = hasKeyV8.Key;

tags.Key = FormatKey(key);
tags.Namespace = key.Ns;
tags.SetName = key.SetName;
tags.UserKey = key.UserKey.ToString();
}
else if (target.TryDuckCast<HasKeys>(out var hasKeys))
{
bool isFirstKey = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike
MethodName = "ExecuteCommand",
ReturnTypeName = ClrNames.Void,
MinimumVersion = "4.0.0",
MaximumVersion = "7.*.*",
MaximumVersion = "8.*.*",
IntegrationName = AerospikeCommon.IntegrationName)]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// <copyright file="HasKeyV8.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>

#nullable enable

using Datadog.Trace.DuckTyping;

namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike;

/// <summary>
/// Duck type for https://github.com/aerospike/aerospike-client-csharp/blob/a008a41a2c81916f7dd8db2e2757b516bdad77a8/AerospikeClient/Async/AsyncWriteBase.cs#L23
/// Differs from HasKey in that the former reads from a field called "key" and the latter reads from a property called "Key"
/// </summary>
[DuckCopy]
internal struct HasKeyV8
{
public Key Key;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike
MethodName = "ExecuteCommand",
ReturnTypeName = ClrNames.Void,
MinimumVersion = "4.0.0",
MaximumVersion = "7.*.*",
MaximumVersion = "8.*.*",
IntegrationName = AerospikeCommon.IntegrationName)]
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ std::vector<CallTargetDefinition3> g_callTargets=
{(WCHAR*)WStr("System.Data.Common"),(WCHAR*)WStr("System.Data.Common.DbDataReader"),(WCHAR*)WStr("GetValue"),g_callTargets_Sig_133,2,4,0,0,9,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.AdoNet.ReaderGetStringIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("System.Data.Common"),(WCHAR*)WStr("System.Data.Common.DbDataReader"),(WCHAR*)WStr("Read"),g_callTargets_Sig_094,1,4,0,0,9,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.AdoNet.ReaderReadIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("System.Data.Common"),(WCHAR*)WStr("System.Data.Common.DbDataReader"),(WCHAR*)WStr("ReadAsync"),g_callTargets_Sig_229,2,4,0,0,9,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.AdoNet.ReaderReadAsyncIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("AerospikeClient"),(WCHAR*)WStr("Aerospike.Client.AsyncCommand"),(WCHAR*)WStr("ExecuteCommand"),g_callTargets_Sig_233,1,4,0,0,7,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike.AsyncCommandIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("AerospikeClient"),(WCHAR*)WStr("Aerospike.Client.SyncCommand"),(WCHAR*)WStr("ExecuteCommand"),g_callTargets_Sig_233,1,4,0,0,7,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike.SyncCommandIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("AerospikeClient"),(WCHAR*)WStr("Aerospike.Client.AsyncCommand"),(WCHAR*)WStr("ExecuteCommand"),g_callTargets_Sig_233,1,4,0,0,8,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike.AsyncCommandIntegration"),CallTargetKind::Default,1,15},
{(WCHAR*)WStr("AerospikeClient"),(WCHAR*)WStr("Aerospike.Client.SyncCommand"),(WCHAR*)WStr("ExecuteCommand"),g_callTargets_Sig_233,1,4,0,0,8,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Aerospike.SyncCommandIntegration"),CallTargetKind::Default,1,15},
#if _WIN32
{(WCHAR*)WStr("System.Web"),(WCHAR*)WStr("System.Web.Compilation.BuildManager"),(WCHAR*)WStr("InvokePreStartInitMethodsCore"),g_callTargets_Sig_261,3,4,0,0,4,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNet.HttpModule_Integration"),CallTargetKind::Default,1,1},
{(WCHAR*)WStr("System.Web"),(WCHAR*)WStr("System.Web.ThreadContext"),(WCHAR*)WStr("AssociateWithCurrentThread"),g_callTargets_Sig_256,2,4,0,0,4,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNet.ThreadContext_AssociateWithCurrentThread_Integration"),CallTargetKind::Default,1,1},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1667,24 +1667,28 @@ public class PackageVersionsLatestMajors
new object[] { "5.4.1" },
new object[] { "6.2.1" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET7_0
new object[] { "4.3.1" },
new object[] { "5.4.1" },
new object[] { "6.2.1" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET8_0
new object[] { "4.3.1" },
new object[] { "5.4.1" },
new object[] { "6.2.1" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET9_0
new object[] { "4.3.1" },
new object[] { "5.4.1" },
new object[] { "6.2.1" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#endif
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4584,6 +4584,7 @@ public class PackageVersionsLatestMinors
new object[] { "7.2.0" },
new object[] { "7.3.0" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET7_0
new object[] { "4.0.3" },
Expand All @@ -4603,6 +4604,7 @@ public class PackageVersionsLatestMinors
new object[] { "7.2.0" },
new object[] { "7.3.0" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET8_0
new object[] { "4.0.3" },
Expand All @@ -4622,6 +4624,7 @@ public class PackageVersionsLatestMinors
new object[] { "7.2.0" },
new object[] { "7.3.0" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#if NET9_0
new object[] { "4.0.3" },
Expand All @@ -4641,6 +4644,7 @@ public class PackageVersionsLatestMinors
new object[] { "7.2.0" },
new object[] { "7.3.0" },
new object[] { "7.4.0" },
new object[] { "8.0.0" },
#endif
#endif
};
Expand Down
Loading
Loading