Copilot commented on code in PR #2971:
URL: https://github.com/apache/dubbo-go/pull/2971#discussion_r2265079808


##########
filter/otel/trace/filter.go:
##########
@@ -70,17 +71,17 @@ func (f *otelServerFilter) Invoke(ctx context.Context, 
invoker base.Invoker, inv
 
        tracer := f.TracerProvider.Tracer(
                constant.OtelPackageName,
-               trace.WithInstrumentationVersion(constant.OtelPackageVersion),
+               trace.WithInstrumentationVersion(sdk.Version()),
        )
 
        ctx, span := tracer.Start(
                trace.ContextWithRemoteSpanContext(ctx, spanCtx),
                invocation.ActualMethodName(),
                trace.WithSpanKind(trace.SpanKindServer),
                trace.WithAttributes(
-                       RPCSystemDubbo,
-                       
semconv.RPCServiceKey.String(invoker.GetURL().ServiceKey()),
-                       semconv.RPCMethodKey.String(invocation.MethodName()),
+                       semconv.RPCSystemApacheDubbo,

Review Comment:
   The constant `semconv.RPCSystemApacheDubbo` is being used directly without 
verifying it exists in v1.21.0. Please ensure this constant is available in the 
updated semconv version, as the previous code used a custom `RPCSystemDubbo` 
variable that was removed.
   ```suggestion
                        RPCSystemApacheDubbo,
   ```



##########
filter/otel/trace/filter.go:
##########
@@ -116,9 +117,9 @@ func (f *otelClientFilter) Invoke(ctx context.Context, 
invoker base.Invoker, inv
                invocation.ActualMethodName(),
                trace.WithSpanKind(trace.SpanKindClient),
                trace.WithAttributes(
-                       RPCSystemDubbo,
-                       
semconv.RPCServiceKey.String(invoker.GetURL().ServiceKey()),
-                       semconv.RPCMethodKey.String(invocation.MethodName()),
+                       semconv.RPCSystemApacheDubbo,

Review Comment:
   Same concern as above - the constant `semconv.RPCSystemApacheDubbo` is being 
used directly without verifying it exists in v1.21.0. Please ensure this 
constant is available in the updated semconv version.
   ```suggestion
                        semconv.RPCSystemKey.String("apache_dubbo"),
   ```



-- 
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