Skip to content

Commit

Permalink
Move Opentracing to Helidon Tracing API (#7679)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Aleksandrov <[email protected]>
  • Loading branch information
dalexandrov authored Sep 27, 2023
1 parent 58a859e commit 4b3a6b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions integrations/common/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<artifactId>helidon-fault-tolerance</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
<groupId>io.helidon.tracing</groupId>
<artifactId>helidon-tracing</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,12 +33,12 @@
import io.helidon.common.reactive.Multi;
import io.helidon.common.reactive.Single;
import io.helidon.faulttolerance.FtHandler;
import io.helidon.tracing.SpanContext;
import io.helidon.webclient.WebClient;
import io.helidon.webclient.WebClientRequestBuilder;
import io.helidon.webclient.WebClientRequestHeaders;
import io.helidon.webclient.WebClientResponse;

import io.opentracing.SpanContext;
import jakarta.json.JsonBuilderFactory;
import jakarta.json.JsonObject;
import jakarta.json.JsonReaderFactory;
Expand Down Expand Up @@ -1013,7 +1013,7 @@ protected String requestId(ApiRequest<?> restRequest) {
return restRequest.requestId()
.or(() -> Contexts.context()
.flatMap(it -> it.get(SpanContext.class))
.map(SpanContext::toTraceId))
.map(SpanContext::traceId))
.orElseGet(UUID.randomUUID()::toString);
}

Expand Down
5 changes: 2 additions & 3 deletions integrations/common/rest/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,15 +27,14 @@
requires java.logging;
requires jakarta.json;

requires io.opentracing.api;

requires io.helidon.common.http;
requires io.helidon.common;
requires io.helidon.common.reactive;
requires io.helidon.faulttolerance;
requires io.helidon.config;
requires io.helidon.webclient;
requires io.helidon.media.jsonp;
requires io.helidon.tracing;

exports io.helidon.integrations.common.rest;
}

0 comments on commit 4b3a6b7

Please sign in to comment.