Skip to content

Commit

Permalink
feat: Update CosmosDB instrumentation to support latest version (#2832)
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr authored Oct 11, 2024
1 parent 4798dc7 commit 27a78cb
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ SPDX-License-Identifier: Apache-2.0
<exactMethodMatcher methodName="ExecuteItemQueryAsync" parameters="System.String,Microsoft.Azure.Documents.ResourceType,Microsoft.Azure.Documents.OperationType,System.Guid,Microsoft.Azure.Cosmos.FeedRange,Microsoft.Azure.Cosmos.QueryRequestOptions,Microsoft.Azure.Cosmos.Query.Core.SqlQuerySpec,System.String,System.Boolean,System.Int32,Microsoft.Azure.Cosmos.Tracing.ITrace,System.Threading.CancellationToken" />
</match>
</tracerFactory>
<tracerFactory name="ExecuteItemQueryAsyncWrapper">
<match assemblyName="Microsoft.Azure.Cosmos.Client" className="Microsoft.Azure.Cosmos.CosmosQueryClientCore">
<exactMethodMatcher methodName="ExecuteItemQueryAsync" parameters="System.String,Microsoft.Azure.Documents.ResourceType,Microsoft.Azure.Documents.OperationType,Microsoft.Azure.Cosmos.FeedRange,Microsoft.Azure.Cosmos.QueryRequestOptions,Microsoft.Azure.Cosmos.Query.Core.AdditionalRequestHeaders,Microsoft.Azure.Cosmos.Query.Core.SqlQuerySpec,System.String,System.Int32,Microsoft.Azure.Cosmos.Tracing.ITrace,System.Threading.CancellationToken" />
</match>
</tracerFactory>
</instrumentation>
</extension>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<PackageReference Include="AWSSDK.BedrockRuntime" Version="3.7.404.5" Condition="'$(TargetFramework)' == 'net481'" />
<PackageReference Include="AWSSDK.BedrockRuntime" Version="3.7.404.5" Condition="'$(TargetFramework)' == 'net8.0'" />

<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.44.0" Condition="'$(TargetFramework)' == 'net481'" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.44.0" Condition="'$(TargetFramework)' == 'net8.0'" />

<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.8" Condition="'$(TargetFramework)' == 'net481'" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.8" Condition="'$(TargetFramework)' == 'net8.0'" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" Condition="'$(TargetFramework)' == 'net462'" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" Condition="'$(TargetFramework)' == 'net471'" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" Condition="'$(TargetFramework)' == 'net48'" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" Condition="'$(TargetFramework)' == 'net6.0'" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,24 +251,40 @@ public void CreateAndExecuteStoredProcTests()
}
}

[NetFrameworkTest]
public class CosmosDBTestsFW462 : CosmosDBTestsBase<ConsoleDynamicMethodFixtureFW462>
{
public CosmosDBTestsFW462(ConsoleDynamicMethodFixtureFW462 fixture, ITestOutputHelper output)
: base(fixture, output)
{
}
}

[NetFrameworkTest]
public class CosmosDBTestsFW : CosmosDBTestsBase<ConsoleDynamicMethodFixtureFWLatest>
public class CosmosDBTestsFWLatest : CosmosDBTestsBase<ConsoleDynamicMethodFixtureFWLatest>
{
public CosmosDBTestsFW(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output)
public CosmosDBTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output)
: base(fixture, output)
{
}
}


[NetCoreTest]
public class CosmosDBTestsCore : CosmosDBTestsBase<ConsoleDynamicMethodFixtureCoreOldest>
public class CosmosDBTestsCoreOldest : CosmosDBTestsBase<ConsoleDynamicMethodFixtureCoreOldest>
{
public CosmosDBTestsCore(ConsoleDynamicMethodFixtureCoreOldest fixture, ITestOutputHelper output)
public CosmosDBTestsCoreOldest(ConsoleDynamicMethodFixtureCoreOldest fixture, ITestOutputHelper output)
: base(fixture, output)
{
}
}

[NetCoreTest]
public class CosmosDBTestsCoreLatest : CosmosDBTestsBase<ConsoleDynamicMethodFixtureCoreLatest>
{
public CosmosDBTestsCoreLatest(ConsoleDynamicMethodFixtureCoreLatest fixture, ITestOutputHelper output)
: base(fixture, output)
{
}
}
}

0 comments on commit 27a78cb

Please sign in to comment.