Class VaadinTelemetryContext
java.lang.Object
com.vaadin.observability.micrometer.VaadinTelemetryContext
Exposes the Vaadin view context of the request currently being handled on
this thread, so instrumentation living outside the Vaadin runtime (for
example a JDBC
DataSource proxy) can attribute its measurements to
the view that triggered them.
The route is the template resolved by RouteTagResolver during
navigation and is stored as a UI attribute that survives past the navigation
event (unlike the transient timing state in NavigationMetricsBinder).
Because Vaadin binds UI.getCurrent() to the request-handling thread,
code running on that thread can read it back here.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the route template of the view bound to the current thread, orMeterNames.ROUTE_UNKNOWNwhen there is no current UI or no navigation has been recorded yet.
-
Method Details
-
currentRoute
Returns the route template of the view bound to the current thread, orMeterNames.ROUTE_UNKNOWNwhen there is no current UI or no navigation has been recorded yet.- Returns:
- the current route tag value, never
null
-