consul/vendor/github.com
Dhia Ayachi 9e4d7a3d26
generate a single debug file for a long duration capture (#10279) (#10360)
* debug: remove the CLI check for debug_enabled

The API allows collecting profiles even debug_enabled=false as long as
ACLs are enabled. Remove this check from the CLI so that users do not
need to set debug_enabled=true for no reason.

Also:
- fix the API client to return errors on non-200 status codes for debug
  endpoints
- improve the failure messages when pprof data can not be collected

Co-Authored-By: Dhia Ayachi <dhia@hashicorp.com>

* remove parallel test runs

parallel runs create a race condition that fail the debug tests

* snapshot the timestamp at the beginning of the capture

- timestamp used to create the capture sub folder is snapshot only at the beginning of the capture and reused for subsequent captures
- capture append to the file if it already exist

* Revert "snapshot the timestamp at the beginning of the capture"

This reverts commit c2d03346

* Refactor captureDynamic to extract capture logic for each item in a different func

* snapshot the timestamp at the beginning of the capture

- timestamp used to create the capture sub folder is snapshot only at the beginning of the capture and reused for subsequent captures
- capture append to the file if it already exist

* Revert "snapshot the timestamp at the beginning of the capture"

This reverts commit c2d03346

* Refactor captureDynamic to extract capture logic for each item in a different func

* extract wait group outside the go routine to avoid a race condition

* capture pprof in a separate go routine

* perform a single capture for pprof data for the whole duration

* add missing vendor dependency

* add a change log and fix documentation to reflect the change

* create function for timestamp dir creation and simplify error handling

* use error groups and ticker to simplify interval capture loop

* Logs, profile and traces are captured for the full duration. Metrics, Heap and Go routines are captured every interval

* refactor Logs capture routine and add log capture specific test

* improve error reporting when log test fail

* change test duration to 1s

* make time parsing in log line more robust

* refactor log time format in a const

* test on log line empty the earliest possible and return

Co-authored-by: Freddy <freddygv@users.noreply.github.com>

* rename function to captureShortLived

* more specific changelog

Co-authored-by: Paul Banks <banks@banksco.de>

* update documentation to reflect current implementation

* add test for behavior when invalid param is passed to the command

* fix argument line in test

* a more detailed description of the new behaviour

Co-authored-by: Paul Banks <banks@banksco.de>

* print success right after the capture is done

* remove an unnecessary error check

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>

* upgraded github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 => v0.0.0-20210601050228-01bbb1931b22

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Paul Banks <banks@banksco.de>

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: Paul Banks <banks@banksco.de>
2021-06-07 15:51:57 -04:00
..
Azure Update go-discover dependency (#7731) 2020-05-04 10:59:48 -04:00
DataDog/datadog-go vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 13:08:49 -07:00
Microsoft/go-winio Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
NYTimes/gziphandler Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
StackExchange/wmi Connect: allow configuring Envoy for L7 Observability (#5558) 2019-04-29 17:27:57 +01:00
armon Update Go-Metrics 0.3.4 (#8478) 2020-08-11 21:07:05 -05:00
aws/aws-sdk-go Bump go-discover to support EC2 Metadata Service v2 (#6865) 2019-12-04 11:59:16 -05:00
beorn7/perks Added dependency github.com/prometheus/client_golang/prometheus/promhttp 2018-04-06 08:54:37 +02:00
bgentry/speakeasy Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
boltdb/bolt Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
census-instrumentation/opencensus-proto connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) 2020-07-07 16:22:30 -05:00
cespare/xxhash/v2 vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 13:08:49 -07:00
circonus-labs agent: transfer leadership when establishLeadership fails (#5247) 2019-06-19 14:50:48 +02:00
cncf/udpa/go connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) 2020-07-07 16:22:30 -05:00
coredns/coredns Add github.com/coredns/coredns/plugin/pkg/dnsutil files 2018-05-21 22:25:16 +02:00
coreos/go-oidc acl: add auth method for JWTs (#7846) 2020-05-11 20:59:29 -05:00
davecgh/go-spew Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
denverdino/aliyungo Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
dgrijalva/jwt-go Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
digitalocean/godo Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
dimchansky/utfbom Bump go-discover to support EC2 Metadata Service v2 (#6865) 2019-12-04 11:59:16 -05:00
docker/go-connections Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
elazarl/go-bindata-assetfs Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
envoyproxy connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) 2020-07-07 16:22:30 -05:00
fatih/color Allow users to configure either unstructured or JSON logging (#7130) 2020-01-28 17:50:41 -06:00
go-ole/go-ole Connect: allow configuring Envoy for L7 Observability (#5558) 2019-04-29 17:27:57 +01:00
gogo/protobuf connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) 2020-07-07 16:22:30 -05:00
golang connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) 2020-07-07 16:22:30 -05:00
google generate a single debug file for a long duration capture (#10279) (#10360) 2021-06-07 15:51:57 -04:00
googleapis chore(deps): update gopsutil to v2.20.9 (#8843) (#8859) 2020-10-07 14:52:50 -04:00
gophercloud/gophercloud Update go-discover dependency (#7731) 2020-05-04 10:59:48 -04:00
hashicorp Update vault CA for latest api client 2020-10-07 16:40:27 -04:00
imdario/mergo Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
jmespath/go-jmespath connect: Add AWS PCA provider (#6795) 2019-11-21 17:40:29 +00:00
joyent/triton-go Update github.com/joyent/triton-go to latest 2020-04-16 12:34:29 -04:00
json-iterator/go vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 13:08:49 -07:00
konsorten/go-windows-terminal-sequences Update github.com/joyent/triton-go to latest 2020-04-16 12:34:29 -04:00
kr/text replace old fork of text package (#4501) 2018-08-14 12:23:18 -07:00
linode/linodego Switch to go 1.13.7 (#7262) 2020-02-12 10:15:24 -06:00
mattn agent: don't let left nodes hold onto their node-id (#7747) 2020-05-04 18:39:08 +02:00
matttproud/golang_protobuf_extensions Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
miekg/dns Switch to go 1.13.7 (#7262) 2020-02-12 10:15:24 -06:00
mitchellh Update mapstructure to v1.3.3 (#8361) 2020-07-22 19:14:05 +00:00
modern-go Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
nicolai86/scaleway-sdk Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
packethost/packngo Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
pascaldekloe/goe Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
patrickmn/go-cache acl: add auth method for JWTs (#7846) 2020-05-11 20:59:29 -05:00
pierrec/lz4 vendor: Update vault api package 2020-10-07 16:40:27 -04:00
pkg/errors Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
pmezard/go-difflib agent/consul/fsm: begin using testify/assert 2018-03-06 09:48:15 -08:00
posener/complete vendor: fix case issue (#7777) 2020-05-04 21:39:01 +02:00
pquerna/cachecontrol acl: add auth method for JWTs (#7846) 2020-05-11 20:59:29 -05:00
prometheus vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 13:08:49 -07:00
rboyer/safeio cli: ensure that 'snapshot save' is fsync safe and also only writes to the requested file on success (#7698) 2020-04-24 17:34:47 -05:00
renier/xmlrpc Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
ryanuber connect: intermediate CA certs generated with the vault provider lack URI SANs (#6491) 2019-09-23 12:04:40 -05:00
sean-/seed Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
shirou/gopsutil chore(deps): update gopsutil to v2.20.9 (#8843) (#8859) 2020-10-07 14:52:50 -04:00
sirupsen/logrus Update github.com/joyent/triton-go to latest 2020-04-16 12:34:29 -04:00
softlayer/softlayer-go Update vendoring from go mod. (#5566) 2019-03-26 17:50:42 -04:00
spf13/pflag Update go-discover dependency (#7731) 2020-05-04 10:59:48 -04:00
stretchr Update testify to v1.5.1 2020-06-19 11:04:00 -04:00
tencentcloud/tencentcloud-sdk-go Bump go-discover to support EC2 Metadata Service v2 (#6865) 2019-12-04 11:59:16 -05:00
tv42/httpunix agent: transfer leadership when establishLeadership fails (#5247) 2019-06-19 14:50:48 +02:00
vmware/govmomi Pull go-discover to fix Sirupsen/logrus (#5598) 2019-04-03 20:07:00 +01:00