opencensus-go-exporter-stackdriver icon indicating copy to clipboard operation
opencensus-go-exporter-stackdriver copied to clipboard

Add an option `OnExport` to exporter

Open yegle opened this issue 3 years ago • 0 comments

NB: Before opening a feature request against this repo, consider whether the feature should/could be implemented in exporter libraries in other languages. If so, please open an issue on opencensus-specs first.

Please let me know if you are OK with this feature. I can send a PR to implement it.

Is your feature request related to a problem? Please describe. We use OnError to log a line when the exporter failed to export to Stackdriver. This way we can generate a log based alert when the error rate increases.

The problem with this approach is that each replica of our service is exporting and they all can spontaneously fail. If our service scales up, the error rate may naturally go up.

It would be great if we can have an OnExport option, so we can also log when the export succeeded. This way we can calculate an error ratio metric and alert on it.

Describe the solution you'd like An OnExport option to the Exporter, with a single error argument that could be nil indicating a successful export.

Describe alternatives you've considered None that I know of.

Additional context Add any other context or screenshots about the feature request here.

yegle avatar Dec 11 '20 17:12 yegle