Keep telemetry context for green mode clients

Previously, calls made with non-synchronous green mode clients (DeviceProxy, AttributeProxy) would lose the telemetry context, and showup as being called from the event loop thread pool executor. This was not useful when viewing traces, as the original source of the call is lost.

Now, we get the context before delegating the function to the green mode executor. Then later, when the call is actually run, we can re-establish the context.

The creation of clients using get_attribute_proxy and get_device_proxy is now also traced.

Also fixed an issue when callable classes are used, e.g., for the "is allowed" check. These object don't have a __code__ attribute, so the access was failing. Now we do it in a safer way.

Bonus: add a few more logger names for log filtering.

Edited by Anton Joubert

Merge request reports

Loading