Releases: lyft/gostats
BUGFIX: Prevent bug causing metrics counter/gauge metrics to stop flushing.
tcp_sink_test: add test to verify that Flush() does not hang (#85) * tcp_sink_test: add test to verify that Flush() does not hang This is to reproduce the bug introduced by: https://github.com/lyft/gostats/pull/79 And verify the change added by: https://github.com/lyft/gostats/pull/84 * tcp_sink_test: attempt to break test on Travis CI It fails locally, but is passing on Travis. Flushing more stats should hopefully break it. * travis: run tests without '-race' flag as well Sometimes '-race' slows execution down too much. The goal here is get the Flush() tests to fail on Travis CI.
Change buffering to not write partial stats
v0.3.3
This release changes the buffering logic to prevent the writing of partial stats: #81
Prevent the TCP sink from blocking on Flush()
v0.3.2
This release fixes a bug with the tcpStatsdSink that would lead to .Flush() blocking indefinitely if there was nothing to flush. It additionally, improves the reliability of the tcpStatsdSink by ensuring that establishing and writing to its net.Conn never blocks.
Drop under-defined tag pairs
This release adds filtering out tag pairs when the tag itself or the tag value is an empty string.
Remove expvars and metric publishing
v0.3.0
PR: #76
This release removes the ability to publish stats via expvars
and is technically a breaking change as stats are no longer published with expvars.Publish()
. There are no changes to the package API, but the export
argument to NewStore(sink Sink, export bool)
is now ignored.
We are removing expvars
because is detrimentally impacts security, performance and reliability.
- Security:
expvars
makes the running programs command line arguments available at/debug/vars
. Note: passing sensitive information via command line arguments is a bad idea in general. - Performance:
expvars
is meant to be called only frominit()
functions and re-sorts its vars each time a new one is added. This obviously becomes very expensive when a large number of stats are stored. - Reliability: Again,
expvars
is meant to be called only frominit()
and will panic withlog.Panicln()
if a duplicate var name is published. This is hard to guard against: checking for duplicate var names before the call to publish can't protect against vars published by another package; and catching the panic withrecover()
still leads to erroneous messages written to STDERR (and changing the default output of"log"
would be unacceptable side-effect).
Basically, we've been using expvars
incorrectly and the best solution is to remove it. If this breaks you, please reach out to us or file an issue and we'll work on a solution.
Recover expvar panic
v0.2.22
Recover duplicate key panics from expvar.Publish()
instead of guarding against duplicate keys with a sync.Map
. The sync.Map
cannot prevent other packages from creating duplicate keys and increases memory usage.
- stats: recover expvar panic: #74
Improve performance of tag merging and printing
Support Go 1.12 and fix bug in mock.Fatal() helper
Add thread-safe mock sink for testing
v0.2.19
- Add thread-safe mock sink for testing (#68)