consul/.changelog
Dhia Ayachi 005ad9e46d
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
..
2020-10-09 10:51:37 -04:00
2021-04-14 19:41:04 -04:00
2021-04-14 11:50:15 -04:00
2021-05-20 12:57:15 -04:00
2020-10-13 18:16:33 -04:00
2020-08-28 23:01:04 +02:00
2020-09-15 13:33:55 -07:00
2020-09-14 14:16:47 -06:00
2020-09-10 18:53:36 +02:00
2020-09-02 10:48:11 -05:00
2020-09-15 10:05:23 -07:00
2020-09-25 12:03:49 -04:00
2020-10-20 16:42:06 -04:00
2020-10-09 08:01:55 -07:00
2021-05-18 15:04:12 -04:00
2020-10-07 10:22:40 -05:00
2021-04-06 17:12:10 +08:00
2020-12-30 14:09:50 -06:00
2020-11-11 11:33:38 -06:00
2020-11-09 17:29:06 -05:00
2020-11-17 10:35:56 -05:00
2020-11-13 14:31:14 -08:00
2020-11-20 18:23:01 +01:00
2020-11-30 17:27:39 +00:00
2021-03-16 18:22:25 -04:00
2021-01-05 13:05:42 -05:00
2021-01-20 18:18:46 +00:00
2021-02-26 17:08:33 -06:00
2021-01-29 16:08:39 +00:00
2021-03-11 11:47:35 -08:00
2021-02-08 09:45:58 -07:00
2021-02-08 18:16:07 +01:00
2021-02-16 12:52:23 -05:00
2021-03-11 09:46:53 -08:00
2021-03-09 09:30:01 +00:00
2021-03-17 10:46:21 +00:00
2021-04-29 13:54:05 -05:00
2021-03-17 22:09:02 -06:00
2021-05-04 12:41:43 -07:00
2021-04-27 14:29:48 -04:00
2021-04-15 13:58:28 -06:00
2021-04-14 16:51:21 -04:00
2021-05-03 16:19:09 +01:00
2021-04-27 19:03:17 -04:00
2021-04-29 12:08:03 -04:00
2021-05-04 14:09:14 -04:00
2021-05-06 18:35:52 -04:00
2021-05-21 11:08:50 -04:00
2021-06-02 17:39:30 -04:00
2020-10-09 22:44:51 -04:00