Alanxtl commented on code in PR #3551:
URL: https://github.com/apache/dubbo-go/pull/3551#discussion_r3656158776
##########
filter/otel/trace/semconv.go:
##########
@@ -29,3 +29,23 @@ var (
RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
)
+
+// These describe information that has no OpenTelemetry semantic-convention
+// equivalent, so they live under a stable "dubbo.*" namespace.
+var (
+ // DubboSideKey records the invocation side: "consumer" or "provider".
+ DubboSideKey = attribute.Key("dubbo.side")
+ // DubboProtocolKey records the Dubbo protocol in use, e.g. "dubbo",
"tri".
+ DubboProtocolKey = attribute.Key("dubbo.protocol")
+ // DubboGroupKey records the Dubbo service group.
+ DubboGroupKey = attribute.Key("dubbo.group")
+ // DubboVersionKey records the Dubbo service version.
+ DubboVersionKey = attribute.Key("dubbo.version")
Review Comment:
dubbo.side这些常量可以移到common/const里面
##########
filter/otel/trace/semconv.go:
##########
@@ -29,3 +29,23 @@ var (
RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
)
+
+// These describe information that has no OpenTelemetry semantic-convention
+// equivalent, so they live under a stable "dubbo.*" namespace.
+var (
+ // DubboSideKey records the invocation side: "consumer" or "provider".
+ DubboSideKey = attribute.Key("dubbo.side")
+ // DubboProtocolKey records the Dubbo protocol in use, e.g. "dubbo",
"tri".
+ DubboProtocolKey = attribute.Key("dubbo.protocol")
+ // DubboGroupKey records the Dubbo service group.
+ DubboGroupKey = attribute.Key("dubbo.group")
+ // DubboVersionKey records the Dubbo service version.
+ DubboVersionKey = attribute.Key("dubbo.version")
+)
+
+const (
+ // sideConsumer / sideProvider are the values used for DubboSideKey and
the
+ // span-name prefix ("dubbo.consumer" / "dubbo.provider").
+ sideConsumer = "consumer"
+ sideProvider = "provider"
+)
Review Comment:
ditto
--
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]