Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c1d94aa
HDDS-12926. remove *.tmp.* exclusion in DU
sumitagrawl May 20, 2025
0eabb6e
Merge branch 'apache:master' into master
sumitagrawl May 21, 2025
d39a809
Merge branch 'apache:master' into master
sumitagrawl Jun 4, 2025
2f8040c
Merge branch 'apache:master' into master
sumitagrawl Jun 16, 2025
788aad7
Merge branch 'apache:master' into master
sumitagrawl Jun 23, 2025
2850588
Merge branch 'apache:master' into master
sumitagrawl Jun 26, 2025
d14ae78
Merge branch 'apache:master' into master
sumitagrawl Jul 10, 2025
b4dc071
Merge branch 'apache:master' into master
sumitagrawl Jul 14, 2025
19c3fea
Merge branch 'apache:master' into master
sumitagrawl Jul 23, 2025
f36b6cd
Merge branch 'apache:master' into master
sumitagrawl Jul 30, 2025
d55580c
Merge branch 'apache:master' into master
sumitagrawl Aug 14, 2025
3bc5817
Merge branch 'apache:master' into master
sumitagrawl Aug 26, 2025
2992466
Merge branch 'apache:master' into master
sumitagrawl Sep 11, 2025
9b5cd3e
HDDS-13680. migrate tracing to opentelemetry
sumitagrawl Sep 12, 2025
cc7a725
fix checkstyle, pmd, dependency
sumitagrawl Sep 15, 2025
bc0e118
fix dependency
sumitagrawl Sep 15, 2025
94090d8
fix checkstyle
sumitagrawl Sep 15, 2025
191a049
fix test cases
sumitagrawl Sep 15, 2025
3595cae
fix test case failure
sumitagrawl Sep 16, 2025
4d87485
test case failure fix
sumitagrawl Sep 16, 2025
12e1a33
checkstyle fix
sumitagrawl Sep 16, 2025
a6dfaa2
fix failure
sumitagrawl Sep 16, 2025
0061ae4
update doc and configuration
sumitagrawl Sep 16, 2025
c80be02
dependency fix for analyze failure
sumitagrawl Sep 17, 2025
37f4d7d
annotation-api as runtime for jetty
sumitagrawl Sep 17, 2025
6bb82b4
fix dependency
sumitagrawl Sep 17, 2025
66226d3
fix review comment
sumitagrawl Sep 17, 2025
34249ea
Merge branch 'apache:master' into master
sumitagrawl Sep 19, 2025
33c3819
Merge remote-tracking branch 'origin/master' into HDDS-13680
sumitagrawl Sep 19, 2025
93499e9
fix review comment
sumitagrawl Sep 19, 2025
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
8 changes: 0 additions & 8 deletions hadoop-hdds/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-util</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.util.GlobalTracer;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -536,10 +533,8 @@ public XceiverClientReply sendCommandAsync(
ContainerCommandRequestProto request)
throws IOException, ExecutionException, InterruptedException {

Span span = GlobalTracer.get()
.buildSpan("XceiverClientGrpc." + request.getCmdType().name()).start();

try (Scope ignored = GlobalTracer.get().activateSpan(span)) {
try (TracingUtil.TraceCloseable ignored = TracingUtil.createActivatedSpan(
"XceiverClientGrpc." + request.getCmdType().name())) {

ContainerCommandRequestProto.Builder builder =
ContainerCommandRequestProto.newBuilder(request)
Expand All @@ -553,9 +548,6 @@ public XceiverClientReply sendCommandAsync(
asyncReply.getResponse().get();
}
return asyncReply;

} finally {
span.finish();
}
}

Expand Down
29 changes: 18 additions & 11 deletions hadoop-hdds/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,28 @@
<artifactId>picocli</artifactId>
</dependency>
<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-core</artifactId>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-context</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-util</artifactId>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-common</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-trace</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
Expand Down Expand Up @@ -156,11 +168,6 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-client</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-metrics-dropwizard3</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
import static java.util.Collections.singletonList;
import static org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.Result.BLOCK_TOKEN_VERIFICATION_FAILED;

import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.util.GlobalTracer;
import io.opentelemetry.api.trace.Span;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -155,17 +153,17 @@ static <T> T tryEachDatanode(Pipeline pipeline,
try {
return op.apply(d);
} catch (IOException e) {
Span span = GlobalTracer.get().activeSpan();
Span span = TracingUtil.getActiveSpan();
if (e instanceof StorageContainerException) {
StorageContainerException sce = (StorageContainerException)e;
// Block token expired. There's no point retrying other DN.
// Throw the exception to request a new block token right away.
if (sce.getResult() == BLOCK_TOKEN_VERIFICATION_FAILED) {
span.log("block token verification failed at DN " + d);
span.addEvent("block token verification failed at DN " + d);
throw e;
}
}
span.log("failed to connect to DN " + d);
span.addEvent("failed to connect to DN " + d);
excluded.add(d);
if (excluded.size() < pipeline.size()) {
LOG.warn(toErrorMessage.apply(d)
Expand Down Expand Up @@ -372,18 +370,15 @@ public static ContainerProtos.ReadChunkResponseProto readChunk(
builder.setEncodedToken(token.encodeToUrlString());
}

Span span = GlobalTracer.get()
.buildSpan("readChunk").start();
try (Scope ignored = GlobalTracer.get().activateSpan(span)) {
span.setTag("offset", chunk.getOffset())
.setTag("length", chunk.getLen())
.setTag("block", blockID.toString());
try (TracingUtil.TraceCloseable ignored = TracingUtil.createActivatedSpan("readChunk")) {
Span span = TracingUtil.getActiveSpan();
span.setAttribute("offset", chunk.getOffset())
.setAttribute("length", chunk.getLen())
.setAttribute("block", blockID.toString());
return tryEachDatanode(xceiverClient.getPipeline(),
d -> readChunk(xceiverClient, chunk, blockID,
validators, builder, d),
d -> toErrorMessage(chunk, blockID, d));
} finally {
span.finish();
}
}

Expand All @@ -394,8 +389,7 @@ private static ContainerProtos.ReadChunkResponseProto readChunk(
DatanodeDetails d) throws IOException {
ContainerCommandRequestProto.Builder requestBuilder = builder
.setDatanodeUuid(d.getUuidString());
Span span = GlobalTracer.get().activeSpan();
String traceId = TracingUtil.exportSpan(span);
String traceId = TracingUtil.exportCurrentSpan();
if (traceId != null) {
requestBuilder = requestBuilder.setTraceID(traceId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

package org.apache.hadoop.hdds.tracing;

import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.util.GlobalTracer;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Scope;
import org.apache.ratis.thirdparty.io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener;
import org.apache.ratis.thirdparty.io.grpc.Metadata;
import org.apache.ratis.thirdparty.io.grpc.ServerCall;
Expand All @@ -41,14 +40,15 @@ public <ReqT, RespT> Listener<ReqT> interceptCall(
next.startCall(call, headers)) {
@Override
public void onMessage(ReqT message) {

Span span = TracingUtil
.importAndCreateSpan(
call.getMethodDescriptor().getFullMethodName(),
headers.get(GrpcClientInterceptor.TRACING_HEADER));
try (Scope ignored = GlobalTracer.get().activateSpan(span)) {
try (Scope ignored = span.makeCurrent()) {
super.onMessage(message);
} finally {
span.finish();
span.end();
}
}
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

import static java.util.Collections.emptyMap;

import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.util.GlobalTracer;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.Arrays;
Expand Down Expand Up @@ -67,10 +64,7 @@ public Object invoke(Object proxy, Method method, Object[] args)
method.getName());
}

Span span = GlobalTracer.get().buildSpan(
name + "." + method.getName())
.start();
try (Scope ignored = GlobalTracer.get().activateSpan(span)) {
try (TracingUtil.TraceCloseable ignored = TracingUtil.createActivatedSpan(name + "." + method.getName())) {
try {
return delegateMethod.invoke(delegate, args);
} catch (Exception ex) {
Expand All @@ -79,8 +73,6 @@ public Object invoke(Object proxy, Method method, Object[] args)
} else {
throw ex;
}
} finally {
span.finish();
}
}
}
Expand Down
Loading