title: How come Stackdriver messes up my error grouping
body: <p>In my experience the Stackdriver Error Reporting service groups unrelated errors together. This is a big problem for me on several levels:</p>
  
  <ul>
  <li>The titles often do not correlate to the reported errors in "recent samples". So I have to look at the samples for each error to see what errors really happend because the title really can't be trusted.</li>
  <li>I might set an error to "muted" and as a result other errors that are grouped under the same title don't get reported anymore. It might take me months to discover that certain errors have been happening that I wasn't aware of.</li>
  <li>In general I have no overview about what errors are happening in what rate.</li>
  </ul>
  
  <p>This all seems to violate basic functionality for an error reporting system, so I think I must be missing something.</p>
  
  <p>The code is running on Firebase Functions, so the Firebase flavour of Google Cloud Functions and is written in Typescript (compiled to Javascript with Firebase predeploy script). </p>
  
  <p>I log errors using <code>console.error</code> with arguments formatted as Error instances like <code>console.error(new Error('some error message'))</code>. AFAIK that is the correct way for code running on Node.js.</p>
  
  <p>Is there anything special I can do to make Stackdriver understand my code better?</p>
  
  <p>I have this in a root of my functions deployment:</p>
  
  <pre><code>import * as sourceMaps from "source-map-support";
  sourceMaps.install();
  </code></pre>
  
  <p>Below is a screenshot of one error category. You see that the error title is "The service is currently unavailable", yet the samples contain errors for "Request contains an invalid argument" and "This request was already locked..."</p>
  
  <p>The error about service and invalid argument could be related to the FCM service, so there is some correlation although I think these are very different errors.</p>
  
  <p>The error about request lock is really something completely unrelated. The word "request" in this context means something really different but the word is the only relationship I can see.</p>
  
  <p><a href="https://i.stack.imgur.com/tfddK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tfddK.png" alt="Screenshot of Stackdriver Error Reporting"></a></p>