diff --git a/tracer/build/PackageVersionsGeneratorDefinitions.json b/tracer/build/PackageVersionsGeneratorDefinitions.json
index c75f371239b0..aed37044c6f9 100644
--- a/tracer/build/PackageVersionsGeneratorDefinitions.json
+++ b/tracer/build/PackageVersionsGeneratorDefinitions.json
@@ -102,14 +102,18 @@
"SampleProjectName": "Samples.MongoDB",
"NugetPackageSearchName": "MongoDB.Driver",
"MinVersion": "2.0.0",
- "MaxVersionExclusive": "3.0.0",
+ "MaxVersionExclusive": "4.0.0",
"SpecificVersions": [
"2.0.*",
"2.5.*",
"2.14.*",
- "2.*.*"
+ "2.*.*",
+ "3.*.*"
],
"VersionConditions": [{
+ "MinVersion": "3.0.0",
+ "ExcludeTargetFrameworks": ["net462", "netcoreapp2.1", "netcoreapp3.0", "netcoreapp3.1"]
+ },{
"MaxVersionExclusive": "2.3.0",
"IncludeOnlyTargetFrameworks": ["net462"]
}]
diff --git a/tracer/build/PackageVersionsLatestMajors.g.props b/tracer/build/PackageVersionsLatestMajors.g.props
index 5dbe4d812795..1227fbc46a5f 100644
--- a/tracer/build/PackageVersionsLatestMajors.g.props
+++ b/tracer/build/PackageVersionsLatestMajors.g.props
@@ -330,30 +330,60 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net5.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.30.0;RestoreRecursive=false;BuildProjectReferences=false
net6.0
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net6.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.30.0;RestoreRecursive=false;BuildProjectReferences=false
net7.0
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net7.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.30.0;RestoreRecursive=false;BuildProjectReferences=false
net8.0
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net8.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.30.0;RestoreRecursive=false;BuildProjectReferences=false
net9.0
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net9.0
+ All
+ Samples.MongoDB
+
ApiVersion=7.17.5;RestoreRecursive=false;BuildProjectReferences=false
net462
diff --git a/tracer/build/PackageVersionsLatestMinors.g.props b/tracer/build/PackageVersionsLatestMinors.g.props
index 4a20b435baf9..f82089733620 100644
--- a/tracer/build/PackageVersionsLatestMinors.g.props
+++ b/tracer/build/PackageVersionsLatestMinors.g.props
@@ -1866,6 +1866,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net5.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.3.0;RestoreRecursive=false;BuildProjectReferences=false
net6.0
@@ -2034,6 +2040,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net6.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.3.0;RestoreRecursive=false;BuildProjectReferences=false
net7.0
@@ -2202,6 +2214,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net7.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.3.0;RestoreRecursive=false;BuildProjectReferences=false
net8.0
@@ -2370,6 +2388,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net8.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.3.0;RestoreRecursive=false;BuildProjectReferences=false
net9.0
@@ -2538,6 +2562,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net9.0
+ All
+ Samples.MongoDB
+
ApiVersion=7.0.1;RestoreRecursive=false;BuildProjectReferences=false
net462
diff --git a/tracer/build/PackageVersionsLatestSpecific.g.props b/tracer/build/PackageVersionsLatestSpecific.g.props
index 9c3ff55bbefb..dab6855f3a97 100644
--- a/tracer/build/PackageVersionsLatestSpecific.g.props
+++ b/tracer/build/PackageVersionsLatestSpecific.g.props
@@ -744,6 +744,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net5.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.5.1;RestoreRecursive=false;BuildProjectReferences=false
net6.0
@@ -762,6 +768,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net6.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.5.1;RestoreRecursive=false;BuildProjectReferences=false
net7.0
@@ -780,6 +792,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net7.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.5.1;RestoreRecursive=false;BuildProjectReferences=false
net8.0
@@ -798,6 +816,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net8.0
+ All
+ Samples.MongoDB
+
ApiVersion=2.5.1;RestoreRecursive=false;BuildProjectReferences=false
net9.0
@@ -816,6 +840,12 @@ NOTE: This code was generated by the GeneratePackageVersions tool. To safely
All
Samples.MongoDB
+
+ ApiVersion=3.0.0;RestoreRecursive=false;BuildProjectReferences=false
+ net9.0
+ All
+ Samples.MongoDB
+
ApiVersion=7.0.1;RestoreRecursive=false;BuildProjectReferences=false
net462
diff --git a/tracer/build/_build/Honeypot/IntegrationGroups.cs b/tracer/build/_build/Honeypot/IntegrationGroups.cs
index b763811a0684..4909af83077e 100644
--- a/tracer/build/_build/Honeypot/IntegrationGroups.cs
+++ b/tracer/build/_build/Honeypot/IntegrationGroups.cs
@@ -54,6 +54,7 @@ static IntegrationMap()
NugetPackages.Add("Microsoft.Extensions.Logging", new [] { "Microsoft.Extensions.Logging" });
NugetPackages.Add("Microsoft.Extensions.Telemetry", new [] { "Microsoft.Extensions.Telemetry" });
NugetPackages.Add("Confluent.Kafka", new [] { "Confluent.Kafka" });
+ NugetPackages.Add("MongoDB.Driver", new [] { "MongoDB.Driver" });
NugetPackages.Add("MongoDB.Driver.Core", new [] { "MongoDB.Driver.Core", "MongoDB.Driver" });
NugetPackages.Add("Microsoft.VisualStudio.TestPlatform.TestFramework", new [] { "Microsoft.VisualStudio.TestPlatform" });
NugetPackages.Add("Microsoft.VisualStudio.TestPlatform.Common", new [] { "Microsoft.VisualStudio.TestPlatform" });
diff --git a/tracer/build/supported_calltargets.g.json b/tracer/build/supported_calltargets.g.json
index 7f46537f12bc..6800cad1749c 100644
--- a/tracer/build/supported_calltargets.g.json
+++ b/tracer/build/supported_calltargets.g.json
@@ -7952,7 +7952,7 @@
},
{
"IntegrationName": "MongoDb",
- "AssemblyName": "MongoDB.Driver.Core",
+ "AssemblyName": "MongoDB.Driver",
"TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1",
"TargetMethodName": "Execute",
"TargetReturnType": "!0",
@@ -7966,7 +7966,307 @@
"Item3": 0
},
"MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1",
+ "TargetMethodName": "ExecuteAsync",
+ "TargetReturnType": "System.Threading.Tasks.Task`1[!0]",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
+ "Item1": 2,
+ "Item2": 1,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
+ "Item2": 65535,
+ "Item3": 65535
+ },
+ "InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration",
+ "IntegrationKind": 0,
+ "IsAdoNetIntegration": false,
+ "InstrumentationCategory": 1
+ },
+ {
+ "IntegrationName": "MongoDb",
+ "AssemblyName": "MongoDB.Driver.Core",
+ "TargetTypeName": "MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1",
+ "TargetMethodName": "Execute",
+ "TargetReturnType": "!0",
+ "TargetParameterTypes": [
+ "MongoDB.Driver.Core.Connections.IConnection",
+ "System.Threading.CancellationToken"
+ ],
+ "MinimumVersion": {
"Item1": 2,
+ "Item2": 2,
+ "Item3": 0
+ },
+ "MaximumVersion": {
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -7991,7 +8291,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8016,7 +8316,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8041,7 +8341,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8066,7 +8366,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8091,7 +8391,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8116,7 +8416,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8141,7 +8441,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8216,7 +8516,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8241,7 +8541,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8266,7 +8566,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
@@ -8291,7 +8591,7 @@
"Item3": 0
},
"MaximumVersion": {
- "Item1": 2,
+ "Item1": 3,
"Item2": 65535,
"Item3": 65535
},
diff --git a/tracer/build/supported_versions.json b/tracer/build/supported_versions.json
index e0b28293e5a8..b76b381778bd 100644
--- a/tracer/build/supported_versions.json
+++ b/tracer/build/supported_versions.json
@@ -804,7 +804,7 @@
"minVersionTestedInclusive": "2.0.2",
"maxVersionSupportedInclusive": "2.30.0",
"maxVersionAvailableInclusive": "3.0.0",
- "maxVersionTestedInclusive": "2.30.0"
+ "maxVersionTestedInclusive": "3.0.0"
},
{
"name": "MongoDB.Driver.Core",
diff --git a/tracer/dependabot/Datadog.Dependabot.Integrations.csproj b/tracer/dependabot/Datadog.Dependabot.Integrations.csproj
index 665c8863511b..f09aaa4e415c 100644
--- a/tracer/dependabot/Datadog.Dependabot.Integrations.csproj
+++ b/tracer/dependabot/Datadog.Dependabot.Integrations.csproj
@@ -206,7 +206,7 @@
-
+
diff --git a/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml b/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml
index 8712f01fda36..1fa053f8bb96 100644
--- a/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml
+++ b/tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml
@@ -109,6 +109,7 @@
+
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/BsonSerializationHelper.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/BsonSerializationHelper.cs
index fa6f16720210..192aa9c2c191 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/BsonSerializationHelper.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/BsonSerializationHelper.cs
@@ -72,11 +72,22 @@ private static void SerializeWithCustomWriter(object obj, StringBuilder sb, Bson
// Create a "real" JsonWriter
var jsonWriterSettings = helper.JsonWriterSettingsProxy.Defaults;
- var jsonWriter = helper.CreateJsonWriterFunc(stringWriter, jsonWriterSettings).DuckCast();
+ var realJsonWriter = helper.CreateJsonWriterFunc(stringWriter, jsonWriterSettings);
// Wrap the real writer with our custom proxy that has extra behaviours
- var customBsonWriter = new MongoBsonWriter(jsonWriter, jsonWriterSettings);
- var customWriterProxy = customBsonWriter.DuckImplement(helper.IBsonWriterType);
+ object customWriterProxy;
+ if (helper.IsV3Bson)
+ {
+ var jsonWriter = realJsonWriter.DuckCast();
+ var customBsonWriter = new MongoBsonWriterV3(jsonWriter, jsonWriterSettings);
+ customWriterProxy = customBsonWriter.DuckImplement(helper.IBsonWriterType);
+ }
+ else
+ {
+ var jsonWriter = realJsonWriter.DuckCast();
+ var customBsonWriter = new MongoBsonWriter(jsonWriter, jsonWriterSettings);
+ customWriterProxy = customBsonWriter.DuckImplement(helper.IBsonWriterType);
+ }
// Find the serializer and serializer
var nominalType = obj.GetType();
@@ -97,6 +108,7 @@ private class BsonHelper
internal readonly Func CreateJsonWriterFunc;
internal readonly Func CreateBsonSerializationArgsFunc;
internal readonly Type IBsonWriterType;
+ internal readonly bool IsV3Bson;
private BsonHelper(
IBsonSerializationContextProxy bsonSerializationContextProxy,
@@ -104,7 +116,8 @@ private BsonHelper(
IBsonSerializerLookupProxy bsonSerializerLookupProxy,
Func createJsonWriterFunc,
Func createBsonSerializationArgsFunc,
- Type ibsonWriterType)
+ Type ibsonWriterType,
+ bool isV3Bson)
{
BsonSerializationContextProxy = bsonSerializationContextProxy;
JsonWriterSettingsProxy = jsonWriterSettingsProxy;
@@ -112,6 +125,7 @@ private BsonHelper(
CreateJsonWriterFunc = createJsonWriterFunc;
CreateBsonSerializationArgsFunc = createBsonSerializationArgsFunc;
IBsonWriterType = ibsonWriterType;
+ IsV3Bson = isV3Bson;
}
public static BsonHelper? Create()
@@ -167,6 +181,9 @@ private BsonHelper(
return null;
}
+ // in v3+ IBsonWriter has extra methods, so we need to handle that differently
+ var isV3Bson = ibsonWriterType.GetMethod(nameof(IBsonWriterProxyV3.WriteGuid), [typeof(Guid)]) is not null;
+
// We found all the required types, now try to create the proxies/activators
var proxyResult = DuckType.GetOrCreateProxyType(typeof(IBsonSerializerLookupProxy), bsonSerializerType);
if (!proxyResult.Success)
@@ -237,7 +254,8 @@ private BsonHelper(
bsonSerializerLookupProxy: bsonSerializerLookupProxy,
createJsonWriterFunc: createJsonWriterFunc,
createBsonSerializationArgsFunc: createBsonSerializationArgsFunc,
- ibsonWriterType: ibsonWriterType);
+ ibsonWriterType: ibsonWriterType,
+ isV3Bson: isV3Bson);
// smoke test - we don't verify the Duck types until we actually try to create a proxy,
// so we do it once here, just to confirm that it will work later
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/IBsonWriterProxyV3.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/IBsonWriterProxyV3.cs
new file mode 100644
index 000000000000..7d04fdd627f0
--- /dev/null
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/IBsonWriterProxyV3.cs
@@ -0,0 +1,31 @@
+//
+// 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.
+//
+
+#nullable enable
+
+using System;
+using Datadog.Trace.DuckTyping;
+
+namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.BsonSerialization;
+
+///
+/// Duck Typing interface proxy for: https://github.com/mongodb/mongo-csharp-driver/blob/5edf5ba9941f170ecc6956005398a8736f12e38a/src/MongoDB.Bson/IO/IBsonWriter.cs
+///
+internal interface IBsonWriterProxyV3 : IBsonWriterProxy
+{
+ ///
+ /// Writes a Guid in Standard representation to the writer.
+ ///
+ /// The Guid value.
+ void WriteGuid(Guid guid);
+
+ ///
+ /// Writes a Guid in the specified representation to the writer.
+ ///
+ /// The Guid value.
+ /// The GuidRepresentation.
+ [Duck(ParameterTypeNames = [ClrNames.Guid, "MongoDB.Bson.GuidRepresentation"])]
+ void WriteGuid(Guid guid, int guidRepresentation);
+}
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/MongoBsonWriterV3.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/MongoBsonWriterV3.cs
new file mode 100644
index 000000000000..0cc2fa494c7c
--- /dev/null
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/BsonSerialization/MongoBsonWriterV3.cs
@@ -0,0 +1,146 @@
+//
+// 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.
+//
+
+#nullable enable
+
+using System;
+using Datadog.Trace.DuckTyping;
+
+namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.BsonSerialization;
+
+///
+/// Reverse duck Typing interface proxy for: https://github.com/mongodb/mongo-csharp-driver/blob/5edf5ba9941f170ecc6956005398a8736f12e38a/src/MongoDB.Bson/IO/IBsonWriter.cs
+///
+internal class MongoBsonWriterV3
+{
+ private readonly IBsonWriterProxyV3 _bsonWriterProxy;
+ private readonly MongoBsonWriter _innerWriter;
+
+ public MongoBsonWriterV3(IBsonWriterProxyV3 bsonWriterProxy, object jsonWriterSettings)
+ {
+ _bsonWriterProxy = bsonWriterProxy;
+ // To avoid duplicating implementation, we delegate to the existing v2 implementation for most of the behaviour
+ _innerWriter = new MongoBsonWriter(bsonWriterProxy, jsonWriterSettings);
+ }
+
+ [DuckReverseMethod]
+ public long Position => _innerWriter.Position;
+
+ [DuckReverseMethod]
+ public int SerializationDepth => _innerWriter.SerializationDepth;
+
+ [DuckReverseMethod]
+ public object State => _innerWriter.State;
+
+ [DuckReverseMethod]
+ public object Settings => _innerWriter.Settings;
+
+ // These are the only two v3-specific methods
+ [DuckReverseMethod]
+ public void WriteGuid(Guid guid) => _bsonWriterProxy.WriteGuid(guid);
+
+ [DuckReverseMethod(ParameterTypeNames = [ClrNames.Guid, "MongoDB.Bson.GuidRepresentation"])]
+ public void WriteGuid(Guid guid, int guidRepresentation) => _bsonWriterProxy.WriteGuid(guid);
+
+ // The rest of these are wrappers around the v2 behaviour, just to avoid duplication
+ [DuckReverseMethod]
+ public void Close() => _innerWriter.Close();
+
+ [DuckReverseMethod]
+ public void Flush() => _innerWriter.Flush();
+
+ [DuckReverseMethod]
+ public void PopElementNameValidator() => _innerWriter.PopElementNameValidator();
+
+ [DuckReverseMethod]
+ public void PopSettings() => _innerWriter.PopSettings();
+
+ [DuckReverseMethod]
+ public void PushElementNameValidator(object validator) => _innerWriter.PushElementNameValidator(validator);
+
+ [DuckReverseMethod]
+ public void PushSettings(object configurator) => _innerWriter.PushSettings(configurator);
+
+ [DuckReverseMethod]
+ public void WriteBinaryData(IBsonBinaryDataProxy binaryData) => _innerWriter.WriteBinaryData(binaryData);
+
+ [DuckReverseMethod]
+ public void WriteBoolean(bool value) => _innerWriter.WriteBoolean(value);
+
+ [DuckReverseMethod]
+ public void WriteBytes(byte[] bytes) => _innerWriter.WriteBytes(bytes);
+
+ [DuckReverseMethod]
+ public void WriteDateTime(long value) => _innerWriter.WriteDateTime(value);
+
+ [DuckReverseMethod]
+ public void WriteDecimal128(object value) => _innerWriter.WriteDecimal128(value);
+
+ [DuckReverseMethod]
+ public void WriteDouble(double value) => _innerWriter.WriteDouble(value);
+
+ [DuckReverseMethod]
+ public void WriteEndArray() => _innerWriter.WriteEndArray();
+
+ [DuckReverseMethod]
+ public void WriteEndDocument() => _innerWriter.WriteEndDocument();
+
+ [DuckReverseMethod]
+ public void WriteInt32(int value) => _innerWriter.WriteInt32(value);
+
+ [DuckReverseMethod]
+ public void WriteInt64(long value) => _innerWriter.WriteInt64(value);
+
+ [DuckReverseMethod]
+ public void WriteJavaScript(string code) => _innerWriter.WriteJavaScript(code);
+
+ [DuckReverseMethod]
+ public void WriteJavaScriptWithScope(string code) => _innerWriter.WriteJavaScriptWithScope(code);
+
+ [DuckReverseMethod]
+ public void WriteMaxKey() => _innerWriter.WriteMaxKey();
+
+ [DuckReverseMethod]
+ public void WriteMinKey() => _innerWriter.WriteMinKey();
+
+ [DuckReverseMethod]
+ public void WriteName(string name) => _innerWriter.WriteName(name);
+
+ [DuckReverseMethod]
+ public void WriteNull() => _innerWriter.WriteNull();
+
+ [DuckReverseMethod]
+ public void WriteObjectId(object objectId) => _innerWriter.WriteObjectId(objectId);
+
+ [DuckReverseMethod]
+ public void WriteRawBsonArray(object slice) => _innerWriter.WriteRawBsonArray(slice);
+
+ [DuckReverseMethod]
+ public void WriteRawBsonDocument(object slice) => _innerWriter.WriteRawBsonDocument(slice);
+
+ [DuckReverseMethod]
+ public void WriteRegularExpression(object regex) => _innerWriter.WriteRegularExpression(regex);
+
+ [DuckReverseMethod]
+ public void WriteStartArray() => _innerWriter.WriteStartArray();
+
+ [DuckReverseMethod]
+ public void WriteStartDocument() => _innerWriter.WriteStartDocument();
+
+ [DuckReverseMethod]
+ public void WriteString(string value) => _innerWriter.WriteString(value);
+
+ [DuckReverseMethod]
+ public void WriteSymbol(string value) => _innerWriter.WriteSymbol(value);
+
+ [DuckReverseMethod]
+ public void WriteTimestamp(long value) => _innerWriter.WriteTimestamp(value);
+
+ [DuckReverseMethod]
+ public void WriteUndefined() => _innerWriter.WriteUndefined();
+
+ [DuckReverseMethod]
+ public void Dispose() => _innerWriter.Dispose();
+}
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_ExecuteAsync_Integration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_ExecuteAsync_Integration.cs
index 807b506a05ca..6c29811ed908 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_ExecuteAsync_Integration.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_ExecuteAsync_Integration.cs
@@ -17,10 +17,10 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb
///
#pragma warning disable SA1118 // parameter spans multiple lines
[InstrumentMethod(
- AssemblyName = MongoDbIntegration.MongoDbClientAssembly,
+ AssemblyNames = [MongoDbIntegration.MongoDbClientV2Assembly, MongoDbIntegration.MongoDbClientV3Assembly],
IntegrationName = MongoDbIntegration.IntegrationName,
MinimumVersion = MongoDbIntegration.Major2Minor1,
- MaximumVersion = MongoDbIntegration.Major2,
+ MaximumVersion = MongoDbIntegration.Major3,
MethodName = "ExecuteAsync",
ParameterTypeNames = new[] { "MongoDB.Driver.Core.Connections.IConnection", ClrNames.CancellationToken },
ReturnTypeName = ClrNames.GenericTaskWithGenericClassParameter,
@@ -35,10 +35,10 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb
})]
#pragma warning restore SA1118
[InstrumentMethod(
- AssemblyName = MongoDbIntegration.MongoDbClientAssembly,
+ AssemblyName = MongoDbIntegration.MongoDbClientV2Assembly,
IntegrationName = MongoDbIntegration.IntegrationName,
MinimumVersion = MongoDbIntegration.Major2Minor1,
- MaximumVersion = MongoDbIntegration.Major2,
+ MaximumVersion = MongoDbIntegration.Major2, // not available in 2.15+ so not available in 3.x
MethodName = "ExecuteAsync",
ParameterTypeNames = new[] { "MongoDB.Driver.Core.Connections.IConnection", ClrNames.CancellationToken },
ReturnTypeName = "System.Threading.Tasks.Task",
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Execute_Integration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Execute_Integration.cs
index a90277b7abbc..ba438c000c70 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Execute_Integration.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Execute_Integration.cs
@@ -16,10 +16,10 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb
/// MongoDB.Driver.Core.WireProtocol.IWireProtocol instrumentation
///
[InstrumentMethod(
- AssemblyName = MongoDbIntegration.MongoDbClientAssembly,
+ AssemblyName = MongoDbIntegration.MongoDbClientV2Assembly,
IntegrationName = MongoDbIntegration.IntegrationName,
MinimumVersion = MongoDbIntegration.Major2Minor2,
- MaximumVersion = MongoDbIntegration.Major2,
+ MaximumVersion = MongoDbIntegration.Major2, // not available in 2.15+ so not available in 3.x
MethodName = "Execute",
ParameterTypeNames = new[] { "MongoDB.Driver.Core.Connections.IConnection", ClrNames.CancellationToken },
TypeName = "MongoDB.Driver.Core.WireProtocol.KillCursorsWireProtocol",
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Generic_Execute_Integration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Generic_Execute_Integration.cs
index d4e11e126c01..c9298d87a52f 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Generic_Execute_Integration.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/IWireProtocol_Generic_Execute_Integration.cs
@@ -17,10 +17,10 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb
///
#pragma warning disable SA1118 // parameter shouldn't span multiple lines
[InstrumentMethod(
- AssemblyName = MongoDbIntegration.MongoDbClientAssembly,
+ AssemblyNames = [MongoDbIntegration.MongoDbClientV2Assembly, MongoDbIntegration.MongoDbClientV3Assembly],
IntegrationName = MongoDbIntegration.IntegrationName,
MinimumVersion = MongoDbIntegration.Major2Minor2,
- MaximumVersion = MongoDbIntegration.Major2,
+ MaximumVersion = MongoDbIntegration.Major3,
MethodName = "Execute",
ParameterTypeNames = new[] { "MongoDB.Driver.Core.Connections.IConnection", ClrNames.CancellationToken },
ReturnTypeName = "!0",
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/MongoDbIntegration.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/MongoDbIntegration.cs
index 826dc6a1d520..f1949001921a 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/MongoDbIntegration.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/MongoDb/MongoDbIntegration.cs
@@ -22,9 +22,11 @@ internal static class MongoDbIntegration
internal const string IntegrationName = nameof(Configuration.IntegrationId.MongoDb);
internal const string Major2 = "2";
+ internal const string Major3 = "3";
internal const string Major2Minor1 = "2.1";
internal const string Major2Minor2 = "2.2"; // Synchronous methods added in 2.2
- internal const string MongoDbClientAssembly = "MongoDB.Driver.Core";
+ internal const string MongoDbClientV2Assembly = "MongoDB.Driver.Core";
+ internal const string MongoDbClientV3Assembly = "MongoDB.Driver";
private const string DatabaseType = "mongodb";
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/ClrNames.cs b/tracer/src/Datadog.Trace/ClrProfiler/ClrNames.cs
index 4e599025f669..b82976274b29 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/ClrNames.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/ClrNames.cs
@@ -13,6 +13,7 @@ internal static class ClrNames
public const string Object = "System.Object";
public const string Bool = "System.Boolean";
public const string String = "System.String";
+ public const string Guid = "System.Guid";
public const string SByte = "System.SByte";
public const string Byte = "System.Byte";
diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
index 81cc78c0c3a1..aa81faa1d5cb 100644
--- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
+++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
@@ -38,6 +38,7 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
|| assemblyName.StartsWith("Grpc.Core,", StringComparison.Ordinal)
|| assemblyName.StartsWith("HotChocolate.Execution,", StringComparison.Ordinal)
|| assemblyName.StartsWith("log4net,", StringComparison.Ordinal)
+ || assemblyName.StartsWith("MongoDB.Driver,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MongoDB.Driver.Core,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySql.Data,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySqlConnector,", StringComparison.Ordinal)
@@ -352,6 +353,18 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net.AppenderAttachedImplIntegration"
=> Datadog.Trace.Configuration.IntegrationId.Log4Net,
"Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
index d592030b9744..056c1887a9e9 100644
--- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
+++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
@@ -41,6 +41,7 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
|| assemblyName.StartsWith("Grpc.Net.Client,", StringComparison.Ordinal)
|| assemblyName.StartsWith("HotChocolate.Execution,", StringComparison.Ordinal)
|| assemblyName.StartsWith("log4net,", StringComparison.Ordinal)
+ || assemblyName.StartsWith("MongoDB.Driver,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MongoDB.Driver.Core,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySql.Data,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySqlConnector,", StringComparison.Ordinal)
@@ -381,6 +382,18 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net.AppenderAttachedImplIntegration"
=> Datadog.Trace.Configuration.IntegrationId.Log4Net,
"Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
index 273482fcafb9..22772501bac7 100644
--- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
+++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
@@ -40,6 +40,7 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
|| assemblyName.StartsWith("Grpc.Net.Client,", StringComparison.Ordinal)
|| assemblyName.StartsWith("HotChocolate.Execution,", StringComparison.Ordinal)
|| assemblyName.StartsWith("log4net,", StringComparison.Ordinal)
+ || assemblyName.StartsWith("MongoDB.Driver,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MongoDB.Driver.Core,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySql.Data,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySqlConnector,", StringComparison.Ordinal)
@@ -376,6 +377,18 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net.AppenderAttachedImplIntegration"
=> Datadog.Trace.Configuration.IntegrationId.Log4Net,
"Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
index 273482fcafb9..22772501bac7 100644
--- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
+++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs
@@ -40,6 +40,7 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
|| assemblyName.StartsWith("Grpc.Net.Client,", StringComparison.Ordinal)
|| assemblyName.StartsWith("HotChocolate.Execution,", StringComparison.Ordinal)
|| assemblyName.StartsWith("log4net,", StringComparison.Ordinal)
+ || assemblyName.StartsWith("MongoDB.Driver,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MongoDB.Driver.Core,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySql.Data,", StringComparison.Ordinal)
|| assemblyName.StartsWith("MySqlConnector,", StringComparison.Ordinal)
@@ -376,6 +377,18 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net.AppenderAttachedImplIntegration"
=> Datadog.Trace.Configuration.IntegrationId.Log4Net,
"Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
+ or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"
diff --git a/tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.h b/tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.h
index 728665f3e648..79f50343daaa 100644
--- a/tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.h
+++ b/tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.h
@@ -639,20 +639,32 @@ std::vector g_callTargets=
{(WCHAR*)WStr("log4net"),(WCHAR*)WStr("log4net.Appender.AppenderCollection"),(WCHAR*)WStr("ToArray"),g_callTargets_Sig_054,1,2,0,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.Log4Net.DirectSubmission.AppenderCollectionIntegration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("log4net"),(WCHAR*)WStr("log4net.Appender.AppenderCollection"),(WCHAR*)WStr("ToArray"),g_callTargets_Sig_054,1,1,0,0,1,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.Log4Net.DirectSubmission.AppenderCollectionLegacyIntegration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("log4net"),(WCHAR*)WStr("log4net.Util.AppenderAttachedImpl"),(WCHAR*)WStr("AppendLoopOnAppenders"),g_callTargets_Sig_118,2,1,0,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net.AppenderAttachedImplIntegration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.GetMoreWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.KillCursorsWireProtocol"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_248,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Execute_Integration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.KillCursorsWireProtocol"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_163,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
-{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,2,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.QueryWireProtocol`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("Execute"),g_callTargets_Sig_006,3,2,2,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_Generic_Execute_Integration"),CallTargetKind::Default,1,165},
+{(WCHAR*)WStr("MongoDB.Driver.Core"),(WCHAR*)WStr("MongoDB.Driver.Core.WireProtocol.WriteWireProtocolBase`1"),(WCHAR*)WStr("ExecuteAsync"),g_callTargets_Sig_178,3,2,1,0,3,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb.IWireProtocol_ExecuteAsync_Integration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("System.Messaging"),(WCHAR*)WStr("System.Messaging.MessageQueue"),(WCHAR*)WStr("Purge"),g_callTargets_Sig_231,1,4,0,0,4,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Msmq.MessageQueue_Purge_Integration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("System.Messaging"),(WCHAR*)WStr("System.Messaging.MessageQueue"),(WCHAR*)WStr("ReceiveCurrent"),g_callTargets_Sig_124,7,4,0,0,4,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Msmq.MessageQueue_ReceiveCurrent_Integration"),CallTargetKind::Default,1,165},
{(WCHAR*)WStr("System.Messaging"),(WCHAR*)WStr("System.Messaging.MessageQueue"),(WCHAR*)WStr("SendInternal"),g_callTargets_Sig_275,4,4,0,0,4,65535,65535,assemblyName,(WCHAR*)WStr("Datadog.Trace.ClrProfiler.AutoInstrumentation.Msmq.MessageQueue_SendInternal_Integration"),CallTargetKind::Default,1,165},
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/MongoDbTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/MongoDbTests.cs
index 17bda5afdb23..2f04a21a9258 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/MongoDbTests.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/MongoDbTests.cs
@@ -25,6 +25,8 @@ public class MongoDbTests : TracingIntegrationTest
{
private static readonly Regex OsRegex = new(@"""os"" : \{.*?\} ");
private static readonly Regex ObjectIdRegex = new(@"ObjectId\("".*?""\)");
+ private static readonly Regex OIdRegex = new("""\{\s*"\$oid" : "[0-9a-f]+" \}""");
+ private static readonly Regex Base64Regex = new("""base64"\s*:\s*"[a-zA-Z0-9+\\]+=*",""");
public MongoDbTests(ITestOutputHelper output)
: base("MongoDB", output)
@@ -60,7 +62,8 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers
var snapshotSuffix = version switch
{
null => "2_7", // default is version 2.8.0
- { Major: >= 3 } or { Major: 2, Minor: >= 15 } => "2_15", // A bunch of stuff was removed in 2.15.0
+ { Major: >= 3 } => "3_0", // The default JSON serialization changed in 3.0
+ { Major: 2, Minor: >= 15 } => "2_15", // A bunch of stuff was removed in 2.15.0
{ Major: 2, Minor: >= 7 } => "2_7", // default is version 2.8.0
{ Major: 2, Minor: >= 5 } => "2_5", // version 2.5 + 2.6 include additional info on queries compared to 2.2
{ Major: 2, Minor: >= 2 } => "2_2",
@@ -72,6 +75,9 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers
settings.AddRegexScrubber(OsRegex, @"""os"" : {} ");
// v2.5.x records additional info in the insert query which is execution-specific
settings.AddRegexScrubber(ObjectIdRegex, @"ObjectId(""ABC123"")");
+ // v3 changes how the object ID is written
+ settings.AddRegexScrubber(OIdRegex, """{ "$oid": "ABC123" }""");
+ settings.AddRegexScrubber(Base64Regex, """base64": "abc123ABC==",""");
// normalise between running directly against localhost and against mongo container
settings.AddSimpleScrubber("out.host: localhost", "out.host: mongo");
settings.AddSimpleScrubber("out.host: mongo_arm64", "out.host: mongo");
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs
index 50e59d28389a..de6790713500 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMajors.g.cs
@@ -244,18 +244,23 @@ public class PackageVersionsLatestMajors
#endif
#if NET5_0
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET6_0
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET7_0
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET8_0
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET9_0
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#endif
};
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs
index 9ec0c0ea8640..1b6d646baa2e 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestMinors.g.cs
@@ -500,6 +500,7 @@ public class PackageVersionsLatestMinors
new object[] { "2.28.0" },
new object[] { "2.29.0" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET6_0
new object[] { "2.3.0" },
@@ -530,6 +531,7 @@ public class PackageVersionsLatestMinors
new object[] { "2.28.0" },
new object[] { "2.29.0" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET7_0
new object[] { "2.3.0" },
@@ -560,6 +562,7 @@ public class PackageVersionsLatestMinors
new object[] { "2.28.0" },
new object[] { "2.29.0" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET8_0
new object[] { "2.3.0" },
@@ -590,6 +593,7 @@ public class PackageVersionsLatestMinors
new object[] { "2.28.0" },
new object[] { "2.29.0" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET9_0
new object[] { "2.3.0" },
@@ -620,6 +624,7 @@ public class PackageVersionsLatestMinors
new object[] { "2.28.0" },
new object[] { "2.29.0" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#endif
};
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs
index e0c8718cd9fc..213666e7f739 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/PackageVersionsLatestSpecific.g.cs
@@ -313,26 +313,31 @@ public class PackageVersionsLatestSpecific
new object[] { "2.5.1" },
new object[] { "2.14.1" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET6_0
new object[] { "2.5.1" },
new object[] { "2.14.1" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET7_0
new object[] { "2.5.1" },
new object[] { "2.14.1" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET8_0
new object[] { "2.5.1" },
new object[] { "2.14.1" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#if NET9_0
new object[] { "2.5.1" },
new object[] { "2.14.1" },
new object[] { "2.30.0" },
+ new object[] { "3.0.0" },
#endif
#endif
};
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/TypeNameTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/TypeNameTests.cs
index 57a84df0ba5b..cfa641b37924 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/TypeNameTests.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/TypeNameTests.cs
@@ -20,6 +20,7 @@ public static IEnumerable