Commit Graph
44 Commits
Author SHA1 Message Date
Marc CARRE ed4e8aa374 Update import statements to use sirupsen/logrus.
Commands run:
```
$ 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
```
N.B.: following this commit, build fails with:
```
vendor/github.com/docker/docker/pkg/archive/archive.go:20:2: cannot find package "github.com/Sirupsen/logrus" in any of:
	/go/src/github.com/weaveworks/scope/vendor/github.com/Sirupsen/logrus (vendor tree)
	/usr/local/go/src/github.com/Sirupsen/logrus (from $GOROOT)
	/go/src/github.com/Sirupsen/logrus (from $GOPATH)
```
Resolution in subsequent commit.
2017-10-20 11:47:28 +01:00
Matthias RadestockandGitHub 3ab48bcdbe Merge pull request #2756 from weaveworks/2464-maximize-timeout
maximize report publishing timeout

Fixes #2464.
2017-07-26 11:41:48 +01:00
Matthias Radestock d8c747ef20 downgrade "Dropping report" log message to warning
It indicates degraded functionality, not catastrophe.
2017-07-25 21:29:18 +01:00
Matthias Radestock 935f6e6c20 maximize report publishing timeout
If the app really does take a long time to process reports, it is
better not to time out and send it more reports. However, we do want
to send at least one report per app.window, otherwise the scope UI
will go blank.

Fixes #2464 (as much as is practically possible)
2017-07-25 21:20:39 +01:00
Matthias Radestock a5a9180605 do not back off on timeouts when sending reports
...since doing so unnecessarily throttles report sending, to the point
where the app is receiving reports so infrequently that often it has
no data to show.

The timeout period itself is sufficient to prevent thrashing.

Fixes #2745.
2017-07-25 21:16:35 +01:00
Matthias Radestock 3c6ae972ab new full reports are more important than old and shortcut reports
so when there is backpressure in publishing reports, drop shortcut
reports in preference to full reports, and drop old full reports in
preference to new full reports.

Fixes #2738.
2017-07-24 22:19:27 +01:00
Matthias Radestock 9e6ecee37d optimisation: don't copy report stream unnecessarily
We don't need to copy from the reader when publishing to just one
destination.
2017-07-21 17:56:08 +01:00
Matthias Radestock c8f97878d2 re-target app clients when name resolution changes
Fixes #2578.
2017-06-09 12:30:26 +01:00
Matthias Radestock fb735b65c4 cosmetic: correct comment 2017-06-09 11:31:20 +01:00
Bryan BorehamandGitHub c944225475 Merge pull request #2437 from kinvolk/alban/gzip-compression-level-default
gzip: change compression level to the default
2017-04-18 10:45:38 +01:00
Alban Crequy a8af81fe20 gzip: change compression level to the default
We want the middle ground between a small compression size, a fast
compression time and a fast decompression time.

Tests suggest that the default compression level is better than the
maximum compression level: although the reports are 4% bigger and
decompress slower, they compress 33% faster.

See discussion on https://github.com/weaveworks/scope/issues/1457#issuecomment-293288682
2017-04-12 17:41:43 +02:00
Mike Lang 75314cb910 Reduce manually listing all topologies in a few places
Prefer WalkTopologies to apply a uniform action to every topology,
reducing need to make multiple changes and risk of errors if you forget one.
2017-04-07 12:57:42 -07:00
Jonathan Lange 1020fc5f85 Use test.Diff from common 2016-12-07 11:22:40 +00:00
Alfonso AcostaandMike Lang 9c7282231f Fix tests
Also, refactor some tests and MakeRegistry in api_topologies
2016-11-29 07:18:08 -08:00
Paul Bellamy 002770d394 use hashicorp/clean-http to get better http client defaults 2016-10-13 09:45:27 +01:00
Paul Bellamy 28213a00a4 Add timeouts to the probe http client 2016-10-12 17:20:47 +01:00
Tom WilkieandGitHub 2a00fd2d78 Allow user to specify URLs on the command line, and use that to allow per-target tokens. (#1901)
Also:
- Parse targets on startup and catch badly formed ones before Scope can start.
- If no port is specified, use default port for scheme; if no scheme is specificed, use 4040.
- Use username as probe token
2016-10-05 10:59:56 -07:00
Matthias Radestock 7480654aaf don't complain about closed websockets in pipe connections 2016-08-06 00:06:34 +01:00
Jonathan Lange 2bfd6d7eb7 Parametrize compression level 2016-07-15 11:24:36 +01:00
Alfonso Acosta 6175880725 Review feedback 2016-07-05 10:47:57 +00:00
Alfonso Acosta c0a672c02a Review feedback 2016-07-01 16:51:57 +00:00
Alfonso Acosta 6f1e52cd0d Allow disabling controls in probes 2016-07-01 15:06:06 +00:00
Alfonso Acosta d33358ec63 Review feedback 2016-06-27 16:59:42 +00:00
Alfonso Acosta cab948887d Print DNS errors 2016-06-23 10:44:43 +00:00
Jonathan Lange 13269e8110 Helper for reading & writing from binary 2016-06-17 15:24:33 +01:00
Alfonso Acosta e01b88b7d9 Review feedback 2016-06-13 15:54:40 +00:00
Alfonso Acosta 3542c6b2f8 probe: add timeout to publisher and cancel requests on Stop() 2016-06-13 15:18:44 +00:00
Alfonso Acosta a6f8b0a0c6 Add probe version header to probe requests 2016-06-08 13:49:21 +00:00
Tom Wilkie 310adc0d09 Fast start the dns resolution ticker to improve first report latency. 2016-05-16 11:19:57 +01:00
Paul Bellamy 16a5c738d9 Deployment and ReplicaSet views for k8s 2016-05-09 09:03:57 +01:00
Tom WilkieandTom Wilkie 9b8f8a6c83 Have probe query kube dns to find the app. 2016-05-05 15:19:44 +01:00
Tom Wilkie cb52acbc46 Add pod delete control
- Push shortcut reports when pods are created/deleted
- Buffer upto 2 reports instead of dropping them
2016-04-28 14:48:05 +01:00
Paul Bellamy 99c611f594 Fixing up tests for shape and sublabel moving to topologies 2016-04-20 15:46:26 +01:00
Tom Wilkie e7c5fc7016 Remove address topology 2016-03-08 13:23:30 +00:00
Tom Wilkie da33d9c106 Have the probe fill in the app id, not the app 2016-03-03 09:26:23 +00:00
Ilya Dmitrichenko b0d6078e38 Merge pull request #1038 from weaveworks/1013-use-tcp-for-weavedns
Use TCP for weave dns.
2016-02-26 11:00:39 +00:00
Paul Bellamy 35fe8864a1 Review Feedback 2016-02-25 16:34:35 +00:00
Tom Wilkie 592bf3fb43 Use TCP for weave dns. 2016-02-25 15:39:20 +00:00
Paul Bellamy cfc071471b Add ping/pong to websocket protocol 2016-02-24 17:16:35 +00:00
Alfonso Acosta 0d917b2d8b Use github.com/ugorji/go/codec/ for wiring messages
* New encoding format:
  * Msgpack reports between probe<->app (smaller representation, faster to
    encode/decode).
  * Still use JSON between app<->UI (try to avoid making javascript deal with
    mspack).

  The app still suports publishing reports in both gob and JSON, not braking
  backwards compatibility.

* Use compile-time generated marshallers/unmarshallers for higher performance. In
  order to be able to skip code-generation for certain types, I included
  https://github.com/2opremio/go-1/tree/master/codec/codecgen instead of
  upstream until https://github.com/ugorji/go/pull/139 is merged.

* Encode/decode intermediate types using github.com/ugorji/go/codec.Selfer
  for higher performance and reducing garbage collection (no temporary buffers).
2016-02-16 06:31:31 +00:00
Tom WilkieandPaul Bellamy d4e58b9e33 Decouple Scope lifecycle from Weave lifecycle
- Run the Weave integrations regardless of if weave is detected.
- Make everything backoff and not spam the logs.
- Add miekg dns to vendor.
- Have the app periodically register with weaveDNS, and the probe do lookups there.
- Decide what the local networks are at runtime, not once at startup.
- Correctly resolve app ids, fixes #825
2016-02-09 14:24:57 +00:00
Alfonso Acosta 3d94082b07 Add debug logging 2016-02-05 16:58:40 +00:00
Tom Wilkie 37c19a27e7 Send a few more reports to ensure some get through, remove double close. 2016-02-02 10:10:29 -08:00
Tom Wilkie ffa955a21b Split and move xfer package. 2016-01-06 14:01:39 +00:00