Skip to content

Commit 6343391

Browse files
authored
Merge branch 'master' into users/sourabhjain/addqueryTextinOtel
2 parents 77730fc + 2cc12dc commit 6343391

File tree

42 files changed

+3591
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3591
-142
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<ClientOfficialVersion>3.43.0</ClientOfficialVersion>
3+
<ClientOfficialVersion>3.43.1</ClientOfficialVersion>
44
<ClientPreviewVersion>3.44.0</ClientPreviewVersion>
5-
<ClientPreviewSuffixVersion>preview.0</ClientPreviewSuffixVersion>
5+
<ClientPreviewSuffixVersion>preview.1</ClientPreviewSuffixVersion>
66
<DirectVersion>3.36.0</DirectVersion>
77
<EncryptionOfficialVersion>2.0.4</EncryptionOfficialVersion>
88
<EncryptionPreviewVersion>2.1.0</EncryptionPreviewVersion>

Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
<AssemblyName>Cosmos.Samples.ApplicationInsights</AssemblyName>
77
<RootNamespace>Cosmos.Samples.ApplicationInsights</RootNamespace>
88
<LangVersion>latest</LangVersion>
9+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
910
</PropertyGroup>
1011

1112
<ItemGroup>
1213
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
13-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.37.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
16-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
14+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
16+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
17+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1718
</ItemGroup>
1819

1920
<ItemGroup>

Microsoft.Azure.Cosmos.Samples/Usage/AzureFunctions/AzureFunctions.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
55
<AssemblyName>Cosmos.Samples.AzureFunctions</AssemblyName>
66
<RootNamespace>Cosmos.Samples.AzureFunctions</RootNamespace>
7+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
78
</PropertyGroup>
89
<ItemGroup>
910
<None Include="..\AppSettings.json" Link="AppSettings.json">
1011
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1112
</None>
1213
</ItemGroup>
1314
<ItemGroup>
14-
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
15+
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.4.1" />
1516
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
16-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="*" />
17+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
18+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
19+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1720
</ItemGroup>
1821
<ItemGroup>
1922
<None Update="host.json">

Microsoft.Azure.Cosmos.Samples/Usage/BulkExecutorMigration/BulkExecutorMigration.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
<RootNamespace>Cosmos.Samples.BulkExecutorMigration</RootNamespace>
88
<LangVersion>latest</LangVersion>
99
<ServerGarbageCollection>true</ServerGarbageCollection>
10+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
1011
</PropertyGroup>
1112
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
15-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="*" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
15+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
16+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1617
</ItemGroup>
1718
<ItemGroup>
1819
<ProjectReference Include="..\Shared\Shared.csproj" />

Microsoft.Azure.Cosmos.Samples/Usage/BulkSupport/BulkSupport.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
<RootNamespace>Cosmos.Samples.BulkSupport</RootNamespace>
88
<LangVersion>latest</LangVersion>
99
<ServerGarbageCollection>true</ServerGarbageCollection>
10+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
1011
</PropertyGroup>
1112
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
15-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="*" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
15+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
16+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1617
</ItemGroup>
1718
<ItemGroup>
1819
<ProjectReference Include="..\Shared\Shared.csproj" />

Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/CFPullModelAllVersionsAndDeletesMode.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
<AssemblyName>Cosmos.Samples.CFPullModelAllVersionsAndDeletesMode</AssemblyName>
77
<RootNamespace>Cosmos.Samples.CFPullModelAllVersionsAndDeletesMode</RootNamespace>
88
<LangVersion>latest</LangVersion>
9+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
910
</PropertyGroup>
1011
<ItemGroup>
11-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.40.0-preview.0" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.0" />
12+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0-preview.0" />
1413
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
14+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
15+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1516
</ItemGroup>
1617
<ItemGroup>
1718
<None Include="..\appSettings.json" Link="appSettings.json">

Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/CFPullModelLatestVersionMode.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<LangVersion>latest</LangVersion>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.32.0-preview" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
11+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
13+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
14+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<None Include="..\appSettings.json" Link="appSettings.json">

Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/ChangeFeed.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
<AssemblyName>Cosmos.Samples.ChangeFeed</AssemblyName>
77
<RootNamespace>Cosmos.Samples.ChangeFeed</RootNamespace>
88
<LangVersion>latest</LangVersion>
9+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
910
</PropertyGroup>
1011
<ItemGroup>
11-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="*" />
12-
<PackageReference Include="Microsoft.Azure.DocumentDB.ChangeFeedProcessor" Version="2.2.7" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
12+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0" />
13+
<PackageReference Include="Microsoft.Azure.DocumentDB.ChangeFeedProcessor" Version="2.5.0" />
14+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
15+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
16+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
17+
<PackageReference Include="System.Net.Security" Version="4.3.2" />
18+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1619
</ItemGroup>
1720
<ItemGroup>
1821
<None Include="..\AppSettings.json" Link="AppSettings.json">

Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeedAllVersionsAndDeletes/ChangeFeedAllVersionsAndDeletes.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
<RootNamespace>Cosmos.Samples.ChangeFeedAllVersionsAndDeletes</RootNamespace>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
10+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
13-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.40.0-preview.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.43.0-preview.0" />
1515
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
16+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
17+
<PackageReference Include="System.Text.Json" Version="8.0.4" />
1618
</ItemGroup>
1719

1820
<ItemGroup>

Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeedAllVersionsAndDeletes/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ internal class Program
3030
private static readonly string monitoredContainerPrefix = "monitored-";
3131
private static readonly string leasesContainer = "leases";
3232
private static readonly string partitionKeyPath = "/id";
33-
static async Task Main(string[] args)
33+
static async Task Main(string[] _)
3434
{
3535
try
3636
{
3737
IConfigurationRoot configuration = new ConfigurationBuilder()
3838
.AddJsonFile("appSettings.json")
3939
.Build();
4040

41-
string endpoint = configuration["EndPointUrl"];
41+
string? endpoint = configuration["EndPointUrl"];
4242
if (string.IsNullOrEmpty(endpoint))
4343
{
4444
throw new ArgumentNullException("Please specify a valid endpoint in the appSettings.json");
4545
}
4646

47-
string authKey = configuration["AuthorizationKey"];
47+
string? authKey = configuration["AuthorizationKey"];
4848
if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key"))
4949
{
5050
throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json");

0 commit comments

Comments
 (0)