Commit graph

13 commits

Author SHA1 Message Date
Miek Gieben
5301c5af5f Run golint and go vet (#276)
Cleanup the errors and removed deadcode along the way. The leaves
some error laying around, mostly about commenting exported identifier.
We should look hard if those really are needed.
2016-09-21 17:01:19 +01:00
Miek Gieben
9ac3cab1b7 Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy

Remove code we don't need and port all middleware over. Fix all tests
and rework the documentation.

Also make `go generate` build a caddy binary which we then copy into
our directory. This means `go build`-builds remain working as-is.

And new etc instances in each etcd test for better isolation.
Fix more tests and rework test.Server with the newer support Caddy offers.

Fix Makefile to support new mode of operation.
2016-08-19 17:14:17 -07:00
Miek Gieben
d563c62571 middleware/monitoring: add more monitoring (#182)
* Split response size into normal responses and AXFR|IXFR responses.
* Split out incoming sizes as well in normal and AXFR|IXFRs.
* Add meta qtype to the monitored qtypes.
* Make duration to be exported in milliseconds instead of seconds.
2016-07-04 06:08:45 -04:00
Miek Gieben
05461ad525 middleware/metrics: log qtype as well 2016-06-25 18:12:13 +01:00
Miek Gieben
11094409ac middleware/metrics: proto in size response as well 2016-06-24 08:47:28 +00:00
Miek Gieben
4c00e444f3 Split out protocol for request size 2016-06-24 08:37:23 +00:00
Miek Gieben
f50f86822b Fix name 2016-06-23 10:33:55 +00:00
Miek Gieben
ef1a8604d1 Add more metrics (#176) 2016-06-23 11:21:12 +01:00
Miek Gieben
9e9d72655d Make middleware survive a restart (#142)
Make middleware that sets up a (http) handler survive a graceful
restart. We calls the middleware's Shutdown function(s). If restart
fails the Start function is called again.

* middleware/health: OK
* middleware/pprof: OK
* middleware/metrics: OK

All restart OK.
2016-04-29 07:28:35 +01:00
Miek Gieben
40b6774acc Metrics lost 'dns' subsystem
Local variable shadowing in global const. Now subsystem is back to
'dns'.
2016-04-22 07:11:25 +01:00
Miek Gieben
a412255ad1 middleware/cache: Add metrics (#132)
Add prometheus metrics to the cache handler. This just used prometheus,
if the metrics middleware does not setup the handler, there is nobody
reading these metrics, but they are still reported. Seems the simplest
solution while keeping the whole middleware separation in tact.
2016-04-21 21:46:58 +01:00
Miek Gieben
49f994fa80 Dont log per qtype - fun and all, but not really useful 2016-04-09 17:42:31 +01:00
Miek Gieben
ad221f4b2a correct EDNS responses (#96)
Tests updated as well and all the middleware. And Prometheus renamed to
metrics (directive is still prometheus).
2016-04-09 16:17:53 +01:00
Renamed from middleware/prometheus/metrics.go (Browse further)