Skip to content

Releases: lyft/gostats

BUGFIX: Prevent bug causing metrics counter/gauge metrics to stop flushing.

18 Nov 21:52
6620fd9
Compare
Choose a tag to compare
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

12 Aug 00:07
ed6b3b5
Compare
Choose a tag to compare

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()

20 Jun 16:06
0943cd5
Compare
Choose a tag to compare

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

11 Jun 22:18
9b96f33
Compare
Choose a tag to compare

This release adds filtering out tag pairs when the tag itself or the tag value is an empty string.

Remove expvars and metric publishing

24 May 19:45
03ea723
Compare
Choose a tag to compare

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 from init() 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 from init() and will panic with log.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 with recover() 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

22 May 17:34
Compare
Choose a tag to compare

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

20 Mar 03:00
1759516
Compare
Choose a tag to compare

v0.2.21

This release improves the performance of flushing stats and merging tags:

  • tcp_sink: Improve the performance of flushing stats: #71
  • tags: Aggressively inline tag serialization small tag sets: #72

Support Go 1.12 and fix bug in mock.Fatal() helper

26 Feb 18:56
91bde50
Compare
Choose a tag to compare

v0.2.20

  • mock: panic when the type of testing.TB is not known and fix lint errors (#69)
  • Go 1.12 Update (#70)

Add thread-safe mock sink for testing

25 Feb 20:08
62bb3d8
Compare
Choose a tag to compare

v0.2.19

  • Add thread-safe mock sink for testing (#68)

Improve performance and reduce allocs

13 Feb 19:48
2f3ea18
Compare
Choose a tag to compare

v0.2.18

  • tags: improve performance for small tag sets (#66)
  • stats: use sync.Map instead of map + mutex (#67)