Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
8a3883e
[Internal] Client Telemetry: Fixes tests leaking environment variable…
ealsur Oct 27, 2022
543294c
Updated change log and bumped up the version. (#3526)
kundadebdatta Oct 29, 2022
abf3d93
Query: Fixes performance regression on target partition on some ORDER…
neildsh Oct 31, 2022
84ef545
[Internal] AI Integration: Adds SubStatusCode Information in attribut…
sourabh1007 Nov 2, 2022
68b9805
Diagnostics: Removes unused properties and reduces size (#3519)
aavasthy Nov 2, 2022
a9bcaf5
[Internal] docs: Add address caches conceptual flow (#3534)
kirankumarkolli Nov 2, 2022
6762e07
Release: Adds SDK version and changelog for 3.31.2 (#3546)
neildsh Nov 3, 2022
ef7339e
[Internal] Documentation: Removes invalid comment from ReadThroughput…
ealsur Nov 4, 2022
825595a
[Internal] nugetconfig: Removes specific overrides (#3551)
kirankumarkolli Nov 7, 2022
4746a6f
Query: Fixes partition range evaluation for spatial queries (#3495)
adityasa Nov 9, 2022
acd899e
[Internal] Documentation: Refactors cache content on its own document…
ealsur Nov 9, 2022
01c1cd4
[Internal] Emulator unit tests: Adds IdEncoding unit tests for Comput…
FabianMeiswinkel Nov 10, 2022
ab1f249
Change Feed Processor: Adds support for Resource Tokens (#3566)
ealsur Nov 15, 2022
9fb3a12
[Internal] AI integration: Refactor code how container and database n…
sourabh1007 Nov 15, 2022
9c2015b
[Internal] AI Integration: Adds a new flag in DistributedTracingOptio…
sourabh1007 Nov 16, 2022
c38346d
Query: Fixes default to BadRequestException in case of internal error…
neildsh Nov 17, 2022
9cafaa8
[Internal] Query: Adds unit tests for Merge/Split implementation with…
akotalwar Nov 17, 2022
2681be8
Client Retry Policy: Adds HTTP timeouts with request-level cross-regi…
NaluTripician Nov 18, 2022
010e4ba
Documentation: Fixes EUAP in Comments (#3579)
PramodValavala-MSFT Nov 21, 2022
b24eeb9
Query: Fixes incorrect FeedResponse.Count when result contains undefi…
neildsh Nov 23, 2022
9734ec5
removed allr eference (#3581)
sourabh1007 Nov 24, 2022
6632168
Trace: Fixes Tracing/diagnostics hour-times to 24Hours (#3577)
kirankumarkolli Nov 24, 2022
8e82a1a
AI Integration: Adds cosmetic fixes (#3576)
sourabh1007 Nov 26, 2022
2f047e1
Query: Adds ALL Scalar Expression (#3509)
ezrahaleva-msft Nov 28, 2022
07b34e6
Release: Adds API contracts for 3.31.2-preview (#3586)
neildsh Nov 28, 2022
5318646
[Internal] sccignore: Adds a .sccignore file to apply an exception fo…
vivekr20 Nov 29, 2022
28318b0
[Internal] PermissionTests: Adds CosmosPermissionTests Coverage (#3593)
prasadu-microsoft Dec 1, 2022
a34bac7
[Internal] AI Integration: Refactors to Operation prefix and add test…
sourabh1007 Dec 5, 2022
6b1fa03
[Internal] HttpTimeoutPolicy: Removes Data Plane Writes from being ab…
NaluTripician Dec 15, 2022
814e72e
[Internal] Performance Testing: Adds Distributed Tracing option in be…
sourabh1007 Dec 20, 2022
5c05fbb
[Internal] Benchmark: Refactors code to make Memory Stream capacity c…
sourabh1007 Jan 4, 2023
73c9e08
add new LatestVersion changefeed mode that has same behavior as Incre…
philipthomas-MSFT Jan 4, 2023
77e3aa4
Query: Fixes handling of CosmosUndefined, CosmosGuid and CosmosBinary…
neildsh Jan 7, 2023
3c875c7
[Internal] Subpartitioning: Adds updates to test coverage for subpart…
NaluTripician Jan 9, 2023
416b154
[Internal] ContainerProperties: Fixes version reset when setting Part…
ealsur Jan 9, 2023
59b70a6
[Internal] AI Integration: Adds CorrelationId and Activity Id Attribu…
sourabh1007 Jan 10, 2023
612337c
Documentation: Fixes CosmosClientBuilder.WithConnectionModeGateway pa…
arthuraugsten Jan 11, 2023
55f9ce8
Upgrade Resiliency: Refactors Implementation for Opening Rntbd Connec…
kundadebdatta Jan 11, 2023
9dde99e
[Preview] AI integration: Adds IsDistributedTracingEnabled flag as pu…
sourabh1007 Jan 12, 2023
36d0e0f
Change Feed Processor: Fixes behavior with StartTime on Local (#3645)
ealsur Jan 13, 2023
bdd059d
[Internal] Client Telemetry: Refactors code to use base useragent str…
sourabh1007 Jan 17, 2023
b3cf7df
[Internal] AI Integration: Refactors code to rename event name (#3648)
sourabh1007 Jan 17, 2023
4b77519
Region Availability: Adds Poland Central Region For Public Usage (#3656)
kundadebdatta Jan 17, 2023
1710115
Client Encryption: Adds validation code to check if the Key Vault URI…
kr-santosh Jan 19, 2023
e383d83
[Internal] Query: Adds Split Support for Ode (#3572)
akotalwar Jan 20, 2023
ccaf8fb
[Internal] AI Integration : Fixes operation type for batch (#3660)
sourabh1007 Jan 23, 2023
c29abfe
CosmosClientOptions: Adds ServerCertificateCustomValidationCallback f…
aavasthy Jan 24, 2023
2608d4a
Query: Adds EnableOptimisticDirectExecution flag to QueryRequestOptio…
akotalwar Jan 26, 2023
d6a439f
[Internal] Tests: Removes Direct/HTTPS emulator tests (#3679)
ealsur Feb 2, 2023
393ae23
[Internal] Benchmark : Fixes issue with dependency on Cosmos Project …
sourabh1007 Feb 2, 2023
122bc56
LocalQuorum: Adds Quorum reads on Consistent Prefix Accounts (#3680)
pravengithub Feb 3, 2023
8a537ce
3.32.0: Adds new SDK version and contract files (#3687)
aavasthy Feb 6, 2023
bf9a6d4
[Internal] Samples: Adds change feed pull model samples (#3646)
jcocchi Feb 9, 2023
16caa1b
[Internal] Tests: Refactors emulator CI (#3688)
ealsur Feb 13, 2023
6434c10
[Internal] GitHub Template: Adds needs-investigation label (#3708)
ealsur Feb 14, 2023
4e923da
Adding fabric bot action (#3709)
ealsur Feb 14, 2023
38d1bcc
CosmosNullReferenceException: Refactors CosmosNullReferenceException …
jeet1995 Feb 17, 2023
209e473
[Internal] PriorityRequests: Fixes header value (#3714)
Achint-Agrawal Feb 17, 2023
67e1a90
[Internal] Query: Adds single physical partition check for Optimistic…
akotalwar Feb 17, 2023
b257f8e
[Internal] CTL: Fixes Reservoir Sampling Logic (#3712)
kundadebdatta Feb 17, 2023
94c83f5
Diagnostics: Adds startDate in Summary (#3707)
NimitS1 Feb 27, 2023
462a2c4
[Internal] Client Telemetry: Adds network information in the payload …
sourabh1007 Feb 27, 2023
0088c2f
Documentation: Fixes Database.ReadAsync description (#3457)
SaurabhSharma-MSFT Mar 1, 2023
fd687f5
Upgrade Resiliency: Adds Implementation for Validating the Unhealthy …
kundadebdatta Mar 1, 2023
93bb10b
ReadMany: Fixes BadRequest when using Ids with single quotes (#3732)
ealsur Mar 1, 2023
45c0d14
Release: Adds SDK version and changelog for 3.32.1 (#3733)
ealsur Mar 1, 2023
0018c4a
[Internal] Build: Fixes static tool analysis versions (#3736)
ealsur Mar 2, 2023
d6e04a9
Query: Fixes System.ArgumentException when using PartitionKey.None on…
neildsh Mar 2, 2023
f262f89
Query: Adds FIRST and LAST Scalar Expressions (#3629)
ezrahaleva-msft Mar 6, 2023
dc3d037
Subpartitioning: Adds support for Prefix Partition Key searches for s…
philipthomas-MSFT Mar 7, 2023
6ebb8d4
[Internal] ClientTelemetry: Adds logic to limit payload size to 2 MB …
sourabh1007 Mar 9, 2023
682b001
Query: Fixes regression from LINQ custom serializer fix (#3749)
leminh98 Mar 10, 2023
f2a3078
[Internal] LocalQuorum: Refactors override (i.e. strong) to allow fro…
kirankumarkolli Mar 10, 2023
d41f099
Release: Adds SDK version and change log for 3.32.2 (#3752)
ealsur Mar 11, 2023
1acfaa2
Subpartitioning: Adds APIs for public release and increase REST API v…
NaluTripician Mar 21, 2023
d0c0578
Change Feed Processor: Fixes LeaseLostException leaks on notification…
ealsur Mar 23, 2023
4ab6293
Upgrade Resiliency: Refactors GatewayAddressCache to Mark TransportAd…
kundadebdatta Mar 23, 2023
d822239
[Preview] PriorityBasedExecution: Adds PriorityLevel as a RequestOpti…
Achint-Agrawal Mar 27, 2023
1c544bf
[Internal] Client Telemetry: Adds sampling logic for network level te…
sourabh1007 Mar 29, 2023
6553a70
[Internal] Emulator Test : Fixes test when running with distributed t…
sourabh1007 Mar 29, 2023
67dc262
Release: Adds SDK version and changelog for 3.32.3 (#3788)
ealsur Mar 30, 2023
a697242
SummaryDiagnostics: Refactors Code to Remove Dependency of HttpRespon…
kundadebdatta Apr 3, 2023
e41eea5
[Internal] Documentation: Fixes API name to NoSQL (#3795)
jcocchi Apr 4, 2023
ba078c9
[Internal] CTL: Fixes docker image pipeline (#3794)
ealsur Apr 4, 2023
ae6bcf3
[Internal] AI Integration : Refactors useragent attribute name as per…
sourabh1007 Apr 4, 2023
2b69394
HttpClient: Adds Properties to the Http messages if available (#3803)
ealsur Apr 6, 2023
4222cef
Documentation: Refactors SQL API reference to NoSQL API (#3793)
scottaddie Apr 6, 2023
fce9702
[Internal] Perf test: Refactors code to re-enable performance tests (…
sourabh1007 Apr 7, 2023
2f2e8fb
HttpClient: Adds detection of DNS changes through use of SocketsHttpH…
NaluTripician Apr 7, 2023
789f701
[Internal] Tests: Fixes Open Telemetry attributes for ReadMany test (…
ealsur Apr 8, 2023
2b6fdb7
[Internal] Client Telemetry: Refactors code to run client telemetry d…
sourabh1007 Apr 10, 2023
33dea8a
Patch: Adds Move Operation (#3389)
Amaan-Haque Apr 11, 2023
31b1ff3
[Internal] Pipelines: Adds nightly build to produce packages (#3802)
ealsur Apr 11, 2023
bfbb43e
[Internal] OpenTelemetry: Direct Package update and replacing diagnos…
aavasthy Apr 18, 2023
f94869a
[Internal] MerlinBot: Adds auto-merge and cleanup automation (#3813)
ealsur Apr 18, 2023
afd5904
Update fabricbot.json (#3824)
ealsur Apr 24, 2023
fb80ba8
[Internal] Upgrade Resiliency: Adds Logic to Validate `Unknown` Repli…
kundadebdatta Apr 24, 2023
5d4f7c1
Serialization: Fixes call to CosmosSerializer.FromStream on Gateway m…
Apr 25, 2023
0d0ffe0
[Internal] Documentation: Adds documentation covering build pipelines…
ealsur Apr 27, 2023
e872f93
Client Encryption: Adds release version of Microsoft.Azure.Cosmos to …
vipulvishal-ms Apr 27, 2023
e5972ac
SDK 3.33.0 : Adds version bump and changelog (#3823)
NaluTripician Apr 27, 2023
7465da2
[Internal] Documentation: Adds msdata/direct Sync-up Guide. (#3828)
kundadebdatta May 1, 2023
20121c8
Query: Adds TRIM string system function support in LINQ (#3833)
leminh98 May 2, 2023
15616d3
Query: Fixes Parsing Error in SQL DOM when CultureInfo is available (…
leminh98 May 2, 2023
1dcba53
Client Encryption: Adds api FetchDataEncryptionKeyWithoutRawKeyAsync …
vipulvishal-ms May 3, 2023
9ba3f75
Initial commit (#3826)
adityasa May 3, 2023
17203a5
Query: Adds Computed Property SDK Support (#3761)
adityasa May 4, 2023
033e883
[Internal] Samples: Adds OpenTelemetry and Application Insights sampl…
jcocchi May 5, 2023
0c15865
[Internal] Query: Added custom serializer coverage tests to Expressio…
onionhammer May 9, 2023
ade7e34
Query: Added remaining Cosmos Type checking functions to CosmosLinqEx…
onionhammer May 9, 2023
aff7349
update sdk version and section tags (#3841)
jcocchi May 10, 2023
1a8b7f0
PackageLicense: Removes PackageLicenseUrl and Adds PackageLicenseFile…
philipthomas-MSFT May 16, 2023
b06d6c3
making ChangeFeedMode.LatestVersion accessible to the public (#3854)
philipthomas-MSFT May 17, 2023
c66e488
AI Integration: Fixes Operation Name in the activity and end to end T…
sourabh1007 May 17, 2023
7b32e8e
SDK 3.34.0 : Adds version bump and changelog (#3855)
philipthomas-MSFT May 18, 2023
2b7d709
Release: Fixes changelog.md change for 3845 to preview (#3859)
philipthomas-MSFT May 18, 2023
3727d4d
removing ThirdPartyNotice.txt from content and contentfiles folders (…
philipthomas-MSFT May 19, 2023
69cda11
Documentation: Adds see also link to Container.CreateTransactionalBat…
rinatmini May 22, 2023
d4f48f4
Query: Adds type-markers with count and length for large arrays (#3852)
Maya-Painter May 23, 2023
459a865
[Internal] AI Integration or Open Telemetry: Design Document (#3858)
sourabh1007 May 24, 2023
09e6fac
Benchmarking: Adds use of ARM Templates for benchmarking (#3838)
NaluTripician May 25, 2023
83bad12
Update README.md (#3875)
NaluTripician May 26, 2023
c5ef47e
moved to new file (#3876)
sourabh1007 May 27, 2023
ee7f86d
Direct Package Upgrade 3.31.0: Refactors code to make compatible with…
sourabh1007 May 30, 2023
89cc257
[Preview] Integrated cache: Adds BypassIntegratedCache to DedicatedGa…
jiajunpeng-msft May 31, 2023
327422b
Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to versi…
vipulvishal-ms Jun 1, 2023
3e3bbe5
CosmosClient: Fixes missing Trace when converting HTTP Timeout to 503…
rinatmini Jun 1, 2023
387ab62
AI Integration: Fixes Open Telemetry Example (#3868)
sourabh1007 Jun 2, 2023
f19acb0
[Internal] Query: Adds OptimisticDirectExecute and RequiresDistributi…
akotalwar Jun 5, 2023
c095bc1
Query: Refactors the EnableOptimisticDirectExecution flag to be publi…
akotalwar Jun 7, 2023
6024f24
[Internal] OpenTelemetry : Adds Telemetry Distributed Tracing functio…
aavasthy Jun 7, 2023
e08fd52
Documentation: Adds additional remarks to CosmosClient (#3891)
rinatmini Jun 8, 2023
d58b441
Open Telemetry End To End Test: Adds baseline for network level reque…
sourabh1007 Jun 8, 2023
df63092
[Internal] Design Docs: Adds Design Document for Client Telemetry (#3…
sourabh1007 Jun 9, 2023
d1dbe94
[Internal] Design Docs: Adds Design Document for Client Telemetry Par…
sourabh1007 Jun 9, 2023
28e03c8
ConnectionPolicy: Refactors Code to Reduce Default Request Timeout to…
kundadebdatta Jun 10, 2023
b924209
[Internal] Upgrade Resiliency: Adds Replica Health State Diagnostics.…
kundadebdatta Jun 10, 2023
ea10439
Subpartitioning: Fixes handling of split physical partitions (#3879)
NaluTripician Jun 12, 2023
8137c77
[Query] Fixes empty property name parsing exception (#3907)
Maya-Painter Jun 14, 2023
b200491
[Preview] Query: Refactors EnableOptimisticDirectExecution to true by…
akotalwar Jun 14, 2023
8684535
Documentations: Adds links to PatchItems docs (#3910)
rinatmini Jun 15, 2023
6970222
[Internal] Direct Package Upgrade: Refactors Code to Bump Up `Cosmos.…
kundadebdatta Jun 17, 2023
b979061
SDK 3.35.0 : Adds version bump and changelog (#3920)
NaluTripician Jun 19, 2023
b1d3134
[Internal] Last minute fix to changelog for 3.35.0 (#3921)
NaluTripician Jun 19, 2023
92319a0
[Internal] Query: Adds new header SupportedSerializationFormats (#3911)
Maya-Painter Jun 22, 2023
3f4b7bd
Code changes to optimize the rntbd open connection logic to open conn…
kundadebdatta Jun 26, 2023
abab80e
Query : Adds support for newtonsoft member access via ExtensionData (…
onionhammer Jun 26, 2023
3a1f46b
HttpTransport: Fixes HttpTimeoutPolicies to not accidentally suppress…
FabianMeiswinkel Jun 27, 2023
cf71ddd
SDK 3.35.1 : Adds version bump and changelog (#3945)
ealsur Jun 27, 2023
c2bf640
[Internal] Changelog: Fixes recommended version and title (#3948)
FabianMeiswinkel Jun 27, 2023
a25730a
[Internal] Dependencies: Fixes dependabot alert for System.Linq.Dynam…
ealsur Jun 28, 2023
17f1b4e
[Internal] Upgrade Resiliency: Adds Code to Enable Replica Validation…
kundadebdatta Jun 30, 2023
077acf3
Client Encryption: Adds package reference Microsoft.Azure.Cosmos vers…
vipulvishal-ms Jul 4, 2023
0d4e93f
[Internal] FabricBot: Adds GitOps.ResourceManagement because of Fabri…
microsoft-github-policy-service[bot] Jul 6, 2023
1981fc1
[Internal] Query: Refactors certain tests to not fail when EnableOpti…
akotalwar Jul 7, 2023
d3fa6a8
Diagnostics: Fixes verbose levels for "Operation will NOT be retried"…
rinatmini Jul 10, 2023
51c9d9c
Query: Fixes malformed continuation token exception type and message …
akotalwar Jul 10, 2023
4bb62d3
[Internal] Upgrade Resiliency: Refactors Code to Enable Replica Valid…
kundadebdatta Jul 11, 2023
d0aac27
Query : Adds string comparison alternative when converting LINQ to SQ…
ernesto1596 Jul 11, 2023
d7fc282
AI Integration: Fixes event generation for failed requests (#3973)
sourabh1007 Jul 12, 2023
8d2691b
[Internal] Category: Refactors Cosmos benchmark operations (#3961)
M-Lipin Jul 14, 2023
38b556b
3.35.2: Adds new SDK versions and contract files (#3985)
kundadebdatta Jul 17, 2023
d71dcb2
[INTERNAL] LocalQuorum: Adds documentation for LocalQuorum (#3993)
kirankumarkolli Jul 19, 2023
5ec7b4b
Code changes to update release note. (#3996)
kundadebdatta Jul 19, 2023
08981bf
Client Encryption: Adds fix for supporting Prefix Partition Key (Hier…
vipulvishal-ms Jul 28, 2023
ebd1b91
Query: Refactors changelog.md with Optimistic Direct Execution recomm…
akotalwar Aug 1, 2023
8c4f99f
[Internal] Query: Adds performance testing for OptimisticDirectExecut…
akotalwar Aug 5, 2023
c46614b
Query: Adds ODE continuation token support for non-ODE pipelines (#4009)
akotalwar Aug 5, 2023
e05e3eb
Code changes to disable replica validation in preview package. (#4019)
kundadebdatta Aug 8, 2023
27b9350
3.35.3: Adds new SDK versions and contract files (#4024)
kundadebdatta Aug 9, 2023
f8f3801
[Internal] Distributed tracing: Adds a sample to collect activities a…
sourabh1007 Aug 9, 2023
32827f7
Code changes to fix race condition by calling dispose too early. (#4030)
kundadebdatta Aug 10, 2023
efb90f0
Code changes to update change log for release 3.35.3 (#4032)
kundadebdatta Aug 10, 2023
e708ec9
Documentation: Fixes article links (replaced links V2 to V3 SDK versi…
rinatmini Aug 11, 2023
946dd4a
[Internal] Benchmark tool: Adds Cosmos Benchmark Metrics (#3950)
M-Lipin Aug 15, 2023
48af69e
GatewayAddressCache: Fixes Unobserved Exception During Background Add…
kundadebdatta Aug 16, 2023
ce38cc1
Documentation: Adds additional note for GetContactedRegions method (#…
rinatmini Aug 18, 2023
2257ca2
[Internal] Client Telemetry: Adds Client Telemetry pipeline sending d…
sourabh1007 Aug 22, 2023
e2311a9
[Internal] Client Telemetry: Refactors code for collectors (#4037)
sourabh1007 Aug 22, 2023
f56944e
[Internal] Automation: Adds logic to tag customer-reported issues (#4…
ealsur Aug 23, 2023
83dd4b5
[Internal] Benchmark tool: Adds requests diagnostic data capture and …
tangerinous Aug 23, 2023
3aced24
[Internal] Benchmark tool: Adds feature to the dashboard that genera…
tangerinous Aug 29, 2023
c72ebc8
[Internal] Client Telemetry: Adds client config api call to get lates…
sourabh1007 Aug 31, 2023
7c3f5e1
[Internal] Benchmark tool: Fixes benchmark run command using OSSProje…
tangerinous Sep 5, 2023
b7b1064
[Query] Adds public backend metrics property to Diagnostics (#4001)
Maya-Painter Sep 8, 2023
4111cae
[Query][Internal] Adds tests for aggregate queries with invalid conti…
Maya-Painter Sep 11, 2023
b909bd7
[Internal] Benchmark tool: Fixes code refractoring to model the metri…
kirankumarkolli Sep 11, 2023
be0c098
first draft (#4079)
sourabh1007 Sep 12, 2023
391c3d9
Subpartitioning: Fixes bug for queries on subpartitioned containers (…
NaluTripician Sep 14, 2023
0a0e5ae
[Internal] Query: Fixes LINQ Test Organization (#4076)
leminh98 Sep 15, 2023
52d0436
ClientTelemetry : Adds logic to call client config in every 10 minute…
sourabh1007 Sep 15, 2023
83509cc
SDK 3.35.4: Adds version bump and changelog (#4087)
NaluTripician Sep 15, 2023
258d960
[Internal] Query: Fixes escaped string parsing in SqlParser (#4054)
adityasa Sep 18, 2023
373ab9e
Bechmark : Fixes benchmark runs (#4088)
sourabh1007 Sep 20, 2023
9f8d848
[Internal] Query: Adds Index Metrics V2 Object Model (#4058)
leminh98 Sep 20, 2023
08e7f54
Distributed Tracing: Fixes dependency failure on appinsights (#4098)
sourabh1007 Sep 26, 2023
4556567
[Internal] Query: Adds deserializing logic for ClientQL Coordinator D…
akotalwar Sep 26, 2023
f312f6a
[Internal] Query: Adds check to detect unsupported queries for Optimi…
akotalwar Sep 28, 2023
101b9b1
[Internal] Query: Fixes minor issues with TestQueryValidityCheckWithO…
akotalwar Sep 28, 2023
11fa17b
Query: Adds LINQ RegexMatch Extension method (#4078)
leminh98 Oct 3, 2023
b03df6b
Chaning Bounded to Strong (#4103)
kirankumarkolli Oct 4, 2023
72e96fa
Client Telemetry: Adds new public APIs (#4056)
sourabh1007 Oct 4, 2023
7ed22ac
[Internal] Build: Adds CodeQL support in nightly builds (#4113)
Pilchie Oct 6, 2023
75eec5c
Benchmark: Fixes to show estimated cost of a container only when new …
sourabh1007 Oct 9, 2023
a5dec66
Distributed Tracing: Fixes SDK responses compatibility with opentelem…
sourabh1007 Oct 9, 2023
88fd4cd
Revert "Query: Adds new system strings in JsonBinaryEncoding, replaci…
Maya-Painter Oct 9, 2023
e2fb347
CosmosClientOptions: Adds support for multiple formats of Azure regio…
Oct 10, 2023
4e2beda
Distributed Tracing: Fixes traceid null exception issue (#4111)
aavasthy Oct 10, 2023
7db0aa0
Telemetry Options: Adds telemetry options in GA package (#4117)
sourabh1007 Oct 12, 2023
20547bc
[Internal] Direct Package: Adds version bump (#4120)
NaluTripician Oct 13, 2023
8f65cd2
Query : Adds Missing QueryMetrics Documentation (#4127)
Maya-Painter Oct 17, 2023
51a8c6c
TriggerOperation: Adds Upsert Operation Support (#4119)
sourabh1007 Oct 18, 2023
5777a3a
SDK 3.36.0 : Adds version bump and changelog (#4118)
sourabh1007 Oct 18, 2023
f3a9cae
Release 3.36.0: Fixes pipeline by removing ReleasePackage variable (#…
sourabh1007 Oct 18, 2023
28204bb
Item Operations: Fixes JsonSerialization exception when MissingMember…
philipthomas-MSFT Oct 18, 2023
1afcacd
[Internal] Query : Adds test coverage for custom serializers (#4114)
Maya-Painter Oct 18, 2023
a0fb14f
Release 3.36.0 : Fixes Client Telemetry Release Test (#4132)
sourabh1007 Oct 19, 2023
e2ce570
Update CosmosItemTests.cs (#4141)
Maya-Painter Oct 19, 2023
b8d9225
Release 3.36.0: Fixes client config test and preview pipeline (#4149)…
sourabh1007 Oct 23, 2023
6de10dd
Query : Fixes querying conflicts (#4100)
adityasa Oct 24, 2023
8253bef
Fixes changelog typo and date (#4155)
sourabh1007 Oct 24, 2023
42cc681
Bump Azure.Identity in /Microsoft.Azure.Cosmos.Samples/Usage/Encrypti…
dependabot[bot] Oct 24, 2023
083df87
Bump Azure.Identity (#4135)
dependabot[bot] Oct 24, 2023
a4836ff
Per Partition Automatic Failover: Fixes Gateway 503 Cold Start Issue …
kundadebdatta Oct 27, 2023
646d006
[Internal] Query: Fixes optimalPageSize logic for OFFSET LIMIT in ORD…
sc978345 Oct 30, 2023
9175f51
[Internal] Client Telemetry: Adds telemetry contract (#4161)
sourabh1007 Oct 31, 2023
1f81b54
Client Encryption: Adds Azure.Identity from 1.1.1 to 1.10.2 (#4134)
dependabot[bot] Nov 2, 2023
f379919
[Internal] Query: Removes ForcePassThrough support (#4160)
akotalwar Nov 3, 2023
f7a4c56
[Internal] Upgrade Resiliency: Fixes Duplicate Channel and Task Creat…
kundadebdatta Nov 6, 2023
b191834
[Internal] DocumentClient: Adds TryGetAccountProperties (#4167)
ealsur Nov 6, 2023
4db6078
Query: Fixes documentation to reflect state of System.Text.Json seria…
Maya-Painter Nov 7, 2023
d287f08
[Internal] Query: Adds interface for linq serialization functions (#4…
Maya-Painter Nov 8, 2023
966b481
Routing: Adds ExcludeRegions Feature to RequestOptions (#4128)
NaluTripician Nov 9, 2023
4fee546
Upgrade Resiliency: Adds Code to Enable Advanced Replica Selection Fe…
kundadebdatta Nov 15, 2023
f471418
VS 17.8 auto runs NuGetAudit and flagging 10.0.2, CosmosDB SDK alread…
kirankumarkolli Nov 15, 2023
e205d41
Documentation: Adds Upsert documentation to include status codes for …
kirankumarkolli Nov 16, 2023
98048d2
[Internal] Code Analysis: Fixes all warning in source/test/usage proj…
kirankumarkolli Nov 16, 2023
c6918b4
3.37.0: Adds new SDK versions and contract files (#4191)
kundadebdatta Nov 17, 2023
a0f1c30
[Internal] Versioning: Adds guidance for versioning SDK releases (#4192)
ealsur Nov 21, 2023
100e510
Merge branch 'master' into msdata/direct
kundadebdatta Nov 30, 2023
fd07023
Code changes to sync up with latest master and direct release 3.32.0.
kundadebdatta Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Client Telemetry: Adds new public APIs (#4056)
* Revert "[Internal] Client Telemetry: Refactors code for collectors (#4037)"

This reverts commit e2311a9.

* Revert "Revert "[Internal] Client Telemetry: Refactors code for collectors (#4037)""

This reverts commit f04234b.

* firdst draft

* initialize object

* null handle

* update contracts

* compilation charges

* fix tests

* public API changes

* add docs

* contract updated

* fixed tests

* by default switch of te;emetry in sdk

* fix tests

* fix assertion

* incorporate review comments

* fetaure flag fix in script

* switch case

* add test

* fix tests

* fix test

* fixed run.sh

* minor changes

* code refactor

* changed default values and fix tests
  • Loading branch information
sourabh1007 authored Oct 4, 2023
commit 72e96faca5376afa1a2c9992bfb99cbeda5d11f9
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public class BenchmarkConfig
[Option(Required = false, HelpText = "Disable core SDK logging")]
public bool DisableCoreSdkLogging { get; set; }

[Option(Required = false, HelpText = "Enable Distributed Tracing")]
public bool EnableDistributedTracing { get; set; }
[Option(Required = false, HelpText = "Disable Distributed Tracing feature from source")]
public bool DisableDistributedTracing { get; set; } = false;

[Option(Required = false, HelpText = "Client Telemetry Schedule in Seconds")]
public int TelemetryScheduleInSec { get; set; }
Expand Down Expand Up @@ -138,8 +138,8 @@ public class BenchmarkConfig
[Option(Required = false, HelpText = "Application Insights connection string")]
public string AppInsightsConnectionString { get; set; }

[Option(Required = false, HelpText = "Enable Client Telemetry Feature in SDK. Make sure you enable it from the portal also.")]
public bool EnableClientTelemetry { get; set; } = true;
[Option(Required = false, HelpText = "Disable Client Telemetry Feature in SDK. Make sure you enable it from the portal also.")]
public bool DisableClientTelemetry { get; set; } = false;

internal int GetTaskCount(int containerThroughput)
{
Expand Down Expand Up @@ -220,16 +220,18 @@ internal Microsoft.Azure.Cosmos.CosmosClient CreateCosmosClient(string accountKe
MaxRetryAttemptsOnRateLimitedRequests = 0,
MaxRequestsPerTcpConnection = this.MaxRequestsPerTcpConnection,
MaxTcpConnectionsPerEndpoint = this.MaxTcpConnectionsPerEndpoint,
EnableClientTelemetry = this.EnableClientTelemetry
CosmosClientTelemetryOptions = new Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions()
{
DisableSendingMetricsToService = this.DisableClientTelemetry,
DisableDistributedTracing = this.DisableDistributedTracing
}
};

if (!string.IsNullOrWhiteSpace(this.ConsistencyLevel))
{
clientOptions.ConsistencyLevel = (Microsoft.Azure.Cosmos.ConsistencyLevel)Enum.Parse(typeof(Microsoft.Azure.Cosmos.ConsistencyLevel), this.ConsistencyLevel, ignoreCase: true);
}

clientOptions.IsDistributedTracingEnabled = this.EnableDistributedTracing;

return new Microsoft.Azure.Cosmos.CosmosClient(
this.EndPoint,
accountKey,
Expand Down
18 changes: 12 additions & 6 deletions Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ then
exit -1
fi

if [ -z "$TELEMETRY_ENDPOINT" ]
then
echo "Missing TELEMETRY_ENDPOINT"
exit -1
fi

if [ -z "$INCLUDE_QUERY" ]
then
echo "Missing INCLUDE_QUERY"
Expand All @@ -41,26 +47,26 @@ echo $COMMIT_TIME
echo $BRANCH_NAME

# Client telemetry disabled ReadStreamExistsV3
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --disableClientTelemetry --disableDistributedTracing --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 10 #Wait

# Client telemetry enabled ReadStreamExistsV3. This is needed to see the impact of client telemetry.
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithTelemetry --telemetryScheduleInSec 60 --disableDistributedTracing --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithTelemetry --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 10 #Wait

# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of distributed tracing (without listener)
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithDistributedTracingWOListener --disableClientTelemetry --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithDistributedTracingWOListener --enableDistributedTracing --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 10 #Wait

#Point read operations
for WORKLOAD_NAME in ReadNotExistsV3 ReadTExistsV3 ReadStreamExistsWithDiagnosticsV3
do
dotnet run -c Release -- -n 2000000 -w $WORKLOAD_NAME --pl $PL --telemetryScheduleInSec 60 --tcp 10 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 2000000 -w $WORKLOAD_NAME --pl $PL --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 10 #Wait
done

#Insert operation
dotnet run -c Release -- -n 2000000 -w InsertV3 --pl 30 --telemetryScheduleInSec 60 --tcp 1 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 2000000 -w InsertV3 --pl 30 --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 1 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 45 #Wait

if [ "$INCLUDE_QUERY" = true ]
Expand All @@ -70,7 +76,7 @@ then
# pl is 16 because 18 was casuing a small amount of thorrtles.
for WORKLOAD_NAME in ReadFeedStreamV3 QueryTSinglePkV3 QueryTSinglePkOrderByWithPaginationV3 QueryTSinglePkOrderByFullDrainV3 QueryTCrossPkV3 QueryTCrossPkOrderByWithPaginationV3 QueryTCrossPkOrderByFullDrainV3 QueryStreamSinglePkV3 QueryStreamSinglePkOrderByWithPaginationV3 QueryStreamSinglePkOrderByFullDrainV3 QueryStreamCrossPkV3 QueryStreamCrossPkOrderByWithPaginationV3 QueryStreamCrossPkOrderByFullDrainV3
do
dotnet run -c Release -- -n 200000 -w $WORKLOAD_NAME --pl 16 --telemetryScheduleInSec 60 --tcp 10 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
dotnet run -c Release -- -n 200000 -w $WORKLOAD_NAME --pl 16 --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
sleep 10 #Wait
done
fi
14 changes: 11 additions & 3 deletions Microsoft.Azure.Cosmos.Samples/Tools/CTL/CTLConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public string DiagnosticsThresholdDuration
[Option("ctl_reservoir_sample_size", Required = false, HelpText = "The reservoir sample size.")]
public int ReservoirSampleSize { get; set; } = 1028;

[Option("ctl_enable_client_telemetry", Required = false, HelpText = "Enable Client Telemetry Feature in SDK. Make sure you enable it from the portal also.")]
public bool EnableClientTelemetry { get; set; } = true;
[Option("ctl_disable_client_telemetry", Required = false, HelpText = "Disable Client Telemetry Feature in SDK. Make sure you enable it from the portal also.")]
public bool DisableClientTelemetry { get; set; } = false;

internal TimeSpan RunningTimeDurationAsTimespan { get; private set; } = TimeSpan.FromHours(10);
internal TimeSpan DiagnosticsThresholdDurationAsTimespan { get; private set; } = TimeSpan.FromSeconds(60);
Expand All @@ -130,19 +130,27 @@ internal CosmosClient CreateCosmosClient()
CosmosClientOptions clientOptions = new CosmosClientOptions()
{
ApplicationName = CTLConfig.UserAgentSuffix,
EnableClientTelemetry = this.EnableClientTelemetry
CosmosClientTelemetryOptions = new CosmosClientTelemetryOptions()
{
DisableSendingMetricsToService = this.DisableClientTelemetry,
}
};

Console.WriteLine("ApplicationName = " + CTLConfig.UserAgentSuffix);
Console.WriteLine("DisableSendingMetricsToService = " + this.DisableClientTelemetry);

if (this.UseGatewayMode)
{
clientOptions.ConnectionMode = ConnectionMode.Gateway;
Console.WriteLine("ConnectionMode = " + ConnectionMode.Gateway);
}

if (!string.IsNullOrWhiteSpace(this.ConsistencyLevel))
{
if (Enum.TryParse(this.ConsistencyLevel, out ConsistencyLevel consistencyLevel))
{
clientOptions.ConsistencyLevel = consistencyLevel;
Console.WriteLine("ConsistencyLevel = " + consistencyLevel);
}
else
{
Expand Down
22 changes: 11 additions & 11 deletions Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Cosmos
using System.Net.Http;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Azure.Cosmos.Telemetry;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;

Expand Down Expand Up @@ -48,8 +47,9 @@ public ConnectionPolicy()
this.MaxConnectionLimit = defaultMaxConcurrentConnectionLimit;
this.RetryOptions = new RetryOptions();
this.EnableReadRequestsFallback = null;
this.EnableClientTelemetry = false; // by default feature flag is off
this.ServerCertificateCustomValidationCallback = null;

this.CosmosClientTelemetryOptions = new CosmosClientTelemetryOptions();
}

/// <summary>
Expand Down Expand Up @@ -211,15 +211,6 @@ public bool EnableTcpConnectionEndpointRediscovery
set;
}

/// <summary>
/// Gets or sets the flag to enable client telemetry feature.
/// </summary>
internal bool EnableClientTelemetry
{
get;
set;
}

/// <summary>
/// Gets the default connection policy used to connect to the Azure Cosmos DB service.
/// </summary>
Expand Down Expand Up @@ -489,6 +480,15 @@ internal int? MaxTcpPartitionCount
set;
}

/// <summary>
/// Gets or sets Client Telemetry Options like feature flags and corresponding options
/// </summary>
internal CosmosClientTelemetryOptions CosmosClientTelemetryOptions
{
get;
set;
}

/// <summary>
/// GlobalEndpointManager will subscribe to this event if user updates the preferredLocations list in the Azure Cosmos DB service.
/// </summary>
Expand Down
42 changes: 12 additions & 30 deletions Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Microsoft.Azure.Cosmos
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Azure.Cosmos.Fluent;
Expand Down Expand Up @@ -85,6 +84,7 @@ public CosmosClientOptions()
this.ConnectionProtocol = CosmosClientOptions.DefaultProtocol;
this.ApiType = CosmosClientOptions.DefaultApiType;
this.CustomHandlers = new Collection<RequestHandler>();
this.CosmosClientTelemetryOptions = new CosmosClientTelemetryOptions();
}

/// <summary>
Expand Down Expand Up @@ -730,9 +730,14 @@ internal Protocol ConnectionProtocol
internal bool? EnableCpuMonitor { get; set; }

/// <summary>
/// Flag to enable telemetry
/// Gets or sets Client Telemetry Options like feature flags and corresponding options
/// </summary>
internal bool? EnableClientTelemetry { get; set; }
#if PREVIEW
public
#else
internal
#endif
CosmosClientTelemetryOptions CosmosClientTelemetryOptions { get; set; }

internal void SetSerializerIfNotConfigured(CosmosSerializer serializer)
{
Expand Down Expand Up @@ -771,12 +776,13 @@ internal virtual ConnectionPolicy GetConnectionPolicy(int clientId)
EnableTcpConnectionEndpointRediscovery = this.EnableTcpConnectionEndpointRediscovery,
EnableAdvancedReplicaSelectionForTcp = this.EnableAdvancedReplicaSelectionForTcp,
HttpClientFactory = this.httpClientFactory,
ServerCertificateCustomValidationCallback = this.ServerCertificateCustomValidationCallback
ServerCertificateCustomValidationCallback = this.ServerCertificateCustomValidationCallback,
CosmosClientTelemetryOptions = new CosmosClientTelemetryOptions()
};

if (this.EnableClientTelemetry.HasValue)
if (this.CosmosClientTelemetryOptions != null)
{
connectionPolicy.EnableClientTelemetry = this.EnableClientTelemetry.Value;
connectionPolicy.CosmosClientTelemetryOptions = this.CosmosClientTelemetryOptions;
}

if (this.ApplicationRegion != null)
Expand Down Expand Up @@ -1013,29 +1019,5 @@ public override bool CanConvert(Type objectType)
return objectType == typeof(DateTime);
}
}

/// <summary>
/// Distributed Tracing Options. <see cref="Microsoft.Azure.Cosmos.DistributedTracingOptions"/>
/// </summary>
/// <remarks> Applicable only when Operation level distributed tracing is enabled through <see cref="Microsoft.Azure.Cosmos.CosmosClientOptions.IsDistributedTracingEnabled"/></remarks>
internal DistributedTracingOptions DistributedTracingOptions { get; set; }

/// <summary>
/// Gets or sets the flag to generate operation level <see cref="System.Diagnostics.Activity"/> for methods calls using the Source Name "Azure.Cosmos.Operation".
/// </summary>
/// <value>
/// The default value is true (for preview package).
/// </value>
/// <remarks>This flag is there to disable it from source. Please Refer https://opentelemetry.io/docs/instrumentation/net/exporters/ to know more about open telemetry exporters</remarks>
#if PREVIEW
public
#else
internal
#endif
bool IsDistributedTracingEnabled { get; set; }
#if PREVIEW
= true;
#endif

}
}
58 changes: 58 additions & 0 deletions Microsoft.Azure.Cosmos/src/CosmosClientTelemetryOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos
{
/// <summary>
/// Telemetry Options for Cosmos Client to enable/disable telemetry and distributed tracing along with corresponding threshold values.
/// </summary>
#if PREVIEW
public
#else
internal
#endif
class CosmosClientTelemetryOptions
{
/// <summary>
/// Disable sending telemetry to service, <see cref="Microsoft.Azure.Cosmos.CosmosThresholdOptions"/> is not applicable to this as of now.
/// </summary>
/// <remarks>This option will disable sending telemetry to service.even it is opt-in from portal.</remarks>
/// <value>true</value>
#if PREVIEW
public
#else
internal
#endif
bool DisableSendingMetricsToService { get; set; } = true;

/// <summary>
/// This method enable/disable generation of operation level <see cref="System.Diagnostics.Activity"/> if listener is subscribed to the Source Name "Azure.Cosmos.Operation".
/// </summary>
/// <value>false</value>
/// <remarks> Please Refer https://opentelemetry.io/docs/instrumentation/net/exporters/ to know more about open telemetry exporters</remarks>
#if PREVIEW
public
#else
internal
#endif
bool DisableDistributedTracing { get; set; } =
#if PREVIEW
false;
#else
true;
#endif

/// <summary>
/// Threshold values for Distributed Tracing.
/// These values decides whether to generate operation level <see cref="System.Diagnostics.Tracing.EventSource"/> with request diagnostics or not.
/// </summary>
#if PREVIEW
public
#else
internal
#endif
CosmosThresholdOptions CosmosThresholdOptions { get; set; } = new CosmosThresholdOptions();

}
}
31 changes: 31 additions & 0 deletions Microsoft.Azure.Cosmos/src/CosmosThresholdOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos
{
using System;

/// <summary>
/// Threshold values for Distributed Tracing
/// </summary>
#if PREVIEW
public
#else
internal
#endif
class CosmosThresholdOptions
{
/// <summary>
/// Latency Threshold for non point operations i.e. Query
/// </summary>
/// <value>500 ms</value>
public TimeSpan NonPointOperationLatencyThreshold { get; set; } = TimeSpan.FromSeconds(3);

/// <summary>
/// Latency Threshold for point operations i.e operation other than Query
/// </summary>
/// <value>100 ms</value>
public TimeSpan PointOperationLatencyThreshold { get; set; } = TimeSpan.FromSeconds(1);
}
}
Loading