-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate weaveworks/common packages used by Mimir #342
Merged
Merged
Changes from all commits
Commits
Show all changes
363 commits
Select commit
Hold shift + click to select a range
e9928ad
Exempt 503 (Service Unavailable) from error logging (#97)
juliusv e01024f
Add gRPC streaming middleware. (#95)
tomwilkie ee261fb
When trace reporting is enabled, don't enable trace sampling unless a…
leth afab793
Abstract logging for the middleware (#96)
tomwilkie b6c150f
Don't shutdown the gRPC server the minute a signal is received. (#99)
tomwilkie af93c00
Add user and org ID to span if known (#100)
bboreham d58f15d
Propagate tracing context over httpgrpc (#105)
leth cf37392
Don't use full URL as metric label on unmatched path (#108)
bboreham 9d89ef2
Raise default server timeouts from 5s to 30s (#109)
bboreham ef408c8
Return errors when http/grpc servers exit. (#92)
gouthamve 8f75acd
Expose jaeger metrics (#114)
gouthamve c1317dc
Improve logging of http errors (#115)
bboreham d516ed3
Update httpgrpc to match weaveworks/cortex#910 (#117)
bboreham cb92e3e
Expose the HTTP server from the server struct. (#118)
tomwilkie 742cd9f
Add HTTP tracing middleware (#119)
leth e199adb
Print traceID with request (#123)
gouthamve 303e56c
Also set global logging when initializing logrus (#122)
rndstr a89a3f3
Don't trace http requests when using httpgrpc. (#124)
tomwilkie 5ead831
Print logrus output in logfmt format (#121)
rndstr 47e82f5
Update more golang/protobuf to gogo/protobuf (#127)
bboreham ca1cf91
Label http request handler tracing spans with the matched route name …
gouthamve c4ad22a
Fix dropped namespace in url parsing (#128)
leth 61043e1
Update grpc-opentracing to latest version at new home (#129)
bboreham 14ddecd
go-grpc-middleware has moved (#130)
bboreham f789056
Update to latest kuberesolver (#131)
gouthamve b4958f7
Log which ports the server is listening on. (#143)
tomwilkie eb93014
server: add PathPrefix to config for all routes
adamdecaf f1a9352
Merge pull request #144 from moov-io/path-prefix
bboreham 302c7b9
Allow server.Config to be unmarshaled from YAML.
tomwilkie d0f7449
Dont flag context.Canceled as an error in tracing
bboreham c6534c8
Merge pull request #148 from weaveworks/cancel-not-error
bboreham e94ffc7
Allow overriding max message sizes and concurrent streams in the server.
tomwilkie 52151cb
Merge pull request #146 from tomwilkie/server-grpc-params
bboreham 056c1a1
exclude Authorization headers from log messages.
woodsaj 207fed7
server: use -server.path-prefix for metrics and debug endpoints
adamdecaf 6a3383c
Skip logging context cancelled warning msgs
bdd23c5
Merge pull request #151 from nrjpoddar/skipContextCancelledLog
bboreham 8849852
Merge pull request #150 from moov-io/path-prefix-for-metrics
bboreham 7d0095f
Allow log levels to be marshalled to YAML. Test it works.
tomwilkie 6186432
Merge pull request #149 from woodsaj/dontLogAuthHeaders
bboreham ade3a34
Merge pull request #152 from tomwilkie/yaml-level
bboreham f89fbda
Fix lint warning
bboreham 87b95fd
Merge pull request #158 from weaveworks/remove-quay
bboreham 8a54aa8
Expose RegisterInstrumentation setting
daixiang0 5e40063
Update prometheus/client_golang and prometheus/procfs
codesome 8883a61
Merge pull request #161 from codesome/vendor
bboreham 40ead60
Merge pull request #157 from daixiang0/patch-2
bboreham 95bdf7f
Allow user to specify HTTP and gRPC bind addresses (not just ports.)
tomwilkie 756072a
Change naming from host to address
ThoreKr 997d822
Revert changes to server_test.go
ThoreKr e389d79
Merge pull request #167 from ThoreKr/server-listen-addr
bboreham 93f10fa
Extend tests to check server works with flag defaults
bboreham 4b42577
limit the number of connections to server
jtlisi b4d0ce3
Merge pull request #170 from jtlisi/20191115_listener_conn_limits
bboreham 813c815
Merge pull request #169 from weaveworks/improve-tests
bboreham b09b59e
Tell Go runtime we have stopped listening to signals
bboreham 309bd4a
Merge pull request #171 from weaveworks/stop-signal-notify
bboreham 05383db
Fix kuberesolver URLs to have three slashes
bboreham 297565c
Add more test cases prompted by review feedback
bboreham dd0fde0
Merge pull request #175 from weaveworks/fix-kuberesolver-url
bboreham 283311c
Trace Websocket requests
bboreham f0ff3c4
Merge pull request #173 from weaveworks/trace-websockets
bboreham d7e8634
Update gogo proto to 1.3.0
cyriltovena 289ba90
add flags to configure keep alive configs (#174)
jtlisi a6b75e3
Fixed gRPC server keepalive flags registration
pracucci f9309c4
Merge pull request #178 from pracucci/fix-grpc-server-flags
bboreham 884f80f
Merge pull request #177 from cyriltovena/update-gogoproto
bboreham c033276
Refactor: extract common error decoding
bboreham a2368a6
Re-do protogen for fake_server with current gRPC
bboreham 8832833
Extend server tests with canceled gRPC functions
bboreham b1b097d
Extend cancelation checking to include gRPC errors
bboreham e3d33b3
Extend error instrumentation tests to http
bboreham 752036f
Instrument canceled gRPC calls with a unique label
bboreham 8fe78e3
Merge pull request #180 from weaveworks/better_cancel_handling
bboreham 338df8a
Return error in configuring jaeger
adityacs 4f5616c
Merge pull request #182 from adityacs/master
bboreham 818e3c7
add log format option
seankhliao 8fd9986
Add tls support to http server
annanay25 2c7b017
Use require package in tests, correct TLS fields in server config
annanay25 9423b42
Load certs only if config options are specified
annanay25 0cadfb8
Add metrics namespace to server
annanay25 60fa679
use same system as level for format
seankhliao e49e7b4
Add tls support to grpc server, add dummy certs
annanay25 d87aee0
Addressed @tomwilkie's review comments
annanay25 d37d646
Fix broken tests
annanay25 2e9e35e
Add TODO note about using copied function
annanay25 616c3d1
Use ConfigToTLSConfig util function from node_exporter
annanay25 d18f518
Log errors when write fails, not 200
gouthamve 6b31090
Address @bboreham's comments
annanay25 b5217f8
Merge pull request #185 from annanay25/add-tls-support
bboreham fdf0dd0
fix function documentation
seankhliao 370ed82
Move shebang to first line, add commit hash to link
annanay25 f8537d0
Merge pull request #188 from annanay25/add-tls-support
rndstr 750c94d
Add test and warn only if not context cancelled
gouthamve 9a579a4
Added option to disable signal handling by Server. (#191)
pstibrany 3b6f9aa
Merge pull request #187 from gouthamve/fix-error-logging-http
bboreham e0b7967
Merge pull request #184 from seankhliao/jsonlog
bboreham 992ec19
Log X-Forwarded-For for every request
MichelHollands f0b41cf
Address review comments and add Forwarded and X-Real-IP support
MichelHollands 3fc16d7
Remove making standard middleware optional
MichelHollands f7d00cb
Remove unused fields as well
MichelHollands 2cb30ad
Add option to turn logging of source IPs on
MichelHollands b0babf8
Add sourceIPs tag in tracing
MichelHollands a38ef15
Add custom regex for extracting IP from header
MichelHollands 9cd54f5
Rename file so it's clearer what it does
MichelHollands 1c17866
Use better names
MichelHollands 67e2831
Do no use log prefix in config var name
MichelHollands 1e679a2
Address review comments
MichelHollands 51d5a48
Use same way of access struct
MichelHollands 82288ff
Address review comments
MichelHollands 5d7e5d6
Replace interceptor with httpsnoop library.
pstibrany c619e11
Metrics for HTTP and gRPC message sizes and inflight requests.
pstibrany e56d087
Added metrics test.
pstibrany 0a93599
Merge pull request #193 from MichelHollands/make_middleware_overridable
bboreham 78f5b35
Merge pull request #196 from pstibrany/message_size
bboreham efdf852
s/Kuberneretes/Kubernetes/
jdbaldry 35757bd
Merge pull request #200 from jdbaldry/fix-httpgrpc-typo
07a42c7
Make HTTP middleware optional (#194)
MichelHollands 613fc91
Add exemplar support to middleware
beorn7 dbcd94f
Merge pull request #202 from beorn7/master
bboreham 0525743
tracing: Allow specifying JAEGER_ENDPOINT instead of sampling server …
chancez 6c5e5a0
Expose grpc keepalive enforcement policy options.
pstibrany 14b1a40
Merge pull request #205 from pstibrany/expose-keepalive-policy-settings
bboreham 2c0d409
Merge pull request #204 from chancez/jaeger_collector_http
bboreham 35a9ce9
s/faviourite/preferred
jdbaldry fe17661
Set the content-length of httpgrpc request.
cyriltovena c84ffa6
Replace `ioutil.NopCloser` with a custom one.
cyriltovena ac67b41
Merge pull request #211 from cyriltovena/bytesbuffer
bboreham 700adae
Merge pull request #210 from cyriltovena/content-length-fix
bboreham f081cce
Merge pull request #208 from jdbaldry/patch-2
bboreham d4564f3
Fix panic in server i13n matching NotFoundHandler
colega f6cb631
Unindent getRouteName by using early returns
colega a59f180
Merge pull request #213 from colega/fix-panic-instrumenting-not-found…
bboreham 26c5c5b
support custom registerer
rfratto c853648
Add metric "tcp_connections" for number of TCP connections to server.
stevesg bfca92a
Merge pull request #214 from stevesg/num-tcp-conns
bboreham 98127c5
add tcpv4 support
3Xpl0it3r b43cc4a
Merge pull request #217 from 3Xpl0it3r/tcpv4-support
bboreham c40d0ef
tracing: add options to NewFromEnv
hairyhenderson aa1d61d
Merge pull request #218 from hairyhenderson/tracing-newfromenv-with-o…
bboreham cfc9b5f
Refactor: move ExtractTraceID functions to tracing package
bboreham 27bddff
Add exemplars to 'instrument' package
bboreham 6b8de30
refactor: re-use ObserveWithExemplar function
bboreham 7014be1
Add exemplars to gRPC instrumentation
bboreham 16ad2ef
Merge pull request #220 from weaveworks/instrument-exemplars
bboreham 4e159a5
Allow blank network in server.New
bboreham f3d6122
Merge pull request #221 from weaveworks/allow-blank-network
bboreham d37f665
gRPC stream middleware: move metrics after tracing
bboreham 36f2692
Merge pull request #222 from weaveworks/fix-grpc-stream-exemplars
bboreham 7c8a744
Migrating from go-kit/kit/log to the slimmer go-kit/log
dd05e1a
Merge pull request #226 from dannykopping/dannykopping/go-kit
bboreham 33ead4e
Add benchmark for Debugf()
bboreham 5d2d90e
Filter by log level before anything else
bboreham 2fe113d
Avoid Sprintf when log line is filtered out
bboreham 22c14a5
Revert "logging: Add ability to deduplicate log messages (#48)"
bboreham 605ae0d
Merge pull request #91 from weaveworks/remove-log-dedup
bboreham ac2d3b4
Merge pull request #227 from weaveworks/speedup-logging
bboreham eb76074
fix master build
rfratto c935aeb
Merge pull request #229 from rfratto/fix-master-build
bboreham 56b8fa7
replace node_exporter https package with exporter-toolkit
rfratto 70c7a8e
Added tcp_connections_limit metric
pracucci ed7a4aa
Merge pull request #231 from pracucci/add-tcp-connections-limit-metric
bboreham de4b7c8
Add a tag with the user-agent to traces
simonswine d2e57b1
Merge pull request #228 from rfratto/custom-registerer
bboreham d35bdeb
undo whitespace changes to server/server_test.go
rfratto b92d9aa
Merged both tag setters into a single MWSpanObserver
simonswine a3bc5dd
Merge pull request #232 from simonswine/20211104_add-user-agent-to-span
bboreham 55ea099
Merge pull request #230 from rfratto/use-exporter-toolkit
bboreham 81324d0
middleware: Add gRPC instrumentation utilities from dskit
aknuds1 553436c
middleware: Rename client instrumentation functions
aknuds1 9dc2a88
middleware: Move client instrumentation functions to grpc_instrumenta…
aknuds1 da8b5c7
middleware: Slight cleanup
aknuds1 59c2e2a
add flag to log requests at info level
colin-stuart 325c851
fix comment for LogRequestsAtInfoLevel
colin-stuart 5fd699a
add yaml tag & add LogRequestsAtInfoLevel to RegisterFlags
colin-stuart 3422262
add method to set log level for logging with request
colin-stuart ea5ad02
Add user and org labels to observed exemplars
colega ab36b6c
Revert "add method to set log level for logging with request"
colin-stuart 05ca4b7
call logWithRequest once
colin-stuart 959cf11
middleware: Simplify as suggested by @pracucci
aknuds1 28aecff
fix typo in registering LogRequestAtInfoLevel flag
colin-stuart 356ab2d
Merge pull request #236 from colin-stuart/add-flag-to-log-requests-at…
bboreham 73f00dd
Merge pull request #237 from colega/user-and-org-labels-on-exemplars
bboreham 0fc6026
Removed debug log on successfuly gRPC requests from GRPCServerLog
pracucci af493c3
Make debug logging on successful gRPC requests from GRPCServerLog opt…
zenador 6ecc7c6
Update server/server.go
zenador 4396b19
Apply changes according to code review
zenador e22efa8
Merge pull request #244 from zenador/remove-debug-logs-on-success-req…
bboreham e9649be
Merge pull request #234 from aknuds1/feat/add-dskit-middleware
bboreham 0b1e88d
server: Remove advanced TLS config parameters
aknuds1 d074295
Merge pull request #245 from aknuds1/chore/hide-tls-params
bboreham deac713
Revert "Add user and org labels to observed exemplars"
colega 6a76c34
Merge pull request #247 from colega/revert-237-user-and-org-labels-on…
bboreham 3f828e5
server: Expose `http` and `grpc` listen addresses.
kavirajk 3b30dcd
Merge pull request #249 from kavirajk/kavirajk/expose-listener-addr
bboreham 6bf99cf
Bugfix server tcp metrics to use the configured registry or the defau…
ssncferreira d6fd6c9
Merge pull request #250 from ssncferreira/server_tcp_metrics_fix
bboreham 1b27f9b
Fix incorrect import of obsolete github.com/go-kit/kit/log package
hairyhenderson 54029b5
Merge pull request #253 from hairyhenderson/fix-incorrect-go-kit-kit-…
bboreham 9f7a500
httpgrpc/server: Update NewClient to not use WithBalancerName
jpkrohling 99c5e0f
Fix 'make protos'
bboreham 60635c8
Merge pull request #258 from weaveworks/update-build
stefanprodan ac27843
Merge pull request #254 from jpkrohling/jpkrohling/issue239
bboreham 3f07cc7
Implement `http.Flusher` interface on Log middleware (#257)
leizor 9034106
Allow config of TLS cipher suites and min version (#256)
bboreham 857aaa8
Tweak TLS server option help text
bboreham 8643608
Merge pull request #259 from weaveworks/tls-text
bboreham 561ca94
Reproducable httpgrpc.pb.go build
krajorama 719ed66
Merge pull request #264 from krajorama/reproducable-proto-build
bboreham 2f34232
Make gogo.proto import vendoring agnostic
krajorama 57a5767
Merge pull request #265 from krajorama/vendoring-agnostic-proto-import
bboreham b93bf2a
Updated prometheus/exporter-toolkit to v0.8.1
rabenhorst 92c1133
Fixed tests
rabenhorst d1f6500
Merge pull request #262 from rabenhorst/prometheus-exporter-toolkit-v…
bboreham a09fae5
Use ChainInterceptor from upstream grpc
bboreham 9dd9f9e
Small testcode lint fixes (#269)
krajorama d13f98b
Merge pull request #273 from weaveworks/grpc-chain
bboreham 404af97
server test: don't compare error for exact equality
bboreham 4ae107a
server: remove unused fields from Client struct
bboreham 5c70511
replace deprecated 'grpc.WithInsecure'
bboreham b8f0466
middleware: fix lint complaint about buf.String
bboreham 642d5cf
miscelaneous lint fixes
bboreham 2735988
server: check error before closing connection
bboreham c19e0bf
Log middleware now accepts a list of headers to exclude
jesusvazquez 5f00517
Merge pull request #277 from jesusvazquez/jvp/allow-to-set-more-exclu…
bboreham 0518cf5
Enable native histograms for the request_duration_seconds histogram
beorn7 9cc61f5
Merge pull request #280 from beorn7/native-histograms
bboreham 57181cc
update grpc
alanprot dbbca1f
Merge pull request #281 from alanprot/update-grpc
bboreham d3f132e
Merge pull request #275 from weaveworks/lint-cleanup
bboreham c01ae0b
Add Unwrap method to http.ResponseWriter implementations. (#283)
pstibrany 6458b3d
Add description to command line flags (#287)
krajorama 145055d
Add support to route both GRPC and HTTP over the HTTP server (#288)
joe-elliott 02fefc0
Make DisableRequestSuccessLog configurable. (#284)
DylanGuedes c0dd3cf
Allow users to manually register metrics
thampiotr dd60ed3
Clean up some linter warnings
thampiotr ff58c64
Merge pull request #289 from thampiotr/reuse-existing-metrics
bboreham 2d005b2
grpc: use errors.Is to check if error is Canceled
bboreham 2a90e0c
Merge pull request #292 from weaveworks/grpc-is-canceled
bboreham 24cb817
Make gRPC logging optional via a custom interface (#299)
bboreham 7dc4c19
Add provenance and license comments to files migrated from weaveworks…
charleskorn ab37e55
Merge branch 'weaveworks-common' into charleskorn/migrate-weaveworks-…
charleskorn ab45576
Update imports to match new package paths
charleskorn 3cccf5b
Fix linting issues.
charleskorn 062ea8d
Fix package paths in protobuf descriptors and regenerate with gogo/pr…
charleskorn bc7854c
Fix linting issues in migrated code.
charleskorn cf8bdc1
Remove dependency on deprecated package
charleskorn 2ea3a37
Replace use of `golang.org/x/net/context` with `context`
charleskorn 273c830
Replace use of `prometheus` package with `promauto` where possible
charleskorn 0e1e573
Add changelog entry.
charleskorn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ vendor | |
.idea | ||
.vscode | ||
.DS_Store | ||
server/certs/*.key | ||
server/certs/*.crt | ||
server/certs/*.csr | ||
server/certs/*.srl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/errors/error.go | ||
// Provenance-includes-license: Apache-2.0 | ||
// Provenance-includes-copyright: Weaveworks Ltd. | ||
|
||
package errors | ||
|
||
// Error see https://dave.cheney.net/2016/04/07/constant-errors. | ||
type Error string | ||
|
||
func (e Error) Error() string { return string(e) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be replaced by the Go standard library
errors.New
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interests of keeping this migration as simple as possible, I'd like to keep this for now, but I'll come back and review this separately afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#343