dart_postgresql icon indicating copy to clipboard operation
dart_postgresql copied to clipboard

Implement metrics logging from Hikari

Open xxgreg opened this issue 10 years ago • 5 comments

https://github.com/brettwooldridge/HikariCP/wiki/Codahale-Metrics

xxgreg avatar Nov 11 '14 22:11 xxgreg

https://dropwizard.github.io/metrics/ http://graphite.readthedocs.org/en/latest/overview.html

xxgreg avatar Nov 11 '14 22:11 xxgreg

Also log metrics to observatory:

https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/dart:profiler https://www.dartlang.org/tools/observatory/tags.html

xxgreg avatar Nov 11 '14 22:11 xxgreg

If I get it clear we have this "MetricRegistry" and everything is logged there(nothing to the console), and we fetch it on demand ?

pisabev avatar Nov 11 '14 22:11 pisabev

Not sure yet. This is ticket is a note to self for me to do some research.

Perhaps I will do something like this:

Adding this to pool:

 Stream<Metric> metrics;

class Metric {
  String name;
  num value;
  DateTime time;
}

Another library can then be used to push these metrics into collectd, graphite or observatory. Standard system monitory tools can then be used to view realtime graphs, and set up alert emails/sms if connection times reach some threshold.

xxgreg avatar Nov 11 '14 22:11 xxgreg

https://github.com/a14n/dart-metrics

xxgreg avatar Dec 17 '14 21:12 xxgreg