[Bug]: Project fails when there are global variables declared with client invokes #41966
Labels
Reason/EngineeringMistake
The issue occurred due to a mistake made in the past.
Team/jBallerina
All the issues related to BIR, JVM backend code generation and runtime
Type/Bug
Description
When observability enabled and the project contains global variables declared (or init() functions) with client invokes, the following error occurs in the ballerina runtime.
The reason for error is that the spans are created only after declaring variables. Spans won't be created for init() functions as well.
Steps to Reproduce
Use the following sample.
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Runtime
Related issue(s) (optional)
https://github.com/wso2-enterprise/internal-support-ballerina/issues/556
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: