8000 Add Auto-Instrumentation for distributed tracing in Flow UI · Issue #4283 · jmix-framework/jmix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add Auto-Instrumentation for distributed tracing in Flow UI #4283
@mariodavid

Description

@mariodavid

Problem Statement

Currently, Jmix does not provide out-of-the-box support for automatic span and trace instrumentation.

Since relying on Spring Boot and having already a dependency on Micrometer, Jmix could leverage Micrometer's Observation API to auto-instrument the Jmix Flow UI. While manual instrumentation is possible, it is not straightforward to annotate Jmix controllers with @Observed due to AOP limitations, as Jmix Views are not Spring beans, making Spring AOP not applicable. This means developers must manually handle tracing, making it difficult to track UI interactions, background tasks, and data loading operations efficiently. Additionally, tracing cannot be solved generically at the project level without overriding framework code. As a result, developers are forced to manually instrument each individual view, leading to inconsistent implementations and additional maintenance overhead. Instead, it would be preferable if Jmix itself handled these generic operations—such as data loading, action execution, and background task tracing—out of the box.

Vaadin has already implemented a similar feature, allowing automatic UI instrumentation (button clicks, controller method calls, actions), data loading, and background task operations (Vaadin Observability Kit). However, Vaadin's Solution is designed specifically for Vaadin applications and does not include Jmix-specific concepts such as actions, background tasks, or data context loading.

Additionally, Vaadin's observability solution is only available as a commercial offering, which limits accessibility for developers looking for an open-source alternative. The effectiveness of this approach can be seen in their Observability demo (YouTube Demo), where multiple spans are displayed for UI operations.

Proposed Solution

  • Introduce automatic tracing using Micrometer's Observation API, similar to how performance monitoring will be implemented in Issue #4246.
  • Ensure UI interactions (button clicks, controller method executions, actions) are automatically traced and appropriate spans are created.
  • Enable custom spans for data context loading operations.
  • Propagate trace information into background tasks execution.

Benefits

  • Improved visibility into application behavior without requiring manual instrumentation.
  • Aligns Jmix with Spring Boot's standard observability practices.
  • Ensures better debugging and performance optimization capabilities.
  • Offers an open-source alternative to Vaadin’s commercial-only observability feature.

References

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0