From a03a29163f6b803b1bc5565f7b31e6b4386453a6 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Fri, 8 Nov 2024 10:34:33 +0530 Subject: [PATCH] Change protocol tag to grpc --- .../java/io/ballerina/stdlib/grpc/ServerConnectorListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/main/java/io/ballerina/stdlib/grpc/ServerConnectorListener.java b/native/src/main/java/io/ballerina/stdlib/grpc/ServerConnectorListener.java index 6092c992f..33cbcbe59 100644 --- a/native/src/main/java/io/ballerina/stdlib/grpc/ServerConnectorListener.java +++ b/native/src/main/java/io/ballerina/stdlib/grpc/ServerConnectorListener.java @@ -51,6 +51,7 @@ public class ServerConnectorListener implements HttpConnectorListener { private static final Logger log = LoggerFactory.getLogger(ServerConnectorListener.class); private static final String SERVER_CONNECTOR_GRPC = "grpc"; + private static final String GRPC_PROTOCOL = "grpc"; private final ServicesRegistry servicesRegistry; private Map messageSizeMap; @@ -151,7 +152,7 @@ private ObserverContext getObserverContext(String method, InboundMessage inbound observerContext.addProperty(PROPERTY_TRACE_PROPERTIES, httpHeaders); observerContext.addTag(TAG_KEY_HTTP_METHOD, (String) inboundMessage.getProperty(HttpConstants.HTTP_REQUEST_METHOD.getValue())); - observerContext.addTag(TAG_KEY_PROTOCOL, (String) inboundMessage.getProperty(HttpConstants.PROTOCOL)); + observerContext.addTag(TAG_KEY_PROTOCOL, GRPC_PROTOCOL); observerContext.addTag(TAG_KEY_HTTP_URL, inboundMessage.getPath()); return observerContext; }