@Override
    public String toString() {
        return "TaskState{"
            + "taskId='" + taskId + '\''
            + "state='" + state() + '\''
            + ", traceMessage='" + traceMessage() + '\''
            + ", workerId='" + workerId() + '\''
            + '}';
    }
Provides the ID of the task.

@return the task ID
connect/api/src/main/java/org/apache/kafka/connect/health/TaskState.java