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 4c7862e commit 4132840
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public final class ObserveUtils {
private static final boolean tracingEnabled;
private static final BString tracingProvider;
private static final boolean metricsLogsEnabled;
private static final BString metricsLogsProvider;

static {
// TODO: Move config initialization to ballerina level once checking config key is possible at ballerina level
Expand All @@ -92,16 +91,13 @@ public final class ObserveUtils {
PredefinedTypes.TYPE_STRING, false);
VariableKey metricsLogsEnabledKey = new VariableKey(observeModule, "metricsLogsEnabled",
PredefinedTypes.TYPE_BOOLEAN, false);
VariableKey metricsLogsProviderKey = new VariableKey(observeModule, "metricsLogsProvider",
PredefinedTypes.TYPE_STRING, false);

metricsEnabled = readConfig(metricsEnabledKey, enabledKey, false);
metricsProvider = readConfig(metricsProviderKey, null, StringUtils.fromString("default"));
metricsReporter = readConfig(metricsReporterKey, providerKey, StringUtils.fromString("choreo"));
tracingEnabled = readConfig(tracingEnabledKey, enabledKey, false);
tracingProvider = readConfig(tracingProviderKey, providerKey, StringUtils.fromString("choreo"));
metricsLogsEnabled = readConfig(metricsLogsEnabledKey, enabledKey, false);
metricsLogsProvider = readConfig(metricsLogsProviderKey, providerKey, StringUtils.fromString("choreo"));
enabled = metricsEnabled || tracingEnabled || metricsLogsEnabled;
}

Expand Down Expand Up @@ -148,10 +144,6 @@ public static boolean isMetricsLogsEnabled() {
return metricsLogsEnabled;

Check warning on line 144 in bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/observability/ObserveUtils.java

View check run for this annotation

Codecov / codecov/patch

bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/observability/ObserveUtils.java#L144

Added line #L144 was not covered by tests
}

public static BString getMetricsLogsProvider() {
return metricsLogsProvider;
}

/**
* Add metrics and tracing observers.
*
Expand Down

0 comments on commit 4132840

Please sign in to comment.