Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protocol to observability tags #1456

8 changes: 4 additions & 4 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "websocket"
version = "2.12.0"
version = "2.12.1"
authors = ["Ballerina"]
keywords = ["ws", "network", "bi-directional", "streaming", "service", "client"]
repository = "https://github.com/ballerina-platform/module-ballerina-websocket"
Expand All @@ -15,8 +15,8 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "websocket-native"
version = "2.12.0"
path = "../native/build/libs/websocket-native-2.12.0.jar"
version = "2.12.1"
path = "../native/build/libs/websocket-native-2.12.1-SNAPSHOT.jar"

[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
Expand Down Expand Up @@ -85,5 +85,5 @@ version = "4.1.108.Final"
path = "./lib/netty-handler-proxy-4.1.108.Final.jar"

[[platform.java17.dependency]]
path = "../test-utils/build/libs/websocket-test-utils-2.12.0.jar"
path = "../test-utils/build/libs/websocket-test-utils-2.12.1-SNAPSHOT.jar"
scope = "testOnly"
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "websocket-compiler-plugin"
class = "io.ballerina.stdlib.websocket.plugin.WebSocketCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/websocket-compiler-plugin-2.12.0.jar"
path = "../compiler-plugin/build/libs/websocket-compiler-plugin-2.12.1-SNAPSHOT.jar"
8 changes: 4 additions & 4 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.10.0"
distribution-version = "2201.10.2"

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -67,7 +67,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.0"
version = "2.12.2"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -246,7 +246,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.10.0"
version = "2.10.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -332,7 +332,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "websocket"
version = "2.12.0"
version = "2.12.1"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "constraint"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

public class WebSocketObserverContext extends ObserverContext {

private static final String PROTOCOL = "ws";
private String connectionId = WebSocketObservabilityConstants.UNKNOWN;
private String servicePathOrClientUrl = WebSocketObservabilityConstants.UNKNOWN;

Expand All @@ -54,6 +55,7 @@ public void setTags(WebSocketConnectionInfo connectionInfo) {
String clientOrServerContext = WebSocketObservabilityUtil.getClientOrServerContext(connectionInfo);
addTag(WebSocketObservabilityConstants.TAG_CONTEXT, clientOrServerContext);
addTag(WebSocketObservabilityConstants.TAG_SERVICE, servicePathOrClientUrl);
addTag(ObservabilityConstants.TAG_KEY_PROTOCOL, PROTOCOL);
}

String getConnectionId() {
Expand Down
Loading