Skip to content

0.4.0

Compare
Choose a tag to compare
@peterbourgon peterbourgon released this 08 Mar 09:31
· 473 commits to master since this release

Another substantial Go kit release, with a handful of bugfixes and some major enhancements.

We now use stdlib package context wherever possible — basically, everywhere except package transport/grpc, as gRPC still imports golang.org/x/net/context and we don't have a choice but to comply. Still, there are ways to bridge the gap: see examples/addsvc for details. This means Go kit now requires Go 1.7 or above.

The other major changes in this release involve package log. We've removed NewContext and the Context type, preferring With and WithPrefix helper functions. Also, we've promoted the experiemental level package to package level, and deprecated the old levels package to deprecated_levels. I'm really happy with this: it's a slightly esoteric, but really clean and literate way to compose levels with Go kit's package log. Give it a shot!

For the full changelog, see below. My enormous gratitude goes to Chris Hines @ChrisHines for his expert work on package log, and to Bas van Beek @basvanbeek for his expert work on packages tracing and transport/grpc. And huge thanks to the 22 individual contributors who've contributed to this release! 🏌️‍♀️

Bug fixes

  • log/term/colorlogger: Reset bold attribute (#399) - thanks, @serge-v
  • metrics/influx: Fix global tags (#404) — thanks, @kihamo
  • metrics/generic: make goroutine-safe (#424) — thanks, @gaplyk
  • metrics/generic: actually track metric name thru With invocations (#455) — thanks, @yurishkuro

Enhancements

  • Use stdlib context where possible (#421, #480)
  • log: remove Context type, prefer With/WithPrefix helpers (#481)
  • log: DefaultTimestamp becomes nano-precision (#430) — thanks, @willfaught
  • log: DefaultCaller key becomes "caller" (#439) — thanks, @willfaught
  • log/level: brand new leveled logging package (#401, #454, #470, #476) — thanks, @groob
  • metrics: Gauge gets an Add method (#393) — thanks, @hardcoar, @dlmiddlecote
  • metrics/circonus: rm :( it was racy, difficult to test, and broke often (#442)
  • sd/etcd: add TTL (#413) — thanks, @buptmiao
  • transport: ServerBefore/ServerAfter can be repeated (#467, #479) — thanks, @djgilcrease
  • transport/grpc: improve error handling (#389) — thanks, @kushtrimjunuzi
  • transport/grpc: support Server Response Headers and Trailers (#479)
  • transport/http: add ServerFinalizer (#394, #405, #408, #461) — thanks, @konradreiche, @xla, @drscre
  • transport/http: enhance ErrorEncoder: support StatusCoder, Headerer, json.Marshaler interfaces (#414)
  • transport/http: don't encode JSON response with StatusNoContent (#436) — thanks, @groob
  • transport/http: add EncodeJSONRequest helper (#440) — thanks, @willfaught
  • transport/http: add EncodeXMLRequest (#456) — thanks, and condolences, to @gaplyk

Documentation, examples, and testing

  • examples/addsvc: correct typo (#396) — thanks, @patterns
  • examples/shipping: fix reciever name (#473) — thanks, @kisPocok
  • log: improve documentation (#429)
  • metrics: fix documentation (#406, #417) — thanks, @Artmann
  • metrics/graphite: fix typo in docs (#450) — thanks, @jkakar
  • tracing/zipkin: document new, easier Zipkin HTTP tracing collector (#466)
  • tracing/zipkin: fix typo in Zipkin docs (#469) — thanks, @frozzare
  • Testing: fixes for Go report card (#395)
  • Testing: run integration tests on Circle (#372, #416) — thanks, @rodrigosaito
  • Testing: use docker-compose 1.10 in integration environment (#448)
  • Testing: improve coverprofile wildcard in gitignore (#458) — thanks, @travissalascox
  • Testing: Drone.io is no more :( (#468) — thanks, @17twenty
  • Testing: Upgrade CI to use go1.7.5 and go1.8 (#471)