Commit Graph

81 Commits

Author SHA1 Message Date
Filip Barl
b6dfe25499 Time travel control (#2524)
* Hacky working prototype.

* Operate with time.Duration offset instead of fixed timestamp.

* Polished the backend code.

* Made a nicer UI component.

* Small refactorings of the websockets code.

* Fixed the backend tests.

* Better websocketing and smoother transitions

* Small styling refactoring.

* Detecting empty topologies.

* Improved error messaging.

* Addressed some of David's comments.

* Moved nodesDeltaBuffer to a global state to fix the paused status rendering bug.

* Small styling changes

* Changed the websocket global state variables a bit.

* Polishing & refactoring.

* More polishing.

* Final refactoring.

* Addressed a couple of bugs.

* Hidden the timeline control behind Cloud context and a feature flag.

* Addressed most of @davkal's comments.

* Added mixpanel tracking.
2017-06-12 11:22:17 +02:00
Alfonso Acosta
6be7aa8be2 Add app capabilities to /api endpoint 2017-06-08 11:02:25 +00: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
Lorenzo Manacorda
2a682dd7b0 Fix linter error for strings in context.WithValue 2016-10-13 14:28:30 +02: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
Paul Bellamy
274158493d Name our routes, so /metrics gives more sensible aggregations 2016-07-26 12:49:04 +01:00
Jonathan Lange
40cbf119d3 Nice error on unsupported content type 2016-06-22 10:02:18 +01:00
Jonathan Lange
ce5c933d3c Remove unused import 2016-06-21 11:14:14 +01:00
Jonathan Lange
8bd8f883a1 Restore debugging logic 2016-06-21 11:08:55 +01:00
Jonathan Lange
81b05a33ee Make ReadBinary more general and re-use in router 2016-06-20 18:02:23 +01:00
Tom Wilkie
141ce75902 Log errors in response to http requests. (#1569) 2016-06-09 09:01:50 +01:00
Tom Wilkie
12f281654d Put reports in S3; add in process caching (#1545)
* Add in-process caching to dynamodb collector

* Add metrics for dynamodb consumed capacity and report size

* Log and return errors during report collection

* Increase compression to the max

* Put reports in S3 and just use DynamoDB as an index.

* Review feedback
2016-05-31 15:40:15 +01:00
Tom Wilkie
334701f92e Add a missing return. 2016-05-20 19:17:15 +01:00
Alfonso Acosta
3cf3c713ae Meassure report sizes 2016-05-10 09:45:29 +00:00
Paul Bellamy
0e70f70ffd Review feedback 2016-05-03 12:49:02 +01:00
Paul Bellamy
2af2b1f15a Filter by Kubernetes Namespaces 2016-05-03 12:47:24 +01:00
Paul Bellamy
3d3aed2bb3 Fixing grouped node count for filtered children nodes
Squash of:

* We have to keep all the container hostnames until the end so we can
  count how many we've filtered

* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
  filters

* Because we filter on image name we need the image name before
  filtering

* Alternative approach to passing decorators.

* Refactor out some of the decorator capture

* Don't memoise decorated calls to Render

* Fixing filtered counts on containers topology

  Tricky, because we need the filters to be silent sometimes (when they're
  in the middle), but not when they're at the top, so we take the "top"
  filter's stats. However, this means we have to compose all
  user-specified filters into a single Filter layer, so we can get all
  stats.

  There are no more Silent filters, as all filters are silent (unless they
  are at the top).

  Additionally, I clarified some of the filters as their usage/terminology
  was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
  where IsFoo is true.
2016-04-28 12:23:43 +01:00
Tom Wilkie
901f46c5fc Report if newer version are availible in /api (#1366)
* Report if newer version are availible in /api

* Render version update hint in UI, next to version

* Fix lint
2016-04-22 10:25:00 +01:00
Paul Bellamy
f211d48cda Merge pull request #1126 from weaveworks/plugins
Plugins
2016-04-12 18:03:26 +01:00
Paul Bellamy
7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
Tom Wilkie
281ba58845 Add /api/probes endpoint 2016-04-12 17:17:18 +01:00
Tom Wilkie
734a01d603 Review feedback, lint & fix tests. 2016-04-06 15:59:02 +01:00
Tom Wilkie
fd368e5e5f Unhack dealing with slashed in node names. 2016-04-06 14:47:14 +01:00
Tom Wilkie
4f6066f0ff Stop hiding kubernetes topologies in the backend. 2016-03-23 12:43:47 +00:00
Tom Wilkie
f154e7a483 Add connection tables to details panel 2016-03-03 16:17:55 +00:00
Tom Wilkie
5f7f74bf1b Refactor app for multitenancy
- Add interfaces to allow for alternative implementations for Collector, ControlRouter
  and PipeRouter.
- Pass contexts on http handlers to these interfaces.  Although not used by the current
  (local, in-memory) implementations, the idea is this will be used to pass headers to
  implementations which support multitenancy (by, for instance, putting an authenticating
  reverse proxy in form of the app, and then inspecting the headers of the request for
  a used id).
2016-02-22 14:54:04 +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 Wilkie
b102a977b8 Loop in the http.DefaultServeMux for pprof. 2016-01-16 13:38:00 -08:00
Tom Wilkie
123c40028f Less hacky fix for /%2F bug 2016-01-14 07:10:31 -08:00
Tom Wilkie
ffa955a21b Split and move xfer package. 2016-01-06 14:01:39 +00:00
Paul Bellamy
a13042aafe [app] remove unused edge endpoint 2015-12-07 15:33:59 +00:00
Tom Wilkie
c317cff86e App: Rename package main->app, put main.go in prog/app 2015-12-07 14:53:28 +00:00
Tom Wilkie
f1d225c836 Add hostname to /api 2015-12-04 15:33:12 +01:00
Paul Bellamy
68cff926be Add json support to app POST /api/report
This way you can save reports from /app/report, then use curl to post it
to the app later for testing.
2015-12-03 11:39:37 +00:00
Tom Wilkie
f5aafb7a05 Don't apply filters to node endpoints & update details panel logic such that node which dissappear from the topology (eg when they are stopped) don't dissapear from the details panel. 2015-11-30 09:33:41 +00:00
Tom Wilkie
39b66300a6 Merge pull request #598 from weaveworks/315-capabilities
Add controls form container start, stop, pause, etc
2015-11-06 18:22:05 +00:00
Tom Wilkie
76d34330a9 Add Control plumbing. 2015-11-06 17:39:48 +00:00
Paul Bellamy
9877a2126a removing unused /api/origin/host/{id} route 2015-11-06 16:20:00 +00:00
Paul Bellamy
9ea156cfef Moving xfer.Collector into App (the only place its used) 2015-11-05 11:31:48 +00:00
Tom Wilkie
c6604a6c9b Don't keep stacking filters onto renderers; instead, ensure we return a fresh renderer each time. 2015-10-29 11:35:18 +00:00
Tom Wilkie
c9d0418c9f Review feedback 2015-10-19 14:09:53 +00:00
Tom Wilkie
305e1f482c Refactor topology registry etc; merge a bunch of redundant types. 2015-10-19 10:33:39 +00:00
Tom Wilkie
258e2c153d Sort the structs returned by /api/topology 2015-10-19 10:33:35 +00:00
Tom Wilkie
de6742db11 Add containers by hostname view. 2015-10-09 10:52:12 +00:00
Paul Bellamy
be1d1d52d0 Basic Kubernetes integration
* Added helper for installing scope on gcloud
* Added topologies Pods and Pods-by-Service
* Uses k8s.io/kubernetes/pkg/client/cache for the client
* Filter kube-system nodes by default
* Only show the k8s topologies if we've received a non-empty k8s report
2015-10-06 12:55:51 +01:00
Peter Bourgon
81aa92d13b Show why some nodes are filtered in applications view 2015-10-01 15:57:04 +02:00
Tom Wilkie
5c0555ae39 Report number of filtered nodes in topology stats.
Include filtered psuedo nodes in stats.
2015-09-29 08:51:38 +00:00
Peter Bourgon
822c09370e app: show unique ID in /api 2015-09-24 16:11:54 +02:00
David Kaltschmidt
dfdf93c440 Changed topo option labels to show current state 2015-09-15 15:03:18 +02:00
Tom Wilkie
e303188169 Don't close the request body. 2015-09-14 04:11:04 +00:00