buildkite / buildkite-agent-metrics

A command-line tool (and Lambda) for collecting Buildkite agent metrics
MIT License
67 stars 50 forks source link

Adding more debug traces for HTTP and enhance security #283

Closed CheeseStick closed 3 months ago

CheeseStick commented 3 months ago

Background

To debug sudden spiking delay while collecting and processing metrics, it was required to collect more metrics during the HTTP requests.

Also, we noticed that the agent token is exposed to the log when HTTP debug is enabled, which can be a security risk.

This PR

It adds more traces to the HTTP Client tracer for more detailed event timing. Also, it updates the request dump to redact the Authorisation header if it exists.