Bryan Boreham
18acfcefe1
Run go fmt on various files
...
Seems that go fmt has changed behaviour since these files were last
checked in. Changes are all cosmetic.
2020-12-30 18:30:34 +00:00
Bryan Boreham
24197bc71e
fix (pipes): silence EOF error
...
This comes back when an operation like Kubernetes Describe finishes;
hide it so we don't print as an error.
2020-05-06 10:04:44 +00:00
Bryan Boreham
323aa46d1c
fix (pipes): check websocket errors inside CopyToWebsocket()
...
Previously we were treating EOF on the reader as no-error, meaning
that operations like Kubernetes Describe would retry endlessly when
finished.
2020-05-06 10:04:40 +00:00
Bryan Boreham
6947cf19da
Slow down DNS poll interval
...
There's no reason to expect anyone is changing their DNS that fast,
and the probe queries all endpoints every time it polls so slowing
down will reduce effort.
2020-03-12 16:54:44 +00:00
DarthSett
ccfd2f0427
Added test to check user-agent header
2019-10-28 19:34:22 +05:30
DarthSett
4eab46670e
Update user-agent in probe/appclient/probe_config.go
...
Co-Authored-By: Filip Barl <filip.barl@gmail.com >
2019-10-25 19:31:17 +05:30
DarthSett
af31e30439
Add user-agent header
2019-10-25 12:33:35 +05:30
“DarthSett”
7adc70c5a5
add the user-agent header
2019-10-23 16:35:57 +05:30
rahul agrawal
0000173c05
add the user-agent header
2019-10-23 16:31:59 +05:30
Bryan Boreham
b24917993e
fix: report http error if /api call fails
...
Previously it would try to run the JSON decoder on a string like "404
not found" and report that failing.
2019-10-06 17:27:49 +00:00
Bryan Boreham
4c52889316
Add 'omitempty' tag to Topology.Nodes
...
So we save space writing out empty topologies.
Need to fix up `app_client_internal_test.go` to use Scope's
`test/reflect` package that understands empty==nil, so now it doesn't
need a previous workaround.
Remove a similar workaround in `probe_internal_test.go` that isn't
necessary since it's already using that package.
2019-09-15 15:50:08 +00:00
Bryan Boreham
20e7d5d476
Add metric counting report publish attempts and errors
2019-07-09 13:01:26 +00:00
Yu Cao
b5190d45cd
basic auth
2018-10-17 19:25:12 -04: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
06c895267c
Reports: streamline report serialization
...
Move the creation of the buffer and the choice of compression level
(which never changes) into WriteBinary(), to simplify the code.
2018-06-19 22:59:01 +00:00
Bryan Boreham
56137211b5
probe: Eliminate appclient.reportPublisher
...
Simplification: move the 'noControls' functionality into the probe, as
we don't need a whole struct to do that.
The ReportPublisher interface also moves into probe where it belongs:
"the consumer should define the interface" - Dave Cheney
2018-06-19 22:59:01 +00:00
Bryan Boreham
96f51c47af
probe: Eliminate Publisher interface from app_client
...
Simplification: everything now implements Publish(Report), and we do
away with writing/reading/writing in the MultiAppClient.
2018-06-19 22:51:25 +00:00
Matthias Radestock
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 Boreham
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 Acosta
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 Wilkie
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 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