Skip to content

Commit

Permalink
Merge pull request #86 from NipunaMadhushan/main
Browse files Browse the repository at this point in the history
Remove returning error message when observer-context is null
  • Loading branch information
NipunaMadhushan authored Jan 18, 2024
2 parents 84bc26f + c5cf01b commit 8a83060
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "}")));
// This is a case where the user has not started the tracing.
// ObserverContext will be null if function is executed without entry point like main or resource
// function ex. initialising phase.
return null;
}
span = observer.getSpan();
} else {
Expand Down

0 comments on commit 8a83060

Please sign in to comment.