From 320ab151dde0e04688b576bd963e4dca68c2af84 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Fri, 22 Nov 2024 10:04:28 +0530 Subject: [PATCH] Remove metricsLogsProvider config --- ballerina/commons.bal | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/ballerina/commons.bal b/ballerina/commons.bal index 9bfb302..5cbc5b7 100644 --- a/ballerina/commons.bal +++ b/ballerina/commons.bal @@ -24,13 +24,11 @@ configurable string metricsReporter = ""; configurable boolean tracingEnabled = false; configurable string tracingProvider = ""; configurable boolean metricsLogsEnabled = false; -configurable string metricsLogsProvider = ""; function init() returns error? { boolean isMissingMetricsReporter = ((enabled || metricsEnabled) && (provider == "" && metricsReporter == "")); boolean isMissingTracingProvider = ((enabled || tracingEnabled) && (provider == "" && tracingProvider == "")); - boolean isMissingMetricsLogsProvider = ((enabled || metricsLogsEnabled) && (provider == "" && metricsLogsProvider == "")); - if (isMissingMetricsReporter || isMissingTracingProvider || isMissingMetricsLogsProvider) { + if (isMissingMetricsReporter || isMissingTracingProvider) { string[] enabledObservers = []; string[] missingProviders = []; if (isMissingMetricsReporter) { @@ -41,10 +39,6 @@ function init() returns error? { enabledObservers.push("tracing"); missingProviders.push("tracing provider"); } - if (isMissingMetricsLogsProvider) { - enabledObservers.push("metrics logs"); - missingProviders.push("metrics logs provider"); - } return error("Observability (" + " and ".join(...enabledObservers) + ") enabled without " + " and ".join(...missingProviders) + ". Please visit https://central.ballerina.io/ballerina/observe for " + "the list of officially supported Observability providers."); @@ -81,13 +75,6 @@ public isolated function getMetricsProvider() returns string = @java:Method { 'class: "io.ballerina.runtime.observability.ObserveUtils" } external; -# Retrieve metrics logs provider. -# + return - metrics logs provider. -public isolated function getMetricsLogsProvider() returns string = @java:Method { - name: "getMetricsLogsProvider", - 'class: "io.ballerina.runtime.observability.ObserveUtils" -} external; - # Retrieve metrics reporter. # + return - metrics reporter. public isolated function getMetricsReporter() returns string = @java:Method {