1
0
mirror of https://github.com/go-kit/kit.git synced 2025-07-17 01:12:38 +02:00
Commit Graph

1532 Commits

Author SHA1 Message Date
af4337097f refactor(tracing.opentracing): options improvements
- some renaming
- more flexible tags option: support adding tags with multiple options
2021-03-22 11:07:19 +03:00
185f2f8df4 update comments 2021-03-22 03:59:42 +03:00
038371bb06 test(tracing.opentracing): cover endpoint options 2021-03-22 03:55:24 +03:00
377c235dc5 refactor(tracing.opentracing): add endpoint tracing options
- optionally trace business errors
- add option to set static/dynamic tags
- add option to set dynamic name
2021-03-22 03:55:05 +03:00
60e8424101 Updates CI to latest go (#1062) 2021-03-20 13:02:47 +01:00
d9e46badbf Update Go versions for CI (v2) (#1054)
* Update Go version for CI

* sd/zk: mark test as flaky

* tracing/opencensus: mark test as flaky
2021-02-09 18:31:23 +01:00
0ca22796c7 Capture newlines in log stdlib (#1041)
Capture newlines in the stdlib adapter messages. Avoids cutting off
multi-line log messages.

See: https://github.com/prometheus/node_exporter/issues/1886

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-11-30 03:00:37 +01:00
a0558397fd fix log stdlibadapter when prefixed (#1036)
* fix log stdlibadapter when prefixed

* add some more doc for Prefix stdlib adapter option

* fix typo

* Update log/stdlib.go

Co-authored-by: Peter Bourgon <peterbourgon@users.noreply.github.com>
2020-11-25 23:37:04 +01:00
15dfca19f2 Upgrade to the latest version of the setup-go github action (#1040)
The beta version utilizes the deprecated `set-env` and `add-path` commands
2020-11-25 19:42:22 +01:00
3796a6b25f cmd/kitgen: deprecate (#1034) 2020-11-15 07:27:13 +01:00
1e9fdf6a9f add support for JSONRPC opencensus tracing (#1022) 2020-11-03 16:30:51 +01:00
2125fae163 Dependency update [lightstep-tracer-go/go-opencensus] (#1029)
Fixes #1000
2020-11-03 16:30:05 +01:00
ab88dc9243 Merge pull request #1028 from vrazdalovschi/patch-1
refactor(comment): change the mixed up value
2020-11-01 13:48:30 -05:00
be52fc943a refactor(comment): change the mixed up value
change from Warn to Debug in the debug method
2020-10-31 13:21:51 +02:00
6c17021336 fix failing opencensus tests (#1021) 2020-10-10 00:21:20 +02:00
8480b28928 Update cargo.go (#1014) 2020-09-16 19:34:37 +02:00
439c4d2ed3 metrics/generic: fix uint64 alignment (#1007)
* fix: uint64 alignment in metrics/generic

* test: adds a weak test on atomic alignment.
2020-09-15 16:35:03 +02:00
4133f7f866 Fix etcdv3 client won't return error when no endpoint is available (#1009) 2020-09-13 23:19:25 +02:00
6860cdd41d Move the ClientAfter calls to before the decode (#1008)
* Move the ClientAfter calls to before the decode

ClientAfter is documented as running _prior_ to being decoded. But, this
was only partly true. They were run prior to decode, but after the
jsonrpc unmarshalling,

As the callback uses the bare response object, and at least for me, is
used to debug what's seen on the wire, this seems incorrect.

* tests
2020-09-04 21:47:52 +02:00
5561005609 Improve inconsistent Consul SD index handling. (#999)
Consul has guidelines for how the index movement should be handled.

https://www.consul.io/api-docs/features/blocking#implementation-details

Generally the index should always increase but if it does not increase this
patch implements the suggested solutions for recovery.
2020-07-20 17:08:20 +02:00
02c7c016dd log/term: fix build on GOOS=js GOARCH=wasm (#993)
Before this fix, the build would fail, as IsTerminal isn't defined on
that platform:

	$ GOOS=js GOARCH=wasm go build
	# github.com/go-kit/kit/log/term
	./term.go:14:6: undefined: IsTerminal

The reason is pretty simple; js/wasm doesn't have syscalls, and thus it
doesn't have an "is a terminal" syscall.

Grouping it with appengine to always assume that the output is not a
terminal is good enough for now, as it at least makes the package build.

No change is needed in any other file, because none of the other
IsTerminal +build lines include js/wasm in any way.
2020-07-10 03:40:02 +02:00
ebfffd0f4f Merge pull request #992 from vinayvinay/log-with-suffix
Add log.WithSuffix.
2020-07-04 13:54:48 -04:00
0268ca8a01 log.WithSuffix, appends kvs to those passed to Log
enhancement suggested in:
https://github.com/go-kit/kit/issues/991

why?

if a human is reading logfmt output on the
shell or in the web browser, it helps to
have certain fields prefixed, e.g. ts,
but certain fields are better suffixed,
e.g. caller, environment, so that more
important information appears first.

benchmarks suggest an additional cost
only if WithSuffix is used.

goos: darwin
goarch: amd64
pkg: github.com/go-kit/kit/log
BenchmarkDiscard-4               	32230156	        38 ns/op	      32 B/op	       1 allocs/op
BenchmarkOneWith-4               	 9647907	       122 ns/op	      96 B/op	       2 allocs/op
BenchmarkTwoWith-4               	 8935790	       134 ns/op	     160 B/op	       2 allocs/op
BenchmarkTenWith-4               	 5016836	       236 ns/op	     672 B/op	       2 allocs/op
BenchmarkOneWithPrefix-4         	 9907198	       123 ns/op	      96 B/op	       2 allocs/op
BenchmarkTenWithPrefix-4         	 5076309	       239 ns/op	     672 B/op	       2 allocs/op
BenchmarkOneWithSuffix-4         	 6432942	       189 ns/op	     128 B/op	       3 allocs/op
BenchmarkTenWithSuffix-4         	 4899711	       246 ns/op	     416 B/op	       3 allocs/op
BenchmarkOneWithPrefixSuffix-4   	 6111750	       197 ns/op	     160 B/op	       3 allocs/op
BenchmarkTenWithPrefixSuffix-4   	 2172066	       555 ns/op	    1952 B/op	       3 allocs/op
PASS
ok  	github.com/go-kit/kit/log	14.224s
2020-07-03 15:52:34 +01:00
b1d0a5d9fb Add Version to JSON-RPC client request (#990) 2020-06-15 17:58:06 +02:00
ef2f77e398 Update the link and description for go-micro (#989) 2020-06-11 01:34:40 +02:00
81a2d1f550 util/conn: close old connection before reconnect (#982) 2020-05-15 13:18:47 +02:00
266ff8dc37 README: update sponsors 2020-04-17 19:26:38 +02:00
833a0dd31a fix bad Gauge test (#975) 2020-04-16 16:42:10 +02:00
e10c4c8099 log: SyncLogger: defer mutex unlocks for panic safety (#974) 2020-04-12 19:12:43 +02:00
cb67d82b18 jsonrpc.DefaultErrorEncoder: add RequestID in error body (#969)
* Add RequestID in error body

* Implementing review suggestions
2020-03-22 20:45:22 +01:00
6ce524cf4b transport/http: NewExplicitClient (#971)
* transport/http: NewExplicitClient

* transport/http: improve NewClient/NewExplicitClient relationship
2020-03-20 18:08:00 +01:00
ad60314e51 Merge pull request #962 from Trane9991/logrus-level
allow to use specific logrus level in the adaptor
2020-03-09 20:14:37 -04:00
0b4e97f161 update NewLogger comment 2020-03-09 23:37:17 +02:00
5ae12b60dc make logrus logger fields unexported 2020-03-09 23:36:17 +02:00
4e1cfb4ead codecov.yml: I guess this is actually the correct name 2020-03-08 23:24:00 +01:00
1bbee51a71 README: add links to generator tools (#964)
* README: add links to generator tools

* README: more code generators
2020-03-06 00:09:04 +01:00
aa1caf50eb .codecov.yml: comment: false 2020-03-03 19:35:47 +01:00
17828f39b8 Go 1.14 (#966)
* Build on Go 1.14

* Remove unnecessary GOPROXY env
2020-02-28 15:17:35 +01:00
c0816ab8a1 Add GitHub Actions workflow (#957)
* Add GitHub Actions workflow

* Lock versions where possible

* Synchronize docker-compose file with GH Actions

* Build using latest unstable version

* Update badges

* Remove github-actions branch from config

* Cleanup old CI configs

* Remove if from coverage upload

Co-authored-by: Peter Bourgon <peterbourgon@users.noreply.github.com>
2020-02-28 15:03:56 +01:00
d9bb21b5ad remove unnecessary log keys 2020-02-27 10:32:32 +02:00
fb88150d29 Log CloudWatch response error (#961)
* fix condition for error logging

* add test  to check that error returned from `Send()` method
2020-02-24 20:32:45 +01:00
9368a66e69 add tests for the WithLevel feature 2020-02-24 18:17:16 +02:00
fb6b3fac5a Make Option exported, rename logrusLogger just to Logger 2020-02-24 16:28:17 +02:00
a8b27b8d39 Update README.md (#963) 2020-02-23 17:04:02 +01:00
c8e784125c set logrus level using the option function approach 2020-02-21 18:42:18 +02:00
cc236202b1 allow to use specific logrus level in the adaptor 2020-02-21 18:04:08 +02:00
7dd081564b use batch values API for CloudWatch PutMetric data call (#960)
* use batch values API for CloudWatch PutMetric data call

which was introduced at https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md#release-v11536-2018-09-17

* fix test, so they can accept the list of received values from the gauge

* use batch api always
2020-02-20 22:15:27 +01:00
cc938d52e0 Add a span name getter to opencensus endpoint options (#948)
* Add a span name getter to opencensus endpoint options

* Add GetSpanDetails option

* Split GetSpanDetails function

* Simplify getting the name

* Improve documentation

* Simplify attributes

* Update documentation

* Update tracing/opencensus/endpoint_options.go

Co-authored-by: Peter Bourgon <peterbourgon@users.noreply.github.com>
v0.10.0
2020-02-17 20:15:32 +01:00
4f34beba87 Merge pull request #956 from HCoban/fix-typo-in-level-example-test
Fix typo: "thte" -> "the"
2020-02-13 23:09:45 -05:00
b3ce3871bb Fix typo: "thte" -> "the" 2020-02-14 01:23:50 +01:00