From 3b9b929c7d5ea73e5423588795e91b46b030fffb Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Fri, 22 Nov 2024 10:41:15 +0530 Subject: [PATCH] Remove metricsLogsProvider config --- ballerina/init.bal | 4 ++-- .../io/ballerina/stdlib/observe/internal/NativeFunctions.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ballerina/init.bal b/ballerina/init.bal index 937640a..bfd54f9 100644 --- a/ballerina/init.bal +++ b/ballerina/init.bal @@ -33,7 +33,7 @@ function init() { } if (observe:isMetricsLogsEnabled()) { - var err = externEnableMetricsLogging(observe:getMetricsLogsProvider()); + var err = externEnableMetricsLogging(); if (err is error) { externPrintError("failed to enable tracing"); } @@ -50,7 +50,7 @@ function externEnableTracing(string provider) returns error? = @java:Method { name: "enableTracing" } external; -function externEnableMetricsLogging(string provider) returns error? = @java:Method { +function externEnableMetricsLogging() returns error? = @java:Method { 'class: "io.ballerina.stdlib.observe.internal.NativeFunctions", name: "enableMetricsLogging" } external; diff --git a/native/src/main/java/io/ballerina/stdlib/observe/internal/NativeFunctions.java b/native/src/main/java/io/ballerina/stdlib/observe/internal/NativeFunctions.java index 9876184..bb5f27b 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/internal/NativeFunctions.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/internal/NativeFunctions.java @@ -96,7 +96,7 @@ public static BError enableTracing(BString providerName) { } } - public static BError enableMetricsLogging(Environment env, BString providerName) { + public static BError enableMetricsLogging(Environment env) { try { ObserveUtils.addObserver(new BallerinaMetricsLogsObserver(env)); return null;