From d0e6be3fd6196525ca179b2302653270dacf1071 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Tue, 16 Jan 2024 15:27:19 +0530 Subject: [PATCH] Remove returning err msg when observer-context is null --- .../observe/nativeimpl/OpenTracerBallerinaWrapper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/OpenTracerBallerinaWrapper.java b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/OpenTracerBallerinaWrapper.java index 6101a8a..0ce6ff3 100644 --- a/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/OpenTracerBallerinaWrapper.java +++ b/native/src/main/java/io/ballerina/stdlib/observe/nativeimpl/OpenTracerBallerinaWrapper.java @@ -184,9 +184,10 @@ public Object addTag(Environment env, String tagKey, String tagValue, long spanI if (spanId == -1) { ObserverContext observer = ObserveUtils.getObserverContextOfCurrentFrame(env); if (observer == null) { - return ErrorCreator.createError( - StringUtils.fromString( - ("Span already finished. Can not add tag {" + tagKey + ":" + tagValue + "}"))); + return null; +// return ErrorCreator.createError( +// StringUtils.fromString( +// ("Span already finished. Can not add tag {" + tagKey + ":" + tagValue + "}"))); } span = observer.getSpan(); } else {