open-consul/vendor/github.com
Dhia Ayachi e3dd0f9a44
generate a single debug file for a long duration capture (#10279)
* 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>
2021-06-07 13:00:51 -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 11:37:33 -07:00
Microsoft/go-winio
NYTimes/gziphandler
StackExchange/wmi chore: upgrade to gopsutil/v3 (#9118) 2020-11-06 20:48:38 -05:00
armon Update a couple dependencies 2021-05-04 14:09:10 -04:00
aws/aws-sdk-go
beorn7/perks
bgentry/speakeasy
boltdb/bolt
census-instrumentation/opencensus-proto connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8165) 2020-06-23 15:19:56 -05:00
cespare/xxhash/v2 vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 11:37:33 -07:00
circonus-labs
cncf/udpa/go connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8165) 2020-06-23 15:19:56 -05:00
coredns/coredns
coreos/go-oidc acl: add auth method for JWTs (#7846) 2020-05-11 20:59:29 -05:00
davecgh/go-spew
denverdino/aliyungo
dgrijalva/jwt-go
digitalocean/godo
dimchansky/utfbom
docker/go-connections
elazarl/go-bindata-assetfs
envoyproxy xds: ensure that all envoyproxy/go-control-plane protobuf symbols are linked into the final binary (#10131) 2021-04-29 14:58:26 -05:00
fatih/color
go-ole/go-ole chore: upgrade to gopsutil/v3 (#9118) 2020-11-06 20:48:38 -05:00
gogo/protobuf connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8165) 2020-06-23 15:19:56 -05:00
golang connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8165) 2020-06-23 15:19:56 -05:00
google generate a single debug file for a long duration capture (#10279) 2021-06-07 13:00:51 -04:00
googleapis Update google.golang.org/api and stretchr/testify 2020-06-09 16:03:05 -04:00
gophercloud/gophercloud Update go-discover dependency (#7731) 2020-05-04 10:59:48 -04:00
hashicorp Bump raft-autopilot version to the latest. (#10306) 2021-05-27 12:59:14 -04:00
imdario/mergo
jmespath/go-jmespath
joyent/triton-go
json-iterator/go vendor: Update github.com/armon/go-metrics to v0.3.3 2020-07-23 11:37:33 -07:00
konsorten/go-windows-terminal-sequences
kr/text
linode/linodego
mattn apply make update-vendor 2020-11-05 11:51:58 -08:00
matttproud/golang_protobuf_extensions
miekg/dns mod: bump to github.com/hashicorp/mdns v1.0.4 (#10018) 2021-04-14 14:17:52 -05:00
mitchellh Update mapstructure 2021-01-12 12:24:56 -05:00
modern-go
nicolai86/scaleway-sdk
packethost/packngo
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-09-15 12:45:29 -07:00
pkg/errors
pmezard/go-difflib
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 11:37:33 -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
ryanuber
sean-/seed
shirou/gopsutil/v3 chore: upgrade to gopsutil/v3 (#9118) 2020-11-06 20:48:38 -05:00
sirupsen/logrus
softlayer/softlayer-go
spf13/pflag Update go-discover dependency (#7731) 2020-05-04 10:59:48 -04:00
stretchr chore: upgrade to gopsutil/v3 (#9118) 2020-11-06 20:48:38 -05:00
tencentcloud/tencentcloud-sdk-go
tv42/httpunix
vmware/govmomi