buildkite / test-collector-ruby

Buildkite Test Analytics collector for Ruby test frameworks
http://buildkite.com/test-analytics
MIT License
15 stars 26 forks source link

Trace spans can be filtered by a minimum duration #215

Closed pda closed 6 months ago

pda commented 6 months ago

Introduce the ability to filter trace spans by a minimum duration, so that fast spans can be discarded and only slow (interesting) spans are kept in memory and uploaded.

Configurable using BUILDKITE_ANALYTICS_TRACE_MIN_SECONDS (decimal value) in environment.

pda commented 6 months ago

I wonder if configuring this as milliseconds (integer?) would be better than seconds (decimal/float).

I find much easier to express 1 second in milliseconds (1,000) than 1 millisecond in seconds (0.001?). And I suspect people would generally want to configure this somewhere in the 1–1000ms range, not some whole number of seconds.

I think I'll change it.

pda commented 6 months ago

I've tested this against a large build within Buildkite with BUILDKITE_ANALYTICS_TRACE_MIN_MS=10, and verified that I see spans over 10ms and none under 10ms 👌🏼