From b94556b583940694a67ddbd0320ce2850d1ce912 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Sat, 27 May 2023 02:52:12 +0530 Subject: [PATCH] moved to new file --- docs/SdkDesign.md | 29 ----------------------------- docs/observability.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 docs/observability.md diff --git a/docs/SdkDesign.md b/docs/SdkDesign.md index 62d4a751f7..f3f2ec1581 100644 --- a/docs/SdkDesign.md +++ b/docs/SdkDesign.md @@ -186,32 +186,3 @@ flowchart LR ConsistencyWriter --> TCPClient ``` -## Distributed Tracing (Preview) - -For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) - -```mermaid -flowchart TD - classDef orange fill:#f96 - classDef blue fill:#6fa8dc - subgraph ClientContextCore - OpenTelemetryRecorderFactory --> CheckFeatureFlag{isDistributedTracing Enabled?} - CheckFeatureFlag --> |Yes| CreateActivity(Start an Activity or Child activity with specific kind Using DiagnosticScope
and preloaded attributes like containerName, databaseName, operationType) - CreateActivity --> HandlerPipeline - GetResponse --> TriggerDispose(Trigger Dispose of Disagnostic Scope) - TriggerDispose --> CheckLatencyThreshold{Is high latency/errored response?} - CheckLatencyThreshold -- Yes --> GenerateTraceEvent(Generate Warning or Error Trace Event With Request Diagnostics) --> StopActivity - CheckLatencyThreshold -- No --> StopActivity - StopActivity --> SendResponse(Send Response to Caller):::blue - end - OperationRequest[Operation Request]:::blue --> ClientContextCore - subgraph Application - OperationCall(User Application):::orange - end - OperationCall(User Application):::orange --> OperationRequest - CheckFeatureFlag --> |No| HandlerPipeline - HandlerPipeline --> OtherLogic(Goes through TCP/HTTP calls
based on Connection Mode):::blue - OtherLogic --> GetResponse(Get Response for the request) - SendResponse --> OperationCall - -``` \ No newline at end of file diff --git a/docs/observability.md b/docs/observability.md new file mode 100644 index 0000000000..b74b55cd21 --- /dev/null +++ b/docs/observability.md @@ -0,0 +1,36 @@ +# .NET SDK Observability Feature Design + +## Distributed Tracing (Preview) + +**Source to capture operation level activities**: _Azure.Cosmos.Operation_\ +**Source to capture event with request diagnostics** : _Azure-Cosmos-Operation-Request-Diagnostics_ + +For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) + +```mermaid +flowchart TD + classDef orange fill:#f96 + classDef blue fill:#6fa8dc + subgraph ClientContextCore + OpenTelemetryRecorderFactory --> CheckFeatureFlag{isDistributedTracing Enabled?} + CheckFeatureFlag --> |Yes| CreateActivity(Start an Activity or Child activity
with preloaded attributes) + CreateActivity --> HandlerPipeline{Handler Pipeline} + GetResponse --> TriggerDispose(Trigger Dispose of Diagnostic Scope) + subgraph Dispose + TriggerDispose --> CheckLatencyThreshold{Is high latency/errored response?} + CheckLatencyThreshold -- Yes --> GenerateEvent(Generate Warning or Error Event With Request Diagnostics) --> StopActivity + CheckLatencyThreshold -- No --> StopActivity + end + StopActivity --> SendResponse(Send Response to Caller):::blue + end + OperationRequest[Operation Request]:::blue --> ClientContextCore + subgraph Application + OperationCall(User Application):::orange + end + OperationCall(User Application):::orange --> OperationRequest + CheckFeatureFlag --> |No| HandlerPipeline + HandlerPipeline --> OtherLogic(Goes through TCP/HTTP calls
based on Connection Mode):::blue + OtherLogic --> GetResponse(Get Response for the request) + SendResponse --> OperationCall + +``` \ No newline at end of file