Skip to content

Commit d481d33

Browse files
committed
fix(observability): ensure rpc.method is not populated for HTTP/JSON
1 parent 6c5362d commit d481d33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Map<String, Object> getMetricsAttributes() {
232232
if (!Strings.isNullOrEmpty(rpcSystemName())) {
233233
attributes.put(ObservabilityAttributes.RPC_SYSTEM_NAME_ATTRIBUTE, rpcSystemName());
234234
}
235-
if (!Strings.isNullOrEmpty(fullMethodName())) {
235+
if (transport() == Transport.GRPC && !Strings.isNullOrEmpty(fullMethodName())) {
236236
attributes.put(ObservabilityAttributes.GRPC_RPC_METHOD_ATTRIBUTE, fullMethodName());
237237
}
238238
if (!Strings.isNullOrEmpty(urlDomain())) {

0 commit comments

Comments
 (0)