def submit()

in src/frontend/traced_thread_pool_executor.py [0:0]


    def submit(self, function, *args, **kwargs):
        """Submit a new task to the thread pool."""

        # get the current otel context
        context = otel_context.get_current()
        if context:
            return super().submit(
                lambda: self.with_otel_context(
                    context, lambda: function(*args, **kwargs)
                ),
            )

        return super().submit(lambda: function(*args, **kwargs))