You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "csemaan1A (via GitHub)" <gi...@apache.org> on 2024/09/11 16:09:54 UTC
[PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
csemaan1A opened a new pull request, #2062:
URL: https://github.com/apache/cxf/pull/2062
* Add missing span attributes to comply with [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/http/http-spans/)
* Test the span attribute names and values
* Couldn't add the attributes "network.protocol.version" for the client http span, because we didn't find a way to find its value.
BREAKING CHANGE: Client span name was renamed to the URL path instead of the full URL
Link to the Jira ticket: [CXF-9055 Follow OpenTelemetry semantic conventions for trace span and its attributes ](https://issues.apache.org/jira/browse/CXF-9055)
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757605088
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/jaxrs/OpenTelemetryProvider.java:
##########
@@ -52,10 +59,24 @@ public OpenTelemetryProvider(final OpenTelemetry openTelemetry, final Tracer tra
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final TraceScopeHolder<TraceScope> holder = super.startTraceSpan(requestContext.getHeaders(),
- requestContext.getUriInfo()
- .getRequestUri(),
+ requestContext.getUriInfo().getRequestUri(),
requestContext.getMethod());
+ Message message = ((ContainerRequestContextImpl)requestContext).getMessage();
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
Review Comment:
```suggestion
HttpServletRequest request = (HttpServletRequest)message.get(AbstractHTTPDestination.HTTP_REQUEST);
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757675638
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/jaxrs/OpenTelemetryProvider.java:
##########
@@ -52,10 +59,24 @@ public OpenTelemetryProvider(final OpenTelemetry openTelemetry, final Tracer tra
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final TraceScopeHolder<TraceScope> holder = super.startTraceSpan(requestContext.getHeaders(),
- requestContext.getUriInfo()
- .getRequestUri(),
+ requestContext.getUriInfo().getRequestUri(),
requestContext.getMethod());
+ Message message = ((ContainerRequestContextImpl)requestContext).getMessage();
Review Comment:
Or even better, this should also work:
```
@Context
private HttpServletRequest request ;
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "csemaan1A (via GitHub)" <gi...@apache.org>.
csemaan1A commented on PR #2062:
URL: https://github.com/apache/cxf/pull/2062#issuecomment-2345462416
> Thanks for the pull request, @csemaan1A ! I would suggest to preserve the span name (as you highlighted, it is breaking) to have consistent behavior across CXF tracing integrations, thank you.
I renamed it to have only the path to be aligned with [the semantic convention of OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/trace/api.md#span).
Keep in mind, that the server span name [is set to path](https://github.com/apache/cxf/blob/main/integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/AbstractOpenTelemetryProvider.java#L65), not the full URL.
So what do you think?
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on PR #2062:
URL: https://github.com/apache/cxf/pull/2062#issuecomment-2344330793
Thanks for the pull request, @csemaan1A ! I would suggest to preserve the span name (as you highlighted, it is breaking) to have consistent behavior across CXF tracing integrations, thank you.
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757604791
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/jaxrs/OpenTelemetryProvider.java:
##########
@@ -52,10 +59,24 @@ public OpenTelemetryProvider(final OpenTelemetry openTelemetry, final Tracer tra
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final TraceScopeHolder<TraceScope> holder = super.startTraceSpan(requestContext.getHeaders(),
- requestContext.getUriInfo()
- .getRequestUri(),
+ requestContext.getUriInfo().getRequestUri(),
requestContext.getMethod());
+ Message message = ((ContainerRequestContextImpl)requestContext).getMessage();
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
+ if (request != null) {
+ Span.current().setAttribute(ClientAttributes.CLIENT_ADDRESS, request.getRemoteAddr());
Review Comment:
Please use `holder.getScope().getSpan()`
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757601395
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryStartInterceptor.java:
##########
@@ -51,5 +56,19 @@ public void handleMessage(Message message) throws Fault {
if (holder != null) {
message.getExchange().put(TRACE_SPAN, holder);
}
+
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
+ if (request != null) {
+ Span.current().setAttribute(ClientAttributes.CLIENT_ADDRESS, request.getRemoteAddr());
+ Span.current().setAttribute(ClientAttributes.CLIENT_PORT, request.getRemotePort());
+ Span.current().setAttribute(NetworkAttributes.NETWORK_PEER_ADDRESS, request.getRemoteAddr());
+ Span.current().setAttribute(NetworkAttributes.NETWORK_PEER_PORT, request.getRemotePort());
+ String protocol = request.getProtocol();
+ if (protocol != null && protocol.contains("/")) {
+ String protocolVersion = protocol.split("/")[1];
+ Span.current().setAttribute(NetworkAttributes.NETWORK_PROTOCOL_VERSION, protocolVersion);
+ }
+ Span.current().setAttribute(UserAgentAttributes.USER_AGENT_ORIGINAL, request.getHeader("User-Agent"));
Review Comment:
Probably better to check if the `request.getHeader("User-Agent")` is not null?
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757599380
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryStartInterceptor.java:
##########
@@ -51,5 +56,19 @@ public void handleMessage(Message message) throws Fault {
if (holder != null) {
message.getExchange().put(TRACE_SPAN, holder);
}
+
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
+ if (request != null) {
+ Span.current().setAttribute(ClientAttributes.CLIENT_ADDRESS, request.getRemoteAddr());
Review Comment:
Please use `holder.getScope().getSpan()`, there is no need to use `Span.current()` - we know the exact span
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on PR #2062:
URL: https://github.com/apache/cxf/pull/2062#issuecomment-2350284922
Thanks a lot @csemaan1A !
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "csemaan1A (via GitHub)" <gi...@apache.org>.
csemaan1A commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1756788395
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryClientStartInterceptor.java:
##########
@@ -51,7 +51,7 @@ public OpenTelemetryClientStartInterceptor(final String phase, final OpenTelemet
@Override
public void handleMessage(Message message) throws Fault {
final Map<String, List<String>> headers = CastUtils
- .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
+ .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
Review Comment:
yea, will revert it
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757595471
##########
integration/tracing/tracing-opentelemetry/pom.xml:
##########
@@ -46,6 +46,10 @@
<artifactId>jakarta.xml.ws-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
Review Comment:
```suggestion
<optional>true</optional>
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757605088
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/jaxrs/OpenTelemetryProvider.java:
##########
@@ -52,10 +59,24 @@ public OpenTelemetryProvider(final OpenTelemetry openTelemetry, final Tracer tra
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final TraceScopeHolder<TraceScope> holder = super.startTraceSpan(requestContext.getHeaders(),
- requestContext.getUriInfo()
- .getRequestUri(),
+ requestContext.getUriInfo().getRequestUri(),
requestContext.getMethod());
+ Message message = ((ContainerRequestContextImpl)requestContext).getMessage();
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
Review Comment:
```suggestion
HttpServletRequest request = (HttpServletRequest)messageContext.get(AbstractHTTPDestination.HTTP_REQUEST);
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "csemaan1A (via GitHub)" <gi...@apache.org>.
csemaan1A commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1756788395
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryClientStartInterceptor.java:
##########
@@ -51,7 +51,7 @@ public OpenTelemetryClientStartInterceptor(final String phase, final OpenTelemet
@Override
public void handleMessage(Message message) throws Fault {
final Map<String, List<String>> headers = CastUtils
- .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
+ .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
Review Comment:
yea, will revert it
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "csemaan1A (via GitHub)" <gi...@apache.org>.
csemaan1A commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1756799707
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryClientStartInterceptor.java:
##########
@@ -51,7 +51,7 @@ public OpenTelemetryClientStartInterceptor(final String phase, final OpenTelemet
@Override
public void handleMessage(Message message) throws Fault {
final Map<String, List<String>> headers = CastUtils
- .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
+ .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
Review Comment:
yes, fixed
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on PR #2062:
URL: https://github.com/apache/cxf/pull/2062#issuecomment-2346086209
> I renamed it to have only the path to be aligned with [the semantic convention of OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/trace/api.md#span).
Thanks, I read the recommendations and I don't see much of controversy here. Yes, the it has more than path (too specific) but what is more important - we are not adding blanket implementation. I would prefer to not break things.
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta merged PR #2062:
URL: https://github.com/apache/cxf/pull/2062
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757598427
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryStartInterceptor.java:
##########
@@ -51,5 +56,19 @@ public void handleMessage(Message message) throws Fault {
if (holder != null) {
message.getExchange().put(TRACE_SPAN, holder);
}
+
+ HttpServletRequest request = (HttpServletRequest)message.getContextualProperty("HTTP.REQUEST");
Review Comment:
```suggestion
HttpServletRequest request = (HttpServletRequest)message.get(AbstractHTTPDestination.HTTP_REQUEST);
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1755249129
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/AbstractOpenTelemetryClientProvider.java:
##########
@@ -59,12 +62,15 @@ protected AbstractOpenTelemetryClientProvider(final OpenTelemetry openTelemetry,
protected TraceScopeHolder<TraceScope> startTraceSpan(final Map<String, List<String>> requestHeaders,
URI uri, String method) {
Context parentContext = Context.current();
- Span activeSpan = tracer.spanBuilder(buildSpanDescription(uri.toString(), method))
- .setParent(parentContext).setSpanKind(SpanKind.CLIENT)
- .setAttribute(HttpAttributes.HTTP_REQUEST_METHOD, method)
- .setAttribute(UrlAttributes.URL_FULL, uri.toString())
- // TODO: Enhance with semantics from request
- .startSpan();
+ Span activeSpan = tracer.spanBuilder(buildSpanDescription(uri.getPath(), method))
Review Comment:
Please preserve the span name, it is uniform across CXF tracing integrations:
```suggestion
Span activeSpan = tracer.spanBuilder(buildSpanDescription(uri.toString(), method))
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757604229
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/jaxrs/OpenTelemetryProvider.java:
##########
@@ -52,10 +59,24 @@ public OpenTelemetryProvider(final OpenTelemetry openTelemetry, final Tracer tra
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final TraceScopeHolder<TraceScope> holder = super.startTraceSpan(requestContext.getHeaders(),
- requestContext.getUriInfo()
- .getRequestUri(),
+ requestContext.getUriInfo().getRequestUri(),
requestContext.getMethod());
+ Message message = ((ContainerRequestContextImpl)requestContext).getMessage();
Review Comment:
Please replace with:
```
@Context
private MessageContext messageContext;
```
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1757600275
##########
integration/tracing/tracing-opentelemetry/pom.xml:
##########
@@ -46,6 +46,10 @@
<artifactId>jakarta.xml.ws-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
Review Comment:
(sorry weird diff, but could you please add optional, we don't want to bundle servlet-api with this module)
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "csemaan1A (via GitHub)" <gi...@apache.org>.
csemaan1A commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1756800088
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/AbstractOpenTelemetryClientProvider.java:
##########
@@ -59,12 +62,15 @@ protected AbstractOpenTelemetryClientProvider(final OpenTelemetry openTelemetry,
protected TraceScopeHolder<TraceScope> startTraceSpan(final Map<String, List<String>> requestHeaders,
URI uri, String method) {
Context parentContext = Context.current();
- Span activeSpan = tracer.spanBuilder(buildSpanDescription(uri.toString(), method))
- .setParent(parentContext).setSpanKind(SpanKind.CLIENT)
- .setAttribute(HttpAttributes.HTTP_REQUEST_METHOD, method)
- .setAttribute(UrlAttributes.URL_FULL, uri.toString())
- // TODO: Enhance with semantics from request
- .startSpan();
+ Span activeSpan = tracer.spanBuilder(buildSpanDescription(uri.getPath(), method))
Review Comment:
reverted
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CXF-9055 Follow OpenTelemetry semconv for trace span and its attributes [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2062:
URL: https://github.com/apache/cxf/pull/2062#discussion_r1756786744
##########
integration/tracing/tracing-opentelemetry/src/main/java/org/apache/cxf/tracing/opentelemetry/OpenTelemetryClientStartInterceptor.java:
##########
@@ -51,7 +51,7 @@ public OpenTelemetryClientStartInterceptor(final String phase, final OpenTelemet
@Override
public void handleMessage(Message message) throws Fault {
final Map<String, List<String>> headers = CastUtils
- .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
+ .cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
Review Comment:
Accidental? :-)
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org