xxgreg / dart_postgresql

Dart Postgresql database library.
BSD 2-Clause "Simplified" License
85 stars 29 forks source link

Implement metrics logging from Hikari #48

Open xxgreg opened 9 years ago

xxgreg commented 9 years ago

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

xxgreg commented 9 years ago

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

xxgreg commented 9 years ago

Also log metrics to observatory:

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

pisabev commented 9 years ago

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

xxgreg commented 9 years ago

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 commented 9 years ago

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