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/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java
newNode.nodeSettings
            );
            cluster1.clusterNodes.replaceAll(cn -> cn == newNode ? detachedNode : cn);
            cluster1.stabilise();
        }
    }
    @TestLogging(
        reason = "test includes assertions about logging",
        value = "org.elasticsearch.cluster.coordination.Coordinator:WARN,org.elasticsearch.cluster.coordination.JoinHelper:INFO"
    )
    public void testReportsConnectBackProblemsDuringJoining() {
        try (var cluster = new Cluster(3)) {
            cluster.runRandomly();
            cluster.stabilise();
            final var partitionedNode = cluster.getAnyNode();
            partitionedNode.disconnect();
            cluster.stabilise();
            logger.info("--> healing [{}] but blocking handshakes", partitionedNode);
            partitionedNode.heal();
            final var leader = cluster.getAnyLeader();
            leader.addActionBlock(TransportService.HANDSHAKE_ACTION_NAME);
            final var mockAppender = new MockLogAppender();
            mockAppender.addExpectation(
                new MockLogAppender.SeenEventExpectation(
                    "connect-back failure",
                    Coordinator.class.getCanonicalName(),
                    Level.WARN,
                    "*received join request from ["
                        + partitionedNode.getLocalNode().descriptionWithoutAttributes()
                        + "] but could not connect back to the joining node"