go-kit v0.4.0 Release Notes
Release Date: 2017-03-08 // about 7 years ago-
๐ 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)
- 0๏ธโฃ log: DefaultTimestamp becomes nano-precision (#430) โ thanks, @willfaught
- 0๏ธโฃ 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)