If the lag detector's logger is set to `DEBUG` then the master will capture the hot threads on the lagging node and report them in its logs. However it's quite possible for this log message to be many kB in size, and log messages are apparently truncated at 10kB by default.

We should find another way to report this information to avoid hitting this size limit. Perhaps simply split the hot threads output up across multiple log messages, or perhaps find a different way to report it.
server/src/main/java/org/elasticsearch/cluster/coordination/LagDetector.java
return;
            }
            long appliedVersion = this.appliedVersion.get();
            if (version <= appliedVersion) {
                logger.trace("{} satisfied when checking version {}, node applied version {}", this, version, appliedVersion);
                return;
            }
            logger.warn(
                "node [{}] is lagging at cluster state version [{}], although publication of cluster state version [{}] completed [{}] ago",
                discoveryNode,
                appliedVersion,
                version,
                clusterStateApplicationTimeout
            );
            lagListener.onLagDetected(discoveryNode, appliedVersion, version);
        }
    }
    public interface LagListener {
        /**
         * Called when a node is detected as lagging and should be removed from the cluster.
         * @param discoveryNode the node that is lagging.
         * @param appliedVersion the cluster state version that the node has definitely applied
         * @param expectedVersion the cluster state version that we were waiting for the node to apply
         */
        void onLagDetected(DiscoveryNode discoveryNode, long appliedVersion, long expectedVersion);
    }
    /**
     * Wraps around another {@link LagListener} and logs the hot threads on the lagging node at debug level.
     */
    static class HotThreadsLoggingLagListener implements LagListener {