Copilot commented on code in PR #9051:
URL: https://github.com/apache/ozone/pull/9051#discussion_r2428506777


##########
hadoop-hdds/docs/content/design/distributed-tracing-OpenTelemetry.md:
##########
@@ -0,0 +1,466 @@
+---
+title: Distributed Tracing using OpenTelemetry for Ozone
+summary: Use of OpenTelemetry for distributed tracing in Ozone.
+date: 2025-09-19
+jira: HDDS-13679
+status: draft
+---
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+# Distributed Tracing with OpenTelemetry
+
+# 1. Introduction
+
+Ozone currently utilizes OpenTracing with Jaeger for distributed
+tracing. However, the OpenTracing project is deprecated and no longer
+actively supported. This document proposes migrating from OpenTracing to
+OpenTelemetry, which is a standardized and actively maintained project
+supporting various tracing tools, including Jaeger.
+
+The primary scope of this document is to detail the integration of
+OpenTelemetry for traces within the Ozone ecosystem.
+
+# 2. OpenTelemetry Integration
+
+This section outlines key OpenTelemetry concepts and their application
+within Ozone.
+
+## 2.1. OpenTelemetry Concepts
+
+### 2.1.1. Context
+
+Context in OpenTelemetry keeps span and other information in the
+context. Context is set to thread-local using `context.makeCurrent()`. And
+the same can be retrieved using `context.current()`.
+
+**Context Creation:**
+
+-   Creating a span with noParent().
+-   Importing a trace from an external request.
+-   Manually creating a Context with parameters:
+
+```
+// Manual trace context creation
+Context rootContext = Context.root();
+Context newContextFromRoot = rootContext.with(myKey, "anotherValue");
+```
+
+**Inter-thread Transfer:** Context can be transferred between threads by
+explicitly setting the context in the target thread using
+context.makeCurrent().
+
+**Inter-process Transfer**: Context needs to be retrieved and set to
+headers for HTTP or message body in gRpc to transfer.Further details are

Review Comment:
   Missing space after period: 'gRpc to transfer.Further' should be 'gRpc to 
transfer. Further'
   ```suggestion
   headers for HTTP or message body in gRpc to transfer. Further details are
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to