Skip to content

Commit

Permalink
Remove metricsLogsProvider config
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaMadhushan committed Nov 22, 2024
1 parent d646d6e commit 320ab15
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions ballerina/commons.bal
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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.");
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 320ab15

Please sign in to comment.