osv.dev icon indicating copy to clipboard operation
osv.dev copied to clipboard

Make all errors reported through error reporting dashboard.

Open oliverchang opened this issue 2 years ago • 6 comments

Currently, it looks like a lot of our error logs are not properly propagated to the GCP error logging dashboard.

oliverchang avatar Feb 20 '23 06:02 oliverchang

https://github.com/google/osv.dev/pull/1111 was merged. Is there more to do, or can this be closed?

jayvdb avatar Mar 19 '23 23:03 jayvdb

I'm not sure if #1111 captured "all" potential errors?

andrewpollock avatar Mar 20 '23 01:03 andrewpollock

#1111 only covered the Python worker, importer and exporter. Off the top of my head, what needs to be looked at:

  • Converters - alpine, cve, debian
  • The API backend
  • The frontend osv.dev website

michaelkedar avatar Mar 20 '23 02:03 michaelkedar

  • Converters - alpine, cve, debian

I think that all of this, being Go code and using https://github.com/google/osv.dev/blob/master/vulnfeeds/utility/logginghelpers.go should Do The Right Thing today. @another-rex, am I right?

andrewpollock avatar Mar 28 '23 03:03 andrewpollock

Yep, that's correct as far as I know.

Apart from Debian converters which is in python, and is just using normal print statements at the moment.

another-rex avatar Mar 28 '23 03:03 another-rex

The Go logging helper LGTM. Though if we were to add a LoggerWrapper.Errorf without a stack trace (that we want to show up on the Error Reporting dashboard) we'd need to do something like we have for the workers: https://github.com/google/osv.dev/blob/a2d45dae06d0de9acb9579d319da4e6d01eaf8f1/osv/logs.py#L38-L52

per https://cloud.google.com/error-reporting/docs/formatting-error-messages#log-text

michaelkedar avatar Mar 28 '23 04:03 michaelkedar