From d449740fc5a472dd93c9197edb891e881f7f8b8d Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Thu, 31 Oct 2024 13:31:56 +0530 Subject: [PATCH 1/6] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 4 ++-- ballerina/Dependencies.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index e87e6f2..4e689c6 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "observe" -version = "1.3.0" +version = "1.4.0" distribution = "2201.10.0" export = ["observe", "observe.mockextension" ] @@ -9,7 +9,7 @@ export = ["observe", "observe.mockextension" ] graalvmCompatible = true [[platform.java17.dependency]] -path = "../native/build/libs/observe-native-1.3.0.jar" +path = "../native/build/libs/observe-native-1.4.0-SNAPSHOT.jar" groupId = "ballerina" artifactId = "observe" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index cb80600..a432a49 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -18,7 +18,7 @@ modules = [ [[package]] org = "ballerina" name = "observe" -version = "1.3.0" +version = "1.4.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] From 0f86c9010dcd319e2d03a4dc4c3ce6e1a853a7b1 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Thu, 31 Oct 2024 13:33:13 +0530 Subject: [PATCH 2/6] Add configuration of logs enabling --- ballerina/commons.bal | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ballerina/commons.bal b/ballerina/commons.bal index 8d31f18..ab799a6 100644 --- a/ballerina/commons.bal +++ b/ballerina/commons.bal @@ -23,6 +23,7 @@ configurable boolean metricsEnabled = false; configurable string metricsReporter = ""; configurable boolean tracingEnabled = false; configurable string tracingProvider = ""; +configurable boolean observabilityLogsEnabled = false; function init() returns error? { boolean isMissingMetricsReporter = ((enabled || metricsEnabled) && (provider == "" && metricsReporter == "")); diff --git a/gradle.properties b/gradle.properties index 7d94bff..dee7685 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=1.3.1-SNAPSHOT +version=1.4.0-SNAPSHOT ballerinaLangVersion=2201.10.0 githubSpotbugsVersion=5.0.14 githubJohnrengelmanShadowVersion=8.1.1 From 7a77d27ba6aac928fa2447a83552a5bbac420741 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Fri, 1 Nov 2024 14:03:32 +0530 Subject: [PATCH 3/6] Address review suggestions --- ballerina/commons.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/commons.bal b/ballerina/commons.bal index ab799a6..be73c21 100644 --- a/ballerina/commons.bal +++ b/ballerina/commons.bal @@ -23,7 +23,7 @@ configurable boolean metricsEnabled = false; configurable string metricsReporter = ""; configurable boolean tracingEnabled = false; configurable string tracingProvider = ""; -configurable boolean observabilityLogsEnabled = false; +configurable boolean metricsLogsEnabled = false; function init() returns error? { boolean isMissingMetricsReporter = ((enabled || metricsEnabled) && (provider == "" && metricsReporter == "")); From 81ec5813eff396550ea241d5d36196a4b1c5fb66 Mon Sep 17 00:00:00 2001 From: hindujaB Date: Wed, 13 Nov 2024 09:12:02 +0530 Subject: [PATCH 4/6] [Automated] Update the native jar versions --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index a432a49..f0b3778 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.10.0" +distribution-version = "2201.11.0-20241112-214900-6b80ab87" [[package]] org = "ballerina" From 00bd9fc2852117ea5aebe1240090320c78601c53 Mon Sep 17 00:00:00 2001 From: hindujaB Date: Wed, 13 Nov 2024 09:13:22 +0530 Subject: [PATCH 5/6] Migrate runtime APIs for java 21 --- gradle.properties | 2 +- .../io/ballerina/stdlib/observe/nativeimpl/GetAllMetrics.java | 2 +- .../io/ballerina/stdlib/observe/nativeimpl/GetSpanContext.java | 2 +- .../io/ballerina/stdlib/observe/nativeimpl/LookupMetric.java | 2 +- .../main/java/io/ballerina/stdlib/observe/nativeimpl/Utils.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2a905a5..65acb13 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ org.gradle.caching=true group=io.ballerina.stdlib version=1.4.0-SNAPSHOT -ballerinaLangVersion=2201.10.0-20241007-143200-6b69ca80 +ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87 githubSpotbugsVersion=6.0.18 githubJohnrengelmanShadowVersion=8.1.1 underCouchDownloadVersion=5.4.0 diff --git a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetAllMetrics.java b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetAllMetrics.java index 5cb09b0..0e775f6 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetAllMetrics.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetAllMetrics.java @@ -19,9 +19,9 @@ package io.ballerina.stdlib.observe.nativeimpl; import io.ballerina.runtime.api.Environment; -import io.ballerina.runtime.api.PredefinedTypes; import io.ballerina.runtime.api.creators.TypeCreator; import io.ballerina.runtime.api.creators.ValueCreator; +import io.ballerina.runtime.api.types.PredefinedTypes; import io.ballerina.runtime.api.utils.StringUtils; import io.ballerina.runtime.api.values.BArray; import io.ballerina.runtime.api.values.BMap; diff --git a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetSpanContext.java b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetSpanContext.java index 60410e2..86e9fd5 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetSpanContext.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/GetSpanContext.java @@ -19,9 +19,9 @@ package io.ballerina.stdlib.observe.nativeimpl; import io.ballerina.runtime.api.Environment; -import io.ballerina.runtime.api.PredefinedTypes; import io.ballerina.runtime.api.creators.TypeCreator; import io.ballerina.runtime.api.creators.ValueCreator; +import io.ballerina.runtime.api.types.PredefinedTypes; import io.ballerina.runtime.api.values.BMap; import io.ballerina.runtime.api.values.BString; import io.ballerina.runtime.observability.ObserveUtils; diff --git a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/LookupMetric.java b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/LookupMetric.java index 868fe84..b83d3f8 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/LookupMetric.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/LookupMetric.java @@ -19,9 +19,9 @@ package io.ballerina.stdlib.observe.nativeimpl; import io.ballerina.runtime.api.Environment; -import io.ballerina.runtime.api.PredefinedTypes; import io.ballerina.runtime.api.creators.TypeCreator; import io.ballerina.runtime.api.creators.ValueCreator; +import io.ballerina.runtime.api.types.PredefinedTypes; import io.ballerina.runtime.api.utils.StringUtils; import io.ballerina.runtime.api.values.BArray; import io.ballerina.runtime.api.values.BMap; diff --git a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/Utils.java b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/Utils.java index 4d08776..7f7f54c 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/Utils.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/Utils.java @@ -21,9 +21,9 @@ import io.ballerina.runtime.api.Environment; -import io.ballerina.runtime.api.PredefinedTypes; import io.ballerina.runtime.api.creators.TypeCreator; import io.ballerina.runtime.api.creators.ValueCreator; +import io.ballerina.runtime.api.types.PredefinedTypes; import io.ballerina.runtime.api.types.Type; import io.ballerina.runtime.api.utils.StringUtils; import io.ballerina.runtime.api.values.BArray; From e6a937b531056b67bfd008caa74f99dab5a0c412 Mon Sep 17 00:00:00 2001 From: hindujaB Date: Wed, 13 Nov 2024 09:13:40 +0530 Subject: [PATCH 6/6] Revert "[Automated] Update the native jar versions" This reverts commit 81ec5813eff396550ea241d5d36196a4b1c5fb66. --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index f0b3778..a432a49 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20241112-214900-6b80ab87" +distribution-version = "2201.10.0" [[package]] org = "ballerina"