Fix minor version for MongoDB integration (#924)

This commit is contained in:
Robert Pająk 2022-07-06 13:57:47 +02:00 committed by GitHub
parent 1d234b3e6b
commit 81b24aee9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 11 deletions

View File

@ -58,6 +58,7 @@ This release is built on top of [OpenTelemetry .NET](https://github.com/open-tel
- `OTEL_DOTNET_AUTO_INCLUDE_PROCESSES`,
- `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES`,
- `OTEL_DOTNET_AUTO_TRACES_DISABLED_INSTRUMENTATIONS`.
- Remove invalid instrumentation for `MongoDB.Driver.Core` <2.3.0.
## [0.1.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.1.0-beta.1)

View File

@ -13,7 +13,7 @@
"MongoDB.Driver.MongoClientSettings"
],
"minimum_major": 2,
"minimum_minor": 0,
"minimum_minor": 3,
"minimum_patch": 0,
"maximum_major": 2,
"maximum_minor": 65535,
@ -106,4 +106,4 @@
}
]
}
]
]

View File

@ -64,9 +64,7 @@ public static class Program
Run(collection, newDocument);
RunAsync(collection, newDocument).Wait();
#if MONGODB_2_2
WireProtocolExecuteIntegrationTest(client);
#endif
}
}
@ -76,7 +74,6 @@ public static class Program
using (var syncScope = ActivitySource.StartActivity("sync-calls"))
{
#if MONGODB_2_2
collection.DeleteMany(allFilter);
collection.InsertOne(newDocument);
@ -107,7 +104,6 @@ public static class Program
{
Console.WriteLine(document);
}
#endif
}
}
@ -133,7 +129,6 @@ public static class Program
Console.WriteLine(allDocuments.FirstOrDefault());
}
}
#if MONGODB_2_2
public static void WireProtocolExecuteIntegrationTest(MongoClient client)
{
@ -151,7 +146,6 @@ public static class Program
channel.KillCursorsAsync(new long[] { 0, 1, 2 }, new global::MongoDB.Driver.Core.WireProtocol.Messages.Encoders.MessageEncoderSettings(), CancellationToken.None).Wait();
}
}
#endif
private static string Host()
{
@ -185,7 +179,6 @@ public static class Program
}
}
#if MONGODB_2_2
#pragma warning disable SA1402 // File may only contain a single type
internal class ServerSelector : global::MongoDB.Driver.Core.Clusters.ServerSelectors.IServerSelector
{
@ -195,4 +188,3 @@ internal class ServerSelector : global::MongoDB.Driver.Core.Clusters.ServerSelec
}
}
#pragma warning restore SA1402 // File may only contain a single type
#endif

View File

@ -7,7 +7,6 @@
<PropertyGroup>
<ApiVersion Condition="'$(ApiVersion)' == ''">2.13.1</ApiVersion>
<DefineConstants Condition="'$(ApiVersion)'&gt;='2.7.0'">$(DefineConstants);MONGODB_2_7</DefineConstants>
<DefineConstants Condition="'$(ApiVersion)'&gt;='2.2.0'">$(DefineConstants);MONGODB_2_2</DefineConstants>
<!-- Required to build multiple projects with the same Configuration|Platform -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>