Bryan Boreham
13af359bcf
refactor: eliminate report.ReadBinary() in favour of MakeFromBinary()
...
The signature of MakeFromFile changed to return a pointer for
consistency.
2019-09-23 10:01:43 +00:00
Bryan Boreham
2bbd4a3f0d
refactor: remove MakeFromBytes() function which is almost the same as ReadBinary()
2019-09-17 10:55:44 +00:00
Bryan Boreham
89363f5dcf
Defer metrics registration until we need it
...
This avoids app-specific metrics appearing in the probe.
2019-07-04 14:24:22 +00:00
Bryan Boreham
3be8cf71dd
Add more Opentracing detail to the app ( #3383 )
...
* Pass Go context down to Renderers
This is useful for cancellation or tracing.
* Add tracing spans to app
Also log things like number of nodes in Map, total number of reports.
2018-10-26 11:21:33 +05:30
Marc Carré
2ba50b8b3d
Update golang.org/x/net/context to latest
...
```
$ gvt delete golang.org/x/net/context
$ gvt fetch golang.org/x/net/context
2018/07/23 18:03:49 Fetching: golang.org/x/net/context
$ git grep -l "golang.org/x/net/context" | grep -v vendor | xargs sed -i '' 's:golang.org/x/net/context:context:g'
$ git grep -l "context/ctxhttp" | grep -v vendor | xargs sed -i '' 's:context/ctxhttp:golang.org/x/net/context/ctxhttp:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
fixed a bunch of:
```
cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error
```
2018-07-23 20:10:18 +02:00
Marc Carré
d46c2266ce
Change Sirupsen/logrus to sirupsen/logrus
...
```
$ git grep -l Sirupsen | grep -v vendor | xargs sed -i '' 's:github.com/Sirupsen/logrus:github.com/sirupsen/logrus:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
2018-07-23 20:10:14 +02:00
Bryan Boreham
b085c80ef3
Decode via byte slice for memcache and file read
...
This is more efficient, since the decoder can read field names in-place.
It also appears to be absolutely faster.
2017-03-14 14:54:17 +00:00
Jonathan Lange
e8085b01b6
Use 'common' library
2016-12-07 11:22:38 +00:00
Tom Wilkie
21ee72a384
Add OpenTracing support to TimeRequestHistogram ( #2023 )
...
* Vendor open tracing
* Extend TimeRequestHistorgram to also emit opentracing spans.
* Update some of the labels
2016-11-22 14:43:15 +00:00
Tom Wilkie
32edfc9112
Don't reencode reports in the collector ( #1819 )
...
* Don't reencode reports in the collector
* Review feedback
* Fix comment
* Update alpine URLs so it will build
* Fix tests
2016-08-22 17:37:41 +01:00
Matthias Radestock
d6e5f0a154
allow more accurate reporting of memcache hit ratio
...
A lot of time could pass between recording the request count and hit
count pertaining to a particular report fetching batch, which skewed
calculations cache hit ratios.
Fix that by defering the request count recording to the end, which is
when we record the hit count.
2016-08-15 16:25:12 +01:00
Matthias Radestock
9cf178f130
fix MemcacheClient.FetchReports miss & leak on corrupt report
...
Problem: Decoding a corrupt report grows the 'missing' list. Since we
are waiting for 'len(keys)-len(missing)' decoder go-routines, this
results in waiting for fewer go-routines than we should. The surplus
go-routines leak and we ignore their reports. And since the keys of the
ignored reports are not included in 'missing', we won't attempt to fetch
them from S3 either. Oops.
Fix: calculate the number of go-routines once, at the beginning.
2016-08-15 10:44:29 +01:00
Jonathan Lange
a3648f0c89
Inline StoreBytes
2016-07-15 12:58:27 +01:00
Jonathan Lange
bbd75ddd24
Use memcache compression level from config
2016-07-15 11:24:37 +01:00
Jonathan Lange
1fd8a5fb88
Use StoreReport in main AWS routine
2016-07-15 11:24:37 +01:00
Jonathan Lange
270a55060f
Add StoreReport methods to stores
...
Not sure if we'll use them.
2016-07-15 11:24:36 +01:00
Jonathan Lange
60e14c1dc2
Plumb through an option for compression
2016-07-15 11:24:36 +01:00
Tom Wilkie
3173f6ad75
Use histograms over summaries
2016-07-12 11:15:57 +01:00
Jonathan Lange
49f2e4e40c
Count memcache requests even if they time out
2016-07-11 13:01:02 +01:00
Paul Bellamy
8cb1ecdf2c
Merge pull request #1642 from weaveworks/refactoring-timing
...
refactor some timing helpers into a common lib
2016-07-05 13:01:28 +01:00
Paul Bellamy
7736564337
refactor some timing helpers into a common lib
2016-07-05 12:29:00 +01:00
Jonathan Lange
31c88fd62b
Instrumentation that we might like to keep
2016-07-04 16:03:50 +01:00
Jonathan Lange
c1dab17fb3
Make expiration a Duration
2016-07-04 13:30:23 +01:00
Jonathan Lange
f7bdedc149
Config struct for memcache client
2016-07-04 13:25:45 +01:00
Jonathan Lange
96520d7a46
Fixes to memcache support ( #1628 )
...
* Fix errors discovered in dev
* Log an error rather than aborting when memcache doesn't resolve
* Initialize map correctly
* Review tweaks
2016-07-04 11:00:11 +01:00
Jonathan Lange
d984605de1
Write back to the in-process cache
2016-06-30 09:57:49 +01:00
Jonathan Lange
e2bda8f670
Move last memcache bits out of dynamo_collector
2016-06-30 09:55:03 +01:00
Julius Volz
4fa40e22b2
Rework Scope metrics according to Prometheus conventions. ( #1615 )
...
* Rework Scope metrics according to Prometheus conventions.
- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
hits and in separate metrics, since the most common query will be
"hits / total"
- track all times in seconds (base units), which has become the standard
recommendation
- other small changes
There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)
* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Jonathan Lange
47fcb52354
Optional memcached between probes and S3
...
If given settings for memcached, services will store & fetch reports
from memcache after checking their in-process cache but before fetching
from S3.
2016-06-22 18:40:50 +01:00