Skip to content

Commit

Permalink
Fix minor version for MongoDB integration (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jul 6, 2022
1 parent 1d234b3 commit 81b24ae
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -106,4 +106,4 @@
}
]
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ public static void Main(string[] args)
Run(collection, newDocument);
RunAsync(collection, newDocument).Wait();

#if MONGODB_2_2
WireProtocolExecuteIntegrationTest(client);
#endif
}
}

Expand All @@ -76,7 +74,6 @@ public static void Run(IMongoCollection<BsonDocument> collection, BsonDocument n

using (var syncScope = ActivitySource.StartActivity("sync-calls"))
{
#if MONGODB_2_2
collection.DeleteMany(allFilter);
collection.InsertOne(newDocument);

Expand Down Expand Up @@ -107,7 +104,6 @@ public static void Run(IMongoCollection<BsonDocument> collection, BsonDocument n
{
Console.WriteLine(document);
}
#endif
}
}

Expand All @@ -133,7 +129,6 @@ public static async Task RunAsync(IMongoCollection<BsonDocument> collection, Bso
Console.WriteLine(allDocuments.FirstOrDefault());
}
}
#if MONGODB_2_2

public static void WireProtocolExecuteIntegrationTest(MongoClient client)
{
Expand All @@ -151,7 +146,6 @@ public static void WireProtocolExecuteIntegrationTest(MongoClient client)
channel.KillCursorsAsync(new long[] { 0, 1, 2 }, new global::MongoDB.Driver.Core.WireProtocol.Messages.Encoders.MessageEncoderSettings(), CancellationToken.None).Wait();
}
}
#endif

private static string Host()
{
Expand Down Expand Up @@ -185,7 +179,6 @@ private static string GetMongoPort(string[] args)
}
}

#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
{
Expand All @@ -195,4 +188,3 @@ public IEnumerable<ServerDescription> SelectServers(ClusterDescription cluster,
}
}
#pragma warning restore SA1402 // File may only contain a single type
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 81b24ae

Please sign in to comment.