When I was porting Mollom to drupal 8 I noticed that when I did a hook_form_alter, it wasn't showing the comment form ID as debug information. An important detail is that the page was viewed by an anonymous user.
mollom.module
function mollom_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
print_r($form_id);
Luckily the solution was quite easy: