How to add tracing information to OpenLegacy LowCode API

Tracing information in Java APIs is essential during the development and debugging stages to understand how different parts of the application interact and identify issues early on. It helps developers track the flow of requests across components, making it easier to spot errors, performance bottlenecks, or unexpected behavior in the code. Tracing is especially valuable for debugging complex workflows or isolating specific issues during development. It should be applied selectively to areas under active development to avoid unnecessary overhead while providing detailed insights when troubleshooting.

OpenLegacy can provide the following tracing information spans:

  • formatter-serialize - The time it took to serialize the API request.
  • session-invoke - The time it took to call the RPC program and get it's response.
  • formatter-deserialize - The time it took to deserialize the RPC response.

How to apply tracing information

Go to the application.yml file(src/main/java/resources/application.yml) or set any other Spring Profile/Properties.

Add the following properties:

ol:
  tracing:
    tracerType: LOGS