Skip to content

Commit

Permalink
Define metric log function name
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaMadhushan committed Nov 21, 2024
1 parent 8a09df4 commit 4b31746
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

public class BallerinaMetricsLogsObserver implements BallerinaObserver {
private static final String ORG_NAME = "ballerinax";
private static final String METRIC_LOG_FUNCTION_NAME = "printMetricsLog";
private static final String PROPERTY_START_TIME = "_observation_start_time_";
private static final PrintStream consoleError = System.err;

Expand Down Expand Up @@ -121,6 +122,6 @@ private void handleError(String metricName, Set<Tag> tags, RuntimeException e) {
private static void printMetricLog(BMap<BString, Object> logAttributes) {
// TODO: Remove version when the API is finalized, and add the configured org name.
Module metricsLogsModule = new Module(ORG_NAME, ObserveUtils.getMetricsLogsProvider().getValue(), "1");
environment.getRuntime().callFunction(metricsLogsModule, "printMetricsLog", null, logAttributes);
environment.getRuntime().callFunction(metricsLogsModule, METRIC_LOG_FUNCTION_NAME, null, logAttributes);
}
}

0 comments on commit 4b31746

Please sign in to comment.