From 2d6b9a69c77eb3422260acec80f20b5fa6547fc3 Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Fri, 4 Aug 2023 11:02:32 +1000 Subject: [PATCH] Upgrade dskit to remove dependency on weaveworks/common See https://github.com/grafana/dskit/pull/342. --- cmd/tempo-cli/cmd-query-search.go | 2 +- cmd/tempo-query/tempo/plugin.go | 2 +- cmd/tempo-serverless/cloud-run/go.mod | 3 +- cmd/tempo-serverless/cloud-run/go.sum | 52 +-- cmd/tempo-serverless/handler.go | 2 +- cmd/tempo-serverless/lambda/go.mod | 3 +- cmd/tempo-serverless/lambda/go.sum | 52 +-- cmd/tempo/app/app.go | 6 +- cmd/tempo/app/config.go | 2 +- cmd/tempo/app/fake_auth.go | 4 +- cmd/tempo/app/http.go | 2 +- cmd/tempo/app/modules.go | 4 +- cmd/tempo/app/server_service.go | 2 +- cmd/tempo/main.go | 6 +- go.mod | 3 +- go.sum | 27 +- integration/e2e/receivers_test.go | 2 +- modules/distributor/distributor.go | 6 +- modules/distributor/distributor_test.go | 6 +- .../forwarder/otlpgrpc/forwarder.go | 2 +- .../forwarder/otlpgrpc/forwarder_test.go | 2 +- modules/distributor/queue/queue.go | 2 +- modules/distributor/receiver/middleware.go | 2 +- .../distributor/receiver/middleware_test.go | 2 +- modules/distributor/receiver/shim.go | 6 +- modules/frontend/frontend.go | 2 +- modules/frontend/handler.go | 8 +- modules/frontend/retry.go | 2 +- modules/frontend/retry_test.go | 2 +- modules/frontend/search_streaming_test.go | 2 +- modules/frontend/searchsharding.go | 2 +- modules/frontend/searchsharding_test.go | 2 +- modules/frontend/tracebyidsharding.go | 2 +- modules/frontend/tracebyidsharding_test.go | 2 +- modules/frontend/transport/roundtripper.go | 4 +- modules/frontend/v1/frontend.go | 2 +- .../frontend/v1/frontendv1pb/frontend.pb.go | 2 +- .../frontend/v1/frontendv1pb/frontend.proto | 4 +- modules/frontend/v1/request_batch.go | 2 +- modules/frontend/v1/request_batch_test.go | 2 +- modules/generator/client/client.go | 2 +- modules/generator/generator.go | 2 +- modules/generator/storage/config_util.go | 2 +- modules/generator/storage/instance_test.go | 2 +- modules/ingester/client/client.go | 2 +- modules/ingester/flush.go | 2 +- modules/ingester/ingester.go | 2 +- modules/ingester/ingester_search.go | 2 +- modules/ingester/ingester_test.go | 2 +- modules/ingester/instance_search.go | 2 +- modules/ingester/instance_search_test.go | 2 +- modules/ingester/instance_test.go | 2 +- .../overrides/user_configurable_overrides.go | 2 +- modules/overrides/userconfigurableapi/http.go | 2 +- .../userconfigurableapi/http_test.go | 2 +- modules/querier/external/client.go | 2 +- modules/querier/external/client_test.go | 2 +- modules/querier/querier.go | 4 +- modules/querier/querier_test.go | 2 +- modules/querier/worker/frontend_processor.go | 2 +- .../querier/worker/frontend_processor_test.go | 2 +- modules/querier/worker/worker.go | 2 +- pkg/cache/memcached.go | 2 +- pkg/cache/redis_cache.go | 2 +- pkg/server/internal_server.go | 2 +- pkg/util/httpgrpcutil/carrier.go | 2 +- pkg/util/log/log.go | 6 +- pkg/util/log/wrappers.go | 2 +- pkg/util/trace_info.go | 2 +- pkg/util/tracing.go | 2 +- .../github.com/grafana/dskit/errors/error.go | 10 + .../dskit/grpcclient/instrumentation.go | 3 +- .../grpc => grafana/dskit/grpcutil}/cancel.go | 9 +- .../dskit}/httpgrpc/README.md | 0 .../dskit}/httpgrpc/httpgrpc.go | 4 + .../dskit}/httpgrpc/httpgrpc.pb.go | 114 ++++-- .../dskit}/httpgrpc/httpgrpc.proto | 1 - .../dskit}/httpgrpc/server/server.go | 20 +- .../grafana/dskit/httpgrpc/tools.go | 10 + .../dskit}/instrument/instrument.go | 39 +- .../grafana/dskit/kv/consul/client.go | 3 +- .../grafana/dskit/kv/consul/metrics.go | 3 +- vendor/github.com/grafana/dskit/kv/metrics.go | 5 +- .../github.com/grafana/dskit/log/buffered.go | 159 ++++++++ .../logging => grafana/dskit/log}/format.go | 8 +- .../logging => grafana/dskit/log}/global.go | 6 +- .../logging => grafana/dskit/log}/gokit.go | 6 +- .../dskit/log}/interface.go | 6 +- .../logging => grafana/dskit/log}/level.go | 8 +- .../logging => grafana/dskit/log}/logging.go | 6 +- .../logging => grafana/dskit/log}/logrus.go | 6 +- vendor/github.com/grafana/dskit/log/noop.go | 27 ++ .../dskit}/middleware/counting_listener.go | 4 + .../dskit}/middleware/errorhandler.go | 4 + .../dskit}/middleware/grpc_auth.go | 11 +- .../dskit}/middleware/grpc_instrumentation.go | 11 +- .../dskit}/middleware/grpc_logging.go | 28 +- .../dskit}/middleware/grpc_stats.go | 4 + .../dskit}/middleware/header_adder.go | 4 + .../dskit}/middleware/http_auth.go | 6 +- .../dskit}/middleware/http_tracing.go | 4 + .../dskit}/middleware/instrument.go | 17 +- .../dskit}/middleware/logging.go | 56 ++- .../dskit}/middleware/middleware.go | 4 + .../dskit}/middleware/path_rewrite.go | 4 + .../dskit}/middleware/response.go | 10 +- .../dskit}/middleware/source_ips.go | 4 + .../grafana/dskit/ring/client/pool.go | 2 +- .../dskit}/server/fake_server.pb.go | 384 ++++++++++++++++-- .../dskit}/server/fake_server.proto | 2 - .../grafana/dskit/server/metrics.go | 67 +++ .../common => grafana/dskit}/server/server.go | 165 ++++---- .../dskit}/server/tls_config.go | 4 + .../dskit}/signals/signals.go | 14 +- .../grafana/dskit/tenant/resolver.go | 2 +- .../github.com/grafana/dskit/tenant/tenant.go | 2 +- .../dskit}/tracing/tracing.go | 4 + .../common => grafana/dskit}/user/grpc.go | 7 +- .../common => grafana/dskit}/user/http.go | 7 +- .../common => grafana/dskit}/user/id.go | 8 +- .../common => grafana/dskit}/user/logging.go | 10 +- .../weaveworks/common/COPYING.LGPL-3 | 175 -------- vendor/github.com/weaveworks/common/LICENSE | 191 --------- vendor/github.com/weaveworks/common/NOTICE | 3 - .../weaveworks/common/errors/error.go | 6 - .../weaveworks/common/httpgrpc/tools.go | 6 - .../weaveworks/common/logging/noop.go | 23 -- vendor/modules.txt | 25 +- 128 files changed, 1115 insertions(+), 924 deletions(-) create mode 100644 vendor/github.com/grafana/dskit/errors/error.go rename vendor/github.com/{weaveworks/common/grpc => grafana/dskit/grpcutil}/cancel.go (55%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/httpgrpc/README.md (100%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/httpgrpc/httpgrpc.go (87%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/httpgrpc/httpgrpc.pb.go (89%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/httpgrpc/httpgrpc.proto (92%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/httpgrpc/server/server.go (91%) create mode 100644 vendor/github.com/grafana/dskit/httpgrpc/tools.go rename vendor/github.com/{weaveworks/common => grafana/dskit}/instrument/instrument.go (79%) create mode 100644 vendor/github.com/grafana/dskit/log/buffered.go rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/format.go (83%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/global.go (87%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/gokit.go (92%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/interface.go (76%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/level.go (90%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/logging.go (76%) rename vendor/github.com/{weaveworks/common/logging => grafana/dskit/log}/logrus.go (86%) create mode 100644 vendor/github.com/grafana/dskit/log/noop.go rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/counting_listener.go (82%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/errorhandler.go (92%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/grpc_auth.go (85%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/grpc_instrumentation.go (92%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/grpc_logging.go (63%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/grpc_stats.go (91%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/header_adder.go (71%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/http_auth.go (66%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/http_tracing.go (86%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/instrument.go (87%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/logging.go (69%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/middleware.go (81%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/path_rewrite.go (87%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/response.go (90%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/middleware/source_ips.go (95%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/server/fake_server.pb.go (53%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/server/fake_server.proto (90%) create mode 100644 vendor/github.com/grafana/dskit/server/metrics.go rename vendor/github.com/{weaveworks/common => grafana/dskit}/server/server.go (81%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/server/tls_config.go (87%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/signals/signals.go (78%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/tracing/tracing.go (92%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/user/grpc.go (85%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/user/http.go (91%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/user/id.go (86%) rename vendor/github.com/{weaveworks/common => grafana/dskit}/user/logging.go (50%) delete mode 100644 vendor/github.com/weaveworks/common/COPYING.LGPL-3 delete mode 100644 vendor/github.com/weaveworks/common/LICENSE delete mode 100644 vendor/github.com/weaveworks/common/NOTICE delete mode 100644 vendor/github.com/weaveworks/common/errors/error.go delete mode 100644 vendor/github.com/weaveworks/common/httpgrpc/tools.go delete mode 100644 vendor/github.com/weaveworks/common/logging/noop.go diff --git a/cmd/tempo-cli/cmd-query-search.go b/cmd/tempo-cli/cmd-query-search.go index 7d9aa9e9fcb..b406c7c872e 100644 --- a/cmd/tempo-cli/cmd-query-search.go +++ b/cmd/tempo-cli/cmd-query-search.go @@ -5,8 +5,8 @@ import ( "io" "time" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/tempopb" - "github.com/weaveworks/common/user" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/cmd/tempo-query/tempo/plugin.go b/cmd/tempo-query/tempo/plugin.go index 90450ad179c..9d295c6b8bb 100644 --- a/cmd/tempo-query/tempo/plugin.go +++ b/cmd/tempo-query/tempo/plugin.go @@ -16,10 +16,10 @@ import ( "github.com/go-logfmt/logfmt" "github.com/gogo/protobuf/jsonpb" tlsCfg "github.com/grafana/dskit/crypto/tls" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/tempopb" "github.com/opentracing/opentracing-go" ot_log "github.com/opentracing/opentracing-go/log" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/pdata/ptrace" "google.golang.org/grpc/metadata" diff --git a/cmd/tempo-serverless/cloud-run/go.mod b/cmd/tempo-serverless/cloud-run/go.mod index 32e03fb72a7..6941ea7154d 100644 --- a/cmd/tempo-serverless/cloud-run/go.mod +++ b/cmd/tempo-serverless/cloud-run/go.mod @@ -55,7 +55,7 @@ require ( github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 // indirect + github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 // indirect github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -114,7 +114,6 @@ require ( github.com/uber-go/atomic v1.4.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/weaveworks/common v0.0.0-20230511094633-334485600903 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/willf/bitset v1.1.11 // indirect github.com/willf/bloom v2.0.3+incompatible // indirect diff --git a/cmd/tempo-serverless/cloud-run/go.sum b/cmd/tempo-serverless/cloud-run/go.sum index 76fb1d3eccd..9dc0f146106 100644 --- a/cmd/tempo-serverless/cloud-run/go.sum +++ b/cmd/tempo-serverless/cloud-run/go.sum @@ -431,7 +431,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= @@ -442,8 +441,6 @@ github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.18.1 h1:lNhK/1nqjbwbiOPDBPFJVKxgDEGSepKuTh6OLiXW8kg= github.com/apache/thrift v0.18.1/go.mod h1:rdQn/dCcDKEWjjylUeueum4vQEjG2v8v2PqriUnbr+I= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.220 h1:yAj99qAt0Htjle9Up3DglgHfOP77lmFPrElA4jKnrBo= github.com/aws/aws-sdk-go v1.44.220/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -457,7 +454,6 @@ github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91 github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -470,7 +466,6 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -509,13 +504,10 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= @@ -523,14 +515,11 @@ github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -638,11 +627,10 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 h1:cpwAHjmCSEjo67r8cmqqZQHa6jOFAujXel8hY7fZRgw= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2/go.mod h1:M03k2fzuQ2n9TVE1xfVKTESibxsXdw0wYfWT3+9Owp4= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 h1:W1g+y6rOO7K/Jm2XNPxIXyJisJSJ25uiVVaSa7N1Zwo= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934/go.mod h1:Xg0aN3EpqkYFW1ZxGyIl4BGEpr3QrCQOM1aWalpU3ik= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 h1:WB3bGH2f1UN6jkd6uAEWfHB8OD7dKJ0v2Oo6SNfhpfQ= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -666,7 +654,6 @@ github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7P github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -675,14 +662,11 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= @@ -692,7 +676,6 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -705,11 +688,9 @@ github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuz github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= @@ -717,7 +698,6 @@ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= @@ -751,10 +731,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.74.0/go.mod h1:TEu3TnUv1TuyHtjllrUDQ/ImpyD+GrkDejZv4hxl3G8= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.74.0 h1:ww1pPXfAM0WHsymQnsN+s4B9DgwQC+GyoBq0t27JV/k= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.74.0/go.mod h1:OpEw7tyCg+iG1ywEgZ03qe5sP/8fhYdtWCMoqA8JCug= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -779,24 +757,16 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= github.com/prometheus/exporter-toolkit v0.8.2 h1:sbJAfBXQFkG6sUkbwBun8MNdzW9+wd5YfPYofbmj0YM= @@ -804,9 +774,6 @@ github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyN github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= @@ -827,7 +794,6 @@ github.com/sercand/kuberesolver/v4 v4.0.0 h1:frL7laPDG/lFm5n98ODmWnn+cvPpzlkf3Lh github.com/sercand/kuberesolver/v4 v4.0.0/go.mod h1:F4RGyuRmMAjeXHKL+w4P7AwUnPceEAPAhxUgXZjKgvM= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= @@ -869,14 +835,10 @@ github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903 h1:ph7R2CS/0o1gBzpzK/CioUKJVsXNVXfDGR8FZ9rMZIw= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903/go.mod h1:rgbeLfJUtEr+G74cwFPR1k/4N0kDeaeSv/qhUNE4hm8= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= @@ -910,7 +872,6 @@ go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+go go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= @@ -934,7 +895,6 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1017,7 +977,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1113,7 +1072,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1121,7 +1079,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1132,7 +1089,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1145,7 +1101,6 @@ golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1199,7 +1154,6 @@ golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1213,7 +1167,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1479,7 +1432,6 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/cmd/tempo-serverless/handler.go b/cmd/tempo-serverless/handler.go index 8d447225062..9bf8ded8034 100644 --- a/cmd/tempo-serverless/handler.go +++ b/cmd/tempo-serverless/handler.go @@ -12,10 +12,10 @@ import ( "github.com/google/uuid" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/user" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" "github.com/spf13/viper" - "github.com/weaveworks/common/user" "gopkg.in/yaml.v2" "github.com/grafana/tempo/pkg/api" diff --git a/cmd/tempo-serverless/lambda/go.mod b/cmd/tempo-serverless/lambda/go.mod index 1b4977f0f51..4c3d2e7b6fe 100644 --- a/cmd/tempo-serverless/lambda/go.mod +++ b/cmd/tempo-serverless/lambda/go.mod @@ -58,7 +58,7 @@ require ( github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 // indirect + github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 // indirect github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -118,7 +118,6 @@ require ( github.com/uber-go/atomic v1.4.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/weaveworks/common v0.0.0-20230511094633-334485600903 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/willf/bitset v1.1.11 // indirect github.com/willf/bloom v2.0.3+incompatible // indirect diff --git a/cmd/tempo-serverless/lambda/go.sum b/cmd/tempo-serverless/lambda/go.sum index 84faebc2f9b..e8811207805 100644 --- a/cmd/tempo-serverless/lambda/go.sum +++ b/cmd/tempo-serverless/lambda/go.sum @@ -431,7 +431,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= @@ -442,10 +441,8 @@ github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.18.1 h1:lNhK/1nqjbwbiOPDBPFJVKxgDEGSepKuTh6OLiXW8kg= github.com/apache/thrift v0.18.1/go.mod h1:rdQn/dCcDKEWjjylUeueum4vQEjG2v8v2PqriUnbr+I= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-lambda-go v1.28.0 h1:fZiik1PZqW2IyAN4rj+Y0UBaO1IDFlsNo9Zz/XnArK4= github.com/aws/aws-lambda-go v1.28.0/go.mod h1:jJmlefzPfGnckuHdXX7/80O3BvUUi12XOkbv4w9SGLU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.220 h1:yAj99qAt0Htjle9Up3DglgHfOP77lmFPrElA4jKnrBo= github.com/aws/aws-sdk-go v1.44.220/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -459,7 +456,6 @@ github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91 github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -472,7 +468,6 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -513,13 +508,10 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= @@ -527,14 +519,11 @@ github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -642,11 +631,10 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 h1:cpwAHjmCSEjo67r8cmqqZQHa6jOFAujXel8hY7fZRgw= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2/go.mod h1:M03k2fzuQ2n9TVE1xfVKTESibxsXdw0wYfWT3+9Owp4= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 h1:W1g+y6rOO7K/Jm2XNPxIXyJisJSJ25uiVVaSa7N1Zwo= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934/go.mod h1:Xg0aN3EpqkYFW1ZxGyIl4BGEpr3QrCQOM1aWalpU3ik= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 h1:WB3bGH2f1UN6jkd6uAEWfHB8OD7dKJ0v2Oo6SNfhpfQ= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -670,7 +658,6 @@ github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7P github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -679,14 +666,11 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= @@ -696,7 +680,6 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -709,11 +692,9 @@ github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuz github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= @@ -721,7 +702,6 @@ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= @@ -755,10 +735,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.74.0/go.mod h1:TEu3TnUv1TuyHtjllrUDQ/ImpyD+GrkDejZv4hxl3G8= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.74.0 h1:ww1pPXfAM0WHsymQnsN+s4B9DgwQC+GyoBq0t27JV/k= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.74.0/go.mod h1:OpEw7tyCg+iG1ywEgZ03qe5sP/8fhYdtWCMoqA8JCug= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -784,24 +762,16 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= github.com/prometheus/exporter-toolkit v0.8.2 h1:sbJAfBXQFkG6sUkbwBun8MNdzW9+wd5YfPYofbmj0YM= @@ -809,9 +779,6 @@ github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyN github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= @@ -834,7 +801,6 @@ github.com/sercand/kuberesolver/v4 v4.0.0/go.mod h1:F4RGyuRmMAjeXHKL+w4P7AwUnPce github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= @@ -877,15 +843,11 @@ github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903 h1:ph7R2CS/0o1gBzpzK/CioUKJVsXNVXfDGR8FZ9rMZIw= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903/go.mod h1:rgbeLfJUtEr+G74cwFPR1k/4N0kDeaeSv/qhUNE4hm8= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= @@ -919,7 +881,6 @@ go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+go go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= @@ -943,7 +904,6 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1026,7 +986,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1122,7 +1081,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1130,7 +1088,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1141,7 +1098,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1154,7 +1110,6 @@ golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1208,7 +1163,6 @@ golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1222,7 +1176,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1488,7 +1441,6 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/cmd/tempo/app/app.go b/cmd/tempo/app/app.go index bf5d70d8204..e33e87abe02 100644 --- a/cmd/tempo/app/app.go +++ b/cmd/tempo/app/app.go @@ -13,16 +13,16 @@ import ( "github.com/gorilla/mux" "github.com/grafana/dskit/grpcutil" "github.com/grafana/dskit/kv/memberlist" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/modules" "github.com/grafana/dskit/ring" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/signals" "github.com/jedib0t/go-pretty/v6/table" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/version" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/server" - "github.com/weaveworks/common/signals" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" "gopkg.in/yaml.v3" diff --git a/cmd/tempo/app/config.go b/cmd/tempo/app/config.go index 7e1ece0e806..d8221488618 100644 --- a/cmd/tempo/app/config.go +++ b/cmd/tempo/app/config.go @@ -7,8 +7,8 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv/memberlist" + "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/server" "github.com/grafana/tempo/modules/compactor" "github.com/grafana/tempo/modules/distributor" diff --git a/cmd/tempo/app/fake_auth.go b/cmd/tempo/app/fake_auth.go index 810950ddebe..055e2382de4 100644 --- a/cmd/tempo/app/fake_auth.go +++ b/cmd/tempo/app/fake_auth.go @@ -4,9 +4,9 @@ import ( "context" "net/http" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/util" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "google.golang.org/grpc" ) diff --git a/cmd/tempo/app/http.go b/cmd/tempo/app/http.go index 9426cf6844b..6744bb34c36 100644 --- a/cmd/tempo/app/http.go +++ b/cmd/tempo/app/http.go @@ -3,8 +3,8 @@ package app import ( "net/http" + "github.com/grafana/dskit/middleware" "github.com/klauspost/compress/gzhttp" - "github.com/weaveworks/common/middleware" ) func httpGzipMiddleware() middleware.Interface { diff --git a/cmd/tempo/app/modules.go b/cmd/tempo/app/modules.go index 13578d35ad0..84e5d0a2d58 100644 --- a/cmd/tempo/app/modules.go +++ b/cmd/tempo/app/modules.go @@ -10,15 +10,15 @@ import ( "github.com/grafana/dskit/dns" "github.com/grafana/dskit/kv/codec" "github.com/grafana/dskit/kv/memberlist" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/modules" "github.com/grafana/dskit/ring" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/server" "github.com/grafana/tempo/modules/compactor" "github.com/grafana/tempo/modules/distributor" diff --git a/cmd/tempo/app/server_service.go b/cmd/tempo/app/server_service.go index 73a9198487e..34adf898d79 100644 --- a/cmd/tempo/app/server_service.go +++ b/cmd/tempo/app/server_service.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/go-kit/log/level" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" - "github.com/weaveworks/common/server" util_log "github.com/grafana/tempo/pkg/util/log" ) diff --git a/cmd/tempo/main.go b/cmd/tempo/main.go index c499c754c23..52d2956a4e2 100644 --- a/cmd/tempo/main.go +++ b/cmd/tempo/main.go @@ -13,12 +13,12 @@ import ( "github.com/drone/envsubst" "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + dslog "github.com/grafana/dskit/log" + "github.com/grafana/dskit/tracing" ot "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/version" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/tracing" oc "go.opencensus.io/trace" "go.opentelemetry.io/otel" oc_bridge "go.opentelemetry.io/otel/bridge/opencensus" @@ -67,7 +67,7 @@ func main() { } // Init the logger which will honor the log level set in config.Server - if reflect.DeepEqual(&config.Server.LogLevel, &logging.Level{}) { + if reflect.DeepEqual(&config.Server.LogLevel, &dslog.Level{}) { level.Error(log.Logger).Log("msg", "invalid log level") os.Exit(1) } diff --git a/go.mod b/go.mod index 31bb1c16a20..f0c6fc1f9d4 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 - github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 + github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 github.com/grafana/e2e v0.1.1-0.20221018202458-cffd2bb71c7b github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 github.com/hashicorp/go-hclog v1.4.0 @@ -66,7 +66,6 @@ require ( github.com/stretchr/testify v1.8.4 github.com/uber-go/atomic v1.4.0 github.com/uber/jaeger-client-go v2.30.0+incompatible - github.com/weaveworks/common v0.0.0-20230511094633-334485600903 github.com/willf/bloom v2.0.3+incompatible go.opencensus.io v0.24.0 go.opentelemetry.io/collector v0.74.0 diff --git a/go.sum b/go.sum index ded52794d43..2e3848a6ccc 100644 --- a/go.sum +++ b/go.sum @@ -467,11 +467,9 @@ github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8 github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.220 h1:yAj99qAt0Htjle9Up3DglgHfOP77lmFPrElA4jKnrBo= @@ -529,7 +527,6 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b h1:ACGZRIr7HsgBKHsueQ1yM4WaVaXh21ynwqsF8M8tXhA= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -695,14 +692,11 @@ github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3K github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -819,14 +813,13 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gophercloud/gophercloud v1.0.0 h1:9nTGx0jizmHxDobe4mck89FyQHVyA3CaXLIUSGJjP9k= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 h1:cpwAHjmCSEjo67r8cmqqZQHa6jOFAujXel8hY7fZRgw= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2/go.mod h1:M03k2fzuQ2n9TVE1xfVKTESibxsXdw0wYfWT3+9Owp4= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 h1:W1g+y6rOO7K/Jm2XNPxIXyJisJSJ25uiVVaSa7N1Zwo= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934/go.mod h1:Xg0aN3EpqkYFW1ZxGyIl4BGEpr3QrCQOM1aWalpU3ik= github.com/grafana/e2e v0.1.1-0.20221018202458-cffd2bb71c7b h1:Ha+kSIoTutf4ytlVw/SaEclDUloYx0+FXDKJWKhNbE4= github.com/grafana/e2e v0.1.1-0.20221018202458-cffd2bb71c7b/go.mod h1:3UsooRp7yW5/NJQBlXcTsAHOoykEhNUYXkQ3r6ehEEY= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 h1:WB3bGH2f1UN6jkd6uAEWfHB8OD7dKJ0v2Oo6SNfhpfQ= @@ -944,7 +937,6 @@ github.com/jedib0t/go-pretty/v6 v6.2.4 h1:wdaj2KHD2W+mz8JgJ/Q6L/T5dB7kyqEFI16eLq github.com/jedib0t/go-pretty/v6 v6.2.4/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -970,7 +962,6 @@ github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4d github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -1024,7 +1015,6 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= @@ -1038,7 +1028,6 @@ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= @@ -1127,10 +1116,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20220512140940-7b36cea86235 h1:DxS3bbeUSCpMQr3mTez5PIDrS+yBeBsoDsftOhqB1Fg= github.com/opencontainers/image-spec v1.0.3-0.20220512140940-7b36cea86235/go.mod h1:K/JAU0m27RFhDRX4PcFdIKntROP6y5Ed6O91aZYDQfs= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1177,14 +1164,12 @@ github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1315,15 +1300,11 @@ github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903 h1:ph7R2CS/0o1gBzpzK/CioUKJVsXNVXfDGR8FZ9rMZIw= -github.com/weaveworks/common v0.0.0-20230511094633-334485600903/go.mod h1:rgbeLfJUtEr+G74cwFPR1k/4N0kDeaeSv/qhUNE4hm8= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= @@ -1432,7 +1413,6 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= @@ -1468,7 +1448,6 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1772,7 +1751,6 @@ golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1791,7 +1769,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= diff --git a/integration/e2e/receivers_test.go b/integration/e2e/receivers_test.go index e86b0b113b7..eb45c3cb50f 100644 --- a/integration/e2e/receivers_test.go +++ b/integration/e2e/receivers_test.go @@ -5,12 +5,12 @@ import ( crand "crypto/rand" "testing" + "github.com/grafana/dskit/user" "github.com/grafana/e2e" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configgrpc" diff --git a/modules/distributor/distributor.go b/modules/distributor/distributor.go index 4fd86ffea60..5e9c6be3af9 100644 --- a/modules/distributor/distributor.go +++ b/modules/distributor/distributor.go @@ -12,17 +12,17 @@ import ( "github.com/go-kit/log/level" "github.com/gogo/status" "github.com/grafana/dskit/limiter" + dslog "github.com/grafana/dskit/log" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/util/strutil" "github.com/segmentio/fasthash/fnv1a" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/pdata/ptrace" "google.golang.org/grpc/codes" "google.golang.org/grpc/health/grpc_health_v1" @@ -142,7 +142,7 @@ type Distributor struct { } // New a distributor creates. -func New(cfg Config, clientCfg ingester_client.Config, ingestersRing ring.ReadRing, generatorClientCfg generator_client.Config, generatorsRing ring.ReadRing, o overrides.Interface, middleware receiver.Middleware, logger log.Logger, loggingLevel logging.Level, reg prometheus.Registerer) (*Distributor, error) { +func New(cfg Config, clientCfg ingester_client.Config, ingestersRing ring.ReadRing, generatorClientCfg generator_client.Config, generatorsRing ring.ReadRing, o overrides.Interface, middleware receiver.Middleware, logger log.Logger, loggingLevel dslog.Level, reg prometheus.Registerer) (*Distributor, error) { factory := cfg.factory if factory == nil { factory = func(addr string) (ring_client.PoolClient, error) { diff --git a/modules/distributor/distributor_test.go b/modules/distributor/distributor_test.go index f6b5028e852..8c14db8988c 100644 --- a/modules/distributor/distributor_test.go +++ b/modules/distributor/distributor_test.go @@ -19,13 +19,13 @@ import ( "github.com/golang/protobuf/proto" // nolint: all //ProtoReflect "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv" + dslog "github.com/grafana/dskit/log" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/pdata/ptrace" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -1155,7 +1155,7 @@ func prepare(t *testing.T, limits *overrides.Limits, kvStore kv.Client, logger l return ingesters[addr], nil } - l := logging.Level{} + l := dslog.Level{} _ = l.Set("error") mw := receiver.MultiTenancyMiddleware() d, err := New(distributorConfig, clientConfig, ingestersRing, generator_client.Config{}, nil, overrides, mw, logger, l, prometheus.NewPedanticRegistry()) diff --git a/modules/distributor/forwarder/otlpgrpc/forwarder.go b/modules/distributor/forwarder/otlpgrpc/forwarder.go index b6967783d7e..e95e1562149 100644 --- a/modules/distributor/forwarder/otlpgrpc/forwarder.go +++ b/modules/distributor/forwarder/otlpgrpc/forwarder.go @@ -6,11 +6,11 @@ import ( "sync" "github.com/go-kit/log" + "github.com/grafana/dskit/middleware" grpcmw "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" - "github.com/weaveworks/common/middleware" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "go.uber.org/multierr" diff --git a/modules/distributor/forwarder/otlpgrpc/forwarder_test.go b/modules/distributor/forwarder/otlpgrpc/forwarder_test.go index df59a3ce313..feb9d5525d7 100644 --- a/modules/distributor/forwarder/otlpgrpc/forwarder_test.go +++ b/modules/distributor/forwarder/otlpgrpc/forwarder_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/go-kit/log" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "go.uber.org/atomic" diff --git a/modules/distributor/queue/queue.go b/modules/distributor/queue/queue.go index 796de150e1a..b3997f2b58c 100644 --- a/modules/distributor/queue/queue.go +++ b/modules/distributor/queue/queue.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/user" ) var ( diff --git a/modules/distributor/receiver/middleware.go b/modules/distributor/receiver/middleware.go index 99fe1e56a88..3dc11fbb9ae 100644 --- a/modules/distributor/receiver/middleware.go +++ b/modules/distributor/receiver/middleware.go @@ -3,7 +3,7 @@ package receiver import ( "context" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace" diff --git a/modules/distributor/receiver/middleware_test.go b/modules/distributor/receiver/middleware_test.go index 3d8c47d3fd8..3d503520851 100644 --- a/modules/distributor/receiver/middleware_test.go +++ b/modules/distributor/receiver/middleware_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace" diff --git a/modules/distributor/receiver/shim.go b/modules/distributor/receiver/shim.go index b70a001b82b..a9f482c6141 100644 --- a/modules/distributor/receiver/shim.go +++ b/modules/distributor/receiver/shim.go @@ -7,6 +7,7 @@ import ( "time" "github.com/go-kit/log/level" + dslog "github.com/grafana/dskit/log" "github.com/grafana/dskit/services" zaplogfmt "github.com/jsternberg/zap-logfmt" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver" @@ -17,7 +18,6 @@ import ( prom_client "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/sirupsen/logrus" - "github.com/weaveworks/common/logging" "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" @@ -95,7 +95,7 @@ func (m *mapProvider) Scheme() string { return "mock" } func (m *mapProvider) Shutdown(context.Context) error { return nil } -func New(receiverCfg map[string]interface{}, pusher TracesPusher, middleware Middleware, logLevel logging.Level) (services.Service, error) { +func New(receiverCfg map[string]interface{}, pusher TracesPusher, middleware Middleware, logLevel dslog.Level) (services.Service, error) { shim := &receiversShim{ pusher: pusher, logger: log.NewRateLimitedLogger(logsPerSecond, level.Error(log.Logger)), @@ -313,7 +313,7 @@ func (r *receiversShim) GetExporters() map[component.DataType]map[component.ID]c } // observability shims -func newLogger(level logging.Level) *zap.Logger { +func newLogger(level dslog.Level) *zap.Logger { zapLevel := zapcore.InfoLevel switch level.Logrus { diff --git a/modules/frontend/frontend.go b/modules/frontend/frontend.go index ae6ff1f3b79..3c256bed3dc 100644 --- a/modules/frontend/frontend.go +++ b/modules/frontend/frontend.go @@ -13,11 +13,11 @@ import ( "github.com/go-kit/log/level" "github.com/golang/protobuf/jsonpb" //nolint:all //deprecated "github.com/golang/protobuf/proto" //nolint:all //deprecated + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/api" diff --git a/modules/frontend/handler.go b/modules/frontend/handler.go index 59d3b5f07eb..fe66dcbf1dd 100644 --- a/modules/frontend/handler.go +++ b/modules/frontend/handler.go @@ -11,12 +11,12 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/httpgrpc/server" + "github.com/grafana/dskit/tracing" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/tracing" - "github.com/weaveworks/common/user" ) const ( diff --git a/modules/frontend/retry.go b/modules/frontend/retry.go index ce593a52ce3..6743b3d0d1b 100644 --- a/modules/frontend/retry.go +++ b/modules/frontend/retry.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" + "github.com/grafana/dskit/httpgrpc" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" ot_log "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" ) func newRetryWare(maxRetries int, registerer prometheus.Registerer) Middleware { diff --git a/modules/frontend/retry_test.go b/modules/frontend/retry_test.go index a800d413a8e..514afb098e6 100644 --- a/modules/frontend/retry_test.go +++ b/modules/frontend/retry_test.go @@ -7,9 +7,9 @@ import ( "net/http/httptest" "testing" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" ) diff --git a/modules/frontend/search_streaming_test.go b/modules/frontend/search_streaming_test.go index 4e5c2efabbc..af6af83814e 100644 --- a/modules/frontend/search_streaming_test.go +++ b/modules/frontend/search_streaming_test.go @@ -11,12 +11,12 @@ import ( "github.com/go-kit/log" "github.com/golang/protobuf/jsonpb" //nolint:all //deprecated "github.com/google/uuid" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/tempopb" "github.com/grafana/tempo/tempodb/backend" "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "google.golang.org/grpc/metadata" ) diff --git a/modules/frontend/searchsharding.go b/modules/frontend/searchsharding.go index 98ed320fbca..814af633e1a 100644 --- a/modules/frontend/searchsharding.go +++ b/modules/frontend/searchsharding.go @@ -13,10 +13,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gogo/protobuf/jsonpb" //nolint:all deprecated + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/api" diff --git a/modules/frontend/searchsharding_test.go b/modules/frontend/searchsharding_test.go index 746dccfd116..5e7dafebf03 100644 --- a/modules/frontend/searchsharding_test.go +++ b/modules/frontend/searchsharding_test.go @@ -18,10 +18,10 @@ import ( "github.com/go-kit/log" "github.com/golang/protobuf/jsonpb" //nolint:all deprecated "github.com/google/uuid" + "github.com/grafana/dskit/user" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "github.com/grafana/tempo/modules/overrides" diff --git a/modules/frontend/tracebyidsharding.go b/modules/frontend/tracebyidsharding.go index 55019687ddf..4eb4bf9f523 100644 --- a/modules/frontend/tracebyidsharding.go +++ b/modules/frontend/tracebyidsharding.go @@ -15,13 +15,13 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/golang/protobuf/proto" //nolint:all //deprecated + "github.com/grafana/dskit/user" "github.com/grafana/tempo/modules/querier" "github.com/grafana/tempo/pkg/api" "github.com/grafana/tempo/pkg/boundedwaitgroup" "github.com/grafana/tempo/pkg/model/trace" "github.com/grafana/tempo/pkg/tempopb" "github.com/opentracing/opentracing-go" - "github.com/weaveworks/common/user" ) const ( diff --git a/modules/frontend/tracebyidsharding_test.go b/modules/frontend/tracebyidsharding_test.go index bdcc342f21e..65667b5d895 100644 --- a/modules/frontend/tracebyidsharding_test.go +++ b/modules/frontend/tracebyidsharding_test.go @@ -15,12 +15,12 @@ import ( "github.com/go-kit/log" "github.com/gogo/protobuf/proto" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/model/trace" "github.com/grafana/tempo/pkg/tempopb" "github.com/grafana/tempo/pkg/util/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" ) diff --git a/modules/frontend/transport/roundtripper.go b/modules/frontend/transport/roundtripper.go index 583fc22d04a..8d899364955 100644 --- a/modules/frontend/transport/roundtripper.go +++ b/modules/frontend/transport/roundtripper.go @@ -6,8 +6,8 @@ import ( "io" "net/http" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/httpgrpc/server" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/httpgrpc/server" ) // GrpcRoundTripper is similar to http.RoundTripper, but works with HTTP requests converted to protobuf messages. diff --git a/modules/frontend/v1/frontend.go b/modules/frontend/v1/frontend.go index 12bf92ea644..72a5175c96f 100644 --- a/modules/frontend/v1/frontend.go +++ b/modules/frontend/v1/frontend.go @@ -9,13 +9,13 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" "github.com/grafana/tempo/modules/frontend/queue" "github.com/grafana/tempo/modules/frontend/v1/frontendv1pb" diff --git a/modules/frontend/v1/frontendv1pb/frontend.pb.go b/modules/frontend/v1/frontendv1pb/frontend.pb.go index cb043020d10..185045b43b0 100644 --- a/modules/frontend/v1/frontendv1pb/frontend.pb.go +++ b/modules/frontend/v1/frontendv1pb/frontend.pb.go @@ -11,7 +11,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - httpgrpc "github.com/weaveworks/common/httpgrpc" + httpgrpc "github.com/grafana/dskit/httpgrpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/modules/frontend/v1/frontendv1pb/frontend.proto b/modules/frontend/v1/frontendv1pb/frontend.proto index f24c983fac3..6d1b2a194b6 100644 --- a/modules/frontend/v1/frontendv1pb/frontend.proto +++ b/modules/frontend/v1/frontendv1pb/frontend.proto @@ -7,7 +7,7 @@ package frontend; option go_package = "frontendv1pb"; import "gogoproto/gogo.proto"; -import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; +import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -28,7 +28,7 @@ enum Type { } enum Feature { - NONE = 0; + NONE = 0; REQUEST_BATCHING = 1; } diff --git a/modules/frontend/v1/request_batch.go b/modules/frontend/v1/request_batch.go index d28d2ac2943..6aae745a20b 100644 --- a/modules/frontend/v1/request_batch.go +++ b/modules/frontend/v1/request_batch.go @@ -3,8 +3,8 @@ package v1 import ( "fmt" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/multierror" - "github.com/weaveworks/common/httpgrpc" ) type requestBatch struct { diff --git a/modules/frontend/v1/request_batch_test.go b/modules/frontend/v1/request_batch_test.go index b68c48e91f7..da4e8394a2e 100644 --- a/modules/frontend/v1/request_batch_test.go +++ b/modules/frontend/v1/request_batch_test.go @@ -5,9 +5,9 @@ import ( "sync" "testing" + "github.com/grafana/dskit/httpgrpc" "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" ) func TestRequestBatchBasics(t *testing.T) { diff --git a/modules/generator/client/client.go b/modules/generator/client/client.go index c05d3547279..f2ea99cc395 100644 --- a/modules/generator/client/client.go +++ b/modules/generator/client/client.go @@ -6,10 +6,10 @@ import ( "time" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/middleware" ring_client "github.com/grafana/dskit/ring/client" "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" "github.com/opentracing/opentracing-go" - "github.com/weaveworks/common/middleware" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/modules/generator/generator.go b/modules/generator/generator.go index d4c5f88f466..3dfec5a916d 100644 --- a/modules/generator/generator.go +++ b/modules/generator/generator.go @@ -13,9 +13,9 @@ import ( "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "github.com/grafana/tempo/modules/generator/storage" diff --git a/modules/generator/storage/config_util.go b/modules/generator/storage/config_util.go index 2e524cc5ae9..934a3e60dcd 100644 --- a/modules/generator/storage/config_util.go +++ b/modules/generator/storage/config_util.go @@ -5,8 +5,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/user" prometheus_config "github.com/prometheus/prometheus/config" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/pkg/util" ) diff --git a/modules/generator/storage/instance_test.go b/modules/generator/storage/instance_test.go index 8b1a1fca7cf..3d8e7bd4fb9 100644 --- a/modules/generator/storage/instance_test.go +++ b/modules/generator/storage/instance_test.go @@ -12,6 +12,7 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" prometheus_common_config "github.com/prometheus/common/config" "github.com/prometheus/common/model" @@ -22,7 +23,6 @@ import ( "github.com/prometheus/prometheus/storage/remote" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" ) diff --git a/modules/ingester/client/client.go b/modules/ingester/client/client.go index 04ccd76563c..0fb1b518602 100644 --- a/modules/ingester/client/client.go +++ b/modules/ingester/client/client.go @@ -6,10 +6,10 @@ import ( "time" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/middleware" ring_client "github.com/grafana/dskit/ring/client" "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" opentracing "github.com/opentracing/opentracing-go" - "github.com/weaveworks/common/middleware" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/modules/ingester/flush.go b/modules/ingester/flush.go index 0172309992a..0f603e1e2b7 100644 --- a/modules/ingester/flush.go +++ b/modules/ingester/flush.go @@ -12,6 +12,7 @@ import ( "github.com/go-kit/log/level" "github.com/google/uuid" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" ot "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" @@ -19,7 +20,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/uber/jaeger-client-go" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/pkg/util/log" ) diff --git a/modules/ingester/ingester.go b/modules/ingester/ingester.go index cdf1dc60a3b..c09140bbdbe 100644 --- a/modules/ingester/ingester.go +++ b/modules/ingester/ingester.go @@ -10,12 +10,12 @@ import ( "github.com/gogo/status" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" ot_log "github.com/opentracing/opentracing-go/log" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/user" "google.golang.org/grpc/codes" "github.com/grafana/tempo/modules/overrides" diff --git a/modules/ingester/ingester_search.go b/modules/ingester/ingester_search.go index 593fe100d2d..3bec734fa41 100644 --- a/modules/ingester/ingester_search.go +++ b/modules/ingester/ingester_search.go @@ -3,9 +3,9 @@ package ingester import ( "context" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/tempopb" "github.com/pkg/errors" - "github.com/weaveworks/common/user" ) func (i *Ingester) SearchRecent(ctx context.Context, req *tempopb.SearchRequest) (*tempopb.SearchResponse, error) { diff --git a/modules/ingester/ingester_test.go b/modules/ingester/ingester_test.go index 54181b5811e..8682d8cc42d 100644 --- a/modules/ingester/ingester_test.go +++ b/modules/ingester/ingester_test.go @@ -13,10 +13,10 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv/consul" "github.com/grafana/dskit/ring" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/modules/storage" diff --git a/modules/ingester/instance_search.go b/modules/ingester/instance_search.go index 2a8c1835b38..4a08a345a78 100644 --- a/modules/ingester/instance_search.go +++ b/modules/ingester/instance_search.go @@ -9,6 +9,7 @@ import ( "github.com/go-kit/log/level" "github.com/google/uuid" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/api" "github.com/grafana/tempo/pkg/boundedwaitgroup" "github.com/grafana/tempo/pkg/search" @@ -19,7 +20,6 @@ import ( "github.com/grafana/tempo/tempodb/encoding/common" "github.com/opentracing/opentracing-go" ot_log "github.com/opentracing/opentracing-go/log" - "github.com/weaveworks/common/user" "go.uber.org/atomic" ) diff --git a/modules/ingester/instance_search_test.go b/modules/ingester/instance_search_test.go index 6bfdc9e3d8b..1224f22ab51 100644 --- a/modules/ingester/instance_search_test.go +++ b/modules/ingester/instance_search_test.go @@ -12,10 +12,10 @@ import ( "time" "github.com/google/uuid" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber-go/atomic" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/model" diff --git a/modules/ingester/instance_test.go b/modules/ingester/instance_test.go index e0c7d1b0f74..8c04b9d9ea7 100644 --- a/modules/ingester/instance_test.go +++ b/modules/ingester/instance_test.go @@ -10,9 +10,9 @@ import ( "time" "github.com/google/uuid" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/modules/overrides" "github.com/grafana/tempo/pkg/model" diff --git a/modules/overrides/user_configurable_overrides.go b/modules/overrides/user_configurable_overrides.go index 827284e6296..77898fe2377 100644 --- a/modules/overrides/user_configurable_overrides.go +++ b/modules/overrides/user_configurable_overrides.go @@ -12,10 +12,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/tracing" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/tracing" "golang.org/x/exp/slices" "gopkg.in/yaml.v2" diff --git a/modules/overrides/userconfigurableapi/http.go b/modules/overrides/userconfigurableapi/http.go index aef228aed77..8a098b1eb0f 100644 --- a/modules/overrides/userconfigurableapi/http.go +++ b/modules/overrides/userconfigurableapi/http.go @@ -10,12 +10,12 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/go-kit/log/level" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" jsoniter "github.com/json-iterator/go" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" ot_log "github.com/opentracing/opentracing-go/log" "github.com/pkg/errors" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/pkg/api" "github.com/grafana/tempo/pkg/util/log" diff --git a/modules/overrides/userconfigurableapi/http_test.go b/modules/overrides/userconfigurableapi/http_test.go index 0df173cdf03..e321974b408 100644 --- a/modules/overrides/userconfigurableapi/http_test.go +++ b/modules/overrides/userconfigurableapi/http_test.go @@ -8,10 +8,10 @@ import ( "net/http/httptest" "testing" + "github.com/grafana/dskit/user" jsoniter "github.com/json-iterator/go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/tempo/pkg/api" "github.com/grafana/tempo/tempodb/backend" diff --git a/modules/querier/external/client.go b/modules/querier/external/client.go index 9cb3dbe84e7..ac5c09511e3 100644 --- a/modules/querier/external/client.go +++ b/modules/querier/external/client.go @@ -11,12 +11,12 @@ import ( "github.com/cristalhq/hedgedhttp" "github.com/gogo/protobuf/jsonpb" + "github.com/grafana/dskit/user" "github.com/grafana/tempo/pkg/api" "github.com/grafana/tempo/pkg/hedgedmetrics" "github.com/grafana/tempo/pkg/tempopb" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/user" ) var ( diff --git a/modules/querier/external/client_test.go b/modules/querier/external/client_test.go index e63851d7898..8d49111d345 100644 --- a/modules/querier/external/client_test.go +++ b/modules/querier/external/client_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "golang.org/x/oauth2" diff --git a/modules/querier/querier.go b/modules/querier/querier.go index 76373c4a641..4263a50d27e 100644 --- a/modules/querier/querier.go +++ b/modules/querier/querier.go @@ -10,16 +10,16 @@ import ( "github.com/go-kit/log/level" "github.com/google/uuid" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" ot_log "github.com/opentracing/opentracing-go/log" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/user" "go.uber.org/multierr" "golang.org/x/sync/semaphore" diff --git a/modules/querier/querier_test.go b/modules/querier/querier_test.go index 250434f4ff2..8921305360b 100644 --- a/modules/querier/querier_test.go +++ b/modules/querier/querier_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/grafana/dskit/user" generator_client "github.com/grafana/tempo/modules/generator/client" ingester_client "github.com/grafana/tempo/modules/ingester/client" "github.com/grafana/tempo/modules/overrides" @@ -15,7 +16,6 @@ import ( "github.com/grafana/tempo/pkg/tempopb" "github.com/stretchr/testify/require" "github.com/uber-go/atomic" - "github.com/weaveworks/common/user" ) func TestQuerierUsesSearchExternalEndpoint(t *testing.T) { diff --git a/modules/querier/worker/frontend_processor.go b/modules/querier/worker/frontend_processor.go index bdcbb797a8a..2db639ece93 100644 --- a/modules/querier/worker/frontend_processor.go +++ b/modules/querier/worker/frontend_processor.go @@ -12,7 +12,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/backoff" - "github.com/weaveworks/common/httpgrpc" + "github.com/grafana/dskit/httpgrpc" "google.golang.org/grpc" "github.com/grafana/tempo/modules/frontend/v1/frontendv1pb" diff --git a/modules/querier/worker/frontend_processor_test.go b/modules/querier/worker/frontend_processor_test.go index 357fb6139d8..d6df01f331a 100644 --- a/modules/querier/worker/frontend_processor_test.go +++ b/modules/querier/worker/frontend_processor_test.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" ) type RequestHandlerFunc func(context.Context, *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error) diff --git a/modules/querier/worker/worker.go b/modules/querier/worker/worker.go index 9f9e114a233..d6e6c3572f0 100644 --- a/modules/querier/worker/worker.go +++ b/modules/querier/worker/worker.go @@ -10,10 +10,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/httpgrpc" "google.golang.org/grpc" "github.com/grafana/tempo/pkg/util" diff --git a/pkg/cache/memcached.go b/pkg/cache/memcached.go index f2b08c8e70f..626569a48c7 100644 --- a/pkg/cache/memcached.go +++ b/pkg/cache/memcached.go @@ -8,11 +8,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + instr "github.com/grafana/dskit/instrument" "github.com/grafana/gomemcache/memcache" otlog "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - instr "github.com/weaveworks/common/instrument" "github.com/grafana/tempo/pkg/util/math" "github.com/grafana/tempo/pkg/util/spanlogger" diff --git a/pkg/cache/redis_cache.go b/pkg/cache/redis_cache.go index 2569af70054..ff4e370a351 100644 --- a/pkg/cache/redis_cache.go +++ b/pkg/cache/redis_cache.go @@ -5,10 +5,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + instr "github.com/grafana/dskit/instrument" otlog "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - instr "github.com/weaveworks/common/instrument" util_log "github.com/grafana/tempo/pkg/util/log" "github.com/grafana/tempo/pkg/util/spanlogger" diff --git a/pkg/server/internal_server.go b/pkg/server/internal_server.go index 79503632651..ad3374d27f8 100644 --- a/pkg/server/internal_server.go +++ b/pkg/server/internal_server.go @@ -4,7 +4,7 @@ import ( "flag" "time" - serverww "github.com/weaveworks/common/server" + serverww "github.com/grafana/dskit/server" ) // Config extends weaveworks server config diff --git a/pkg/util/httpgrpcutil/carrier.go b/pkg/util/httpgrpcutil/carrier.go index 910b4898b2d..a9beff8807e 100644 --- a/pkg/util/httpgrpcutil/carrier.go +++ b/pkg/util/httpgrpcutil/carrier.go @@ -1,8 +1,8 @@ package httpgrpcutil import ( + "github.com/grafana/dskit/httpgrpc" "github.com/opentracing/opentracing-go" - "github.com/weaveworks/common/httpgrpc" ) // Used to transfer trace information from/to HTTP request. diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go index 3b1ebf7ed12..f5364297769 100644 --- a/pkg/util/log/log.go +++ b/pkg/util/log/log.go @@ -5,8 +5,8 @@ import ( kitlog "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/server" + dslog "github.com/grafana/dskit/log" + "github.com/grafana/dskit/server" ) // Logger is a shared go-kit logger. @@ -35,7 +35,7 @@ func InitLogger(cfg *server.Config) { // this works in go 1.12, but doesn't work in versions earlier. // it will always shows the wrapper function generated by compiler // marked in old versions. - cfg.Log = logging.GoKit(kitlog.With(logger, "caller", kitlog.Caller(4))) + cfg.Log = dslog.GoKit(kitlog.With(logger, "caller", kitlog.Caller(4))) } // TODO: remove once weaveworks/common updates to go-kit/log diff --git a/pkg/util/log/wrappers.go b/pkg/util/log/wrappers.go index f2cabebbe45..db75ed90f0a 100644 --- a/pkg/util/log/wrappers.go +++ b/pkg/util/log/wrappers.go @@ -4,7 +4,7 @@ import ( "context" kitlog "github.com/go-kit/log" - "github.com/weaveworks/common/tracing" + "github.com/grafana/dskit/tracing" "github.com/grafana/dskit/tenant" ) diff --git a/pkg/util/trace_info.go b/pkg/util/trace_info.go index 4d4c4d00a71..2775bc096cf 100644 --- a/pkg/util/trace_info.go +++ b/pkg/util/trace_info.go @@ -6,10 +6,10 @@ import ( "math/rand" "time" + "github.com/grafana/dskit/user" jaeger_grpc "github.com/jaegertracing/jaeger/cmd/agent/app/reporter/grpc" thrift "github.com/jaegertracing/jaeger/thrift-gen/jaeger" jaegerTrans "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" - "github.com/weaveworks/common/user" "go.opentelemetry.io/collector/pdata/ptrace" "github.com/grafana/tempo/pkg/tempopb" diff --git a/pkg/util/tracing.go b/pkg/util/tracing.go index c488cfc8ed3..86cc49a19d4 100644 --- a/pkg/util/tracing.go +++ b/pkg/util/tracing.go @@ -3,7 +3,7 @@ package util import ( "context" - "github.com/weaveworks/common/tracing" + "github.com/grafana/dskit/tracing" "go.opentelemetry.io/otel/trace" ) diff --git a/vendor/github.com/grafana/dskit/errors/error.go b/vendor/github.com/grafana/dskit/errors/error.go new file mode 100644 index 00000000000..1d36f7c39e7 --- /dev/null +++ b/vendor/github.com/grafana/dskit/errors/error.go @@ -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) } diff --git a/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go b/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go index c8d3528895a..4a10ce48d27 100644 --- a/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go +++ b/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go @@ -4,8 +4,9 @@ import ( otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/middleware" "google.golang.org/grpc" + + "github.com/grafana/dskit/middleware" ) func Instrument(requestDuration *prometheus.HistogramVec) ([]grpc.UnaryClientInterceptor, []grpc.StreamClientInterceptor) { diff --git a/vendor/github.com/weaveworks/common/grpc/cancel.go b/vendor/github.com/grafana/dskit/grpcutil/cancel.go similarity index 55% rename from vendor/github.com/weaveworks/common/grpc/cancel.go rename to vendor/github.com/grafana/dskit/grpcutil/cancel.go index debef089582..b1d369d2a3e 100644 --- a/vendor/github.com/weaveworks/common/grpc/cancel.go +++ b/vendor/github.com/grafana/dskit/grpcutil/cancel.go @@ -1,7 +1,12 @@ -package grpc +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/grpc/cancel.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package grpcutil import ( "context" + "errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -9,7 +14,7 @@ import ( // IsCanceled checks whether an error comes from an operation being canceled func IsCanceled(err error) bool { - if err == context.Canceled { + if errors.Is(err, context.Canceled) { return true } s, ok := status.FromError(err) diff --git a/vendor/github.com/weaveworks/common/httpgrpc/README.md b/vendor/github.com/grafana/dskit/httpgrpc/README.md similarity index 100% rename from vendor/github.com/weaveworks/common/httpgrpc/README.md rename to vendor/github.com/grafana/dskit/httpgrpc/README.md diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go similarity index 87% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go index db39d0c980a..050492dfcb1 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/httpgrpc.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package httpgrpc import ( diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go similarity index 89% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go index 4b3f6ad9f72..bab0efd5362 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: httpgrpc/httpgrpc.proto +// source: httpgrpc.proto package httpgrpc @@ -40,7 +40,7 @@ type HTTPRequest struct { func (m *HTTPRequest) Reset() { *m = HTTPRequest{} } func (*HTTPRequest) ProtoMessage() {} func (*HTTPRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{0} + return fileDescriptor_c50820dbc814fcdd, []int{0} } func (m *HTTPRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ type HTTPResponse struct { func (m *HTTPResponse) Reset() { *m = HTTPResponse{} } func (*HTTPResponse) ProtoMessage() {} func (*HTTPResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{1} + return fileDescriptor_c50820dbc814fcdd, []int{1} } func (m *HTTPResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ type Header struct { func (m *Header) Reset() { *m = Header{} } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{2} + return fileDescriptor_c50820dbc814fcdd, []int{2} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,31 +213,29 @@ func init() { proto.RegisterType((*Header)(nil), "httpgrpc.Header") } -func init() { proto.RegisterFile("httpgrpc/httpgrpc.proto", fileDescriptor_6670c8e151665986) } +func init() { proto.RegisterFile("httpgrpc.proto", fileDescriptor_c50820dbc814fcdd) } -var fileDescriptor_6670c8e151665986 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4f, 0xc2, 0x40, - 0x14, 0xc0, 0x7b, 0x14, 0xab, 0x1c, 0x0c, 0xe4, 0xa2, 0xd8, 0x30, 0x5c, 0x08, 0x89, 0x09, 0x71, - 0xa0, 0x09, 0x4e, 0x8e, 0xea, 0xc2, 0xa6, 0xb9, 0x30, 0xb9, 0xb5, 0xf4, 0xa5, 0x35, 0x50, 0x5e, - 0x6d, 0xaf, 0x10, 0x36, 0x3f, 0x82, 0x1f, 0xc3, 0x8f, 0xe2, 0xc8, 0xc8, 0x28, 0xe5, 0x0b, 0xf8, - 0x11, 0xcc, 0x5d, 0x29, 0x36, 0x4e, 0x6e, 0xbf, 0xf7, 0x27, 0xf7, 0x7b, 0xef, 0x1e, 0xbd, 0x0c, - 0xa5, 0x8c, 0x83, 0x24, 0x9e, 0x3a, 0x25, 0x0c, 0xe3, 0x04, 0x25, 0xb2, 0xb3, 0x32, 0xee, 0x9e, - 0x07, 0x18, 0xa0, 0x4e, 0x3a, 0x8a, 0x8a, 0x7a, 0x7f, 0x45, 0x9b, 0xe3, 0xc9, 0xe4, 0x49, 0xc0, - 0x6b, 0x06, 0xa9, 0x64, 0x1d, 0x6a, 0x45, 0x20, 0x43, 0xf4, 0x6d, 0xd2, 0x23, 0x83, 0x86, 0x38, - 0x44, 0xac, 0x4d, 0xcd, 0x2c, 0x99, 0xdb, 0x35, 0x9d, 0x54, 0xc8, 0xae, 0xe9, 0x69, 0x08, 0xae, - 0x0f, 0x49, 0x6a, 0x9b, 0x3d, 0x73, 0xd0, 0x1c, 0xb5, 0x87, 0x47, 0xf5, 0x58, 0x17, 0x44, 0xd9, - 0xc0, 0x18, 0xad, 0x7b, 0xe8, 0xaf, 0xed, 0x7a, 0x8f, 0x0c, 0x5a, 0x42, 0x73, 0xdf, 0xa3, 0xad, - 0x42, 0x9c, 0xc6, 0xb8, 0x48, 0x41, 0xf5, 0x3c, 0xa0, 0x0f, 0xda, 0x7b, 0x22, 0x34, 0x57, 0x1d, - 0xb5, 0xff, 0x3a, 0xcc, 0x8a, 0x63, 0x44, 0xad, 0xa2, 0x4d, 0xcd, 0x3f, 0x83, 0xf5, 0x61, 0x29, - 0x85, 0x6a, 0xd3, 0xa5, 0x3b, 0xcf, 0xa0, 0x78, 0xba, 0x21, 0x0e, 0xd1, 0xe8, 0x8e, 0xd6, 0xd5, - 0x5c, 0xec, 0x96, 0x5a, 0x63, 0x77, 0xe1, 0xcf, 0x81, 0x5d, 0x54, 0xa4, 0xbf, 0x5f, 0xd5, 0xed, - 0xfc, 0x4d, 0x17, 0x8b, 0xf4, 0x8d, 0xfb, 0xc7, 0xed, 0x8e, 0x1b, 0xdf, 0x3b, 0x4e, 0xde, 0x72, - 0x4e, 0x3e, 0x72, 0x4e, 0x3e, 0x73, 0x4e, 0x36, 0x39, 0x27, 0x5f, 0x39, 0x27, 0xef, 0x7b, 0x6e, - 0x6c, 0xf6, 0xdc, 0xd8, 0xee, 0xb9, 0xf1, 0x7c, 0x15, 0xbc, 0xc8, 0x30, 0xf3, 0x86, 0x53, 0x8c, - 0x9c, 0x15, 0xb8, 0x4b, 0x58, 0x61, 0x32, 0x4b, 0x9d, 0x29, 0x46, 0x11, 0x2e, 0x8e, 0xa7, 0xf4, - 0x2c, 0x7d, 0xab, 0x9b, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0xb5, 0xfe, 0x5d, 0xe6, 0x01, - 0x00, 0x00, +var fileDescriptor_c50820dbc814fcdd = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x4e, 0xc3, 0x30, + 0x14, 0x85, 0xed, 0xa6, 0x04, 0xea, 0x56, 0xa8, 0xb2, 0xa0, 0x8a, 0x3a, 0x5c, 0x55, 0x99, 0x22, + 0x86, 0x22, 0x05, 0x16, 0x46, 0x60, 0xc9, 0x88, 0xac, 0xbe, 0x40, 0x42, 0xac, 0x44, 0x22, 0xd4, + 0x21, 0x3f, 0xa0, 0x6e, 0x3c, 0x02, 0x8f, 0xc1, 0xa3, 0x30, 0x66, 0xec, 0x48, 0x9c, 0x85, 0xb1, + 0x8f, 0x80, 0xec, 0xa4, 0x10, 0x31, 0xb1, 0x9d, 0x7b, 0xee, 0x51, 0xbe, 0x7b, 0x62, 0x72, 0x1c, + 0x17, 0x45, 0x1a, 0x65, 0xe9, 0xfd, 0x32, 0xcd, 0x44, 0x21, 0xe8, 0xd1, 0x7e, 0x9e, 0x9f, 0x44, + 0x22, 0x12, 0xda, 0x3c, 0x57, 0xaa, 0xdd, 0xdb, 0x2f, 0x64, 0xec, 0xad, 0x56, 0x77, 0x8c, 0x3f, + 0x95, 0x3c, 0x2f, 0xe8, 0x8c, 0x98, 0x8f, 0xbc, 0x88, 0x45, 0x68, 0xe1, 0x05, 0x76, 0x46, 0xac, + 0x9b, 0xe8, 0x94, 0x18, 0x65, 0x96, 0x58, 0x03, 0x6d, 0x2a, 0x49, 0xcf, 0xc8, 0x61, 0xcc, 0xfd, + 0x90, 0x67, 0xb9, 0x65, 0x2c, 0x0c, 0x67, 0xec, 0x4e, 0x97, 0x3f, 0x68, 0x4f, 0x2f, 0xd8, 0x3e, + 0x40, 0x29, 0x19, 0x06, 0x22, 0xdc, 0x58, 0xc3, 0x05, 0x76, 0x26, 0x4c, 0x6b, 0x3b, 0x20, 0x93, + 0x16, 0x9c, 0xa7, 0x62, 0x9d, 0x73, 0x95, 0xb9, 0x15, 0x21, 0xd7, 0xdc, 0x03, 0xa6, 0x75, 0x9f, + 0x31, 0xf8, 0x2f, 0xc3, 0xe8, 0x31, 0x5c, 0x62, 0xb6, 0x31, 0x75, 0xff, 0x03, 0xdf, 0x74, 0xa5, + 0x94, 0x54, 0x4d, 0x9f, 0xfd, 0xa4, 0xe4, 0xed, 0xa7, 0x47, 0xac, 0x9b, 0xdc, 0x6b, 0x32, 0x54, + 0x77, 0xd1, 0x2b, 0x62, 0x7a, 0xfe, 0x3a, 0x4c, 0x38, 0x3d, 0xed, 0x41, 0x7f, 0x7f, 0xd5, 0x7c, + 0xf6, 0xd7, 0x6e, 0x8b, 0xd8, 0xe8, 0xe6, 0xb2, 0xaa, 0x01, 0x6d, 0x6b, 0x40, 0xbb, 0x1a, 0xf0, + 0xab, 0x04, 0xfc, 0x2e, 0x01, 0x7f, 0x48, 0xc0, 0x95, 0x04, 0xfc, 0x29, 0x01, 0x7f, 0x49, 0x40, + 0x3b, 0x09, 0xf8, 0xad, 0x01, 0x54, 0x35, 0x80, 0xb6, 0x0d, 0xa0, 0xc0, 0xd4, 0x0f, 0x72, 0xf1, + 0x1d, 0x00, 0x00, 0xff, 0xff, 0x44, 0x0e, 0x7c, 0xff, 0xc2, 0x01, 0x00, 0x00, } func (this *HTTPRequest) Equal(that interface{}) bool { @@ -471,7 +469,7 @@ var _HTTP_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "httpgrpc/httpgrpc.proto", + Metadata: "httpgrpc.proto", } func (m *HTTPRequest) Marshal() (dAtA []byte, err error) { @@ -1204,7 +1202,6 @@ func (m *Header) Unmarshal(dAtA []byte) error { func skipHttpgrpc(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1236,8 +1233,10 @@ func skipHttpgrpc(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1258,30 +1257,55 @@ func skipHttpgrpc(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthHttpgrpc } iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthHttpgrpc + } + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHttpgrpc + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpgrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipHttpgrpc(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthHttpgrpc + } } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpgrpc - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthHttpgrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttpgrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHttpgrpc = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthHttpgrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHttpgrpc = fmt.Errorf("proto: integer overflow") ) diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto similarity index 92% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto index 0313dbb625c..8f546330a52 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto @@ -11,7 +11,6 @@ option (gogoproto.goproto_stringer_all) = false; option (gogoproto.goproto_unkeyed_all) = false; option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; -option go_package = "github.com/weaveworks/common/httpgrpc"; service HTTP { rpc Handle(HTTPRequest) returns (HTTPResponse) {}; diff --git a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go b/vendor/github.com/grafana/dskit/httpgrpc/server/server.go similarity index 91% rename from vendor/github.com/weaveworks/common/httpgrpc/server/server.go rename to vendor/github.com/grafana/dskit/httpgrpc/server/server.go index 25377cc5e7f..7b715bd5625 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/server/server.go @@ -1,7 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/server/server.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( "bytes" + "context" "fmt" "io/ioutil" "net" @@ -13,13 +18,12 @@ import ( otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/sercand/kuberesolver/v4" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/middleware" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/middleware" ) // Server implements HTTPServer. HTTPServer is a generated interface that gRPC @@ -102,9 +106,9 @@ func ParseURL(unparsed string) (string, error) { return "", err } parts := strings.SplitN(host, ".", 3) - service, namespace, domain := parts[0], "default", "" + service, domain := parts[0], "" if len(parts) > 1 { - namespace = parts[1] + namespace := parts[1] domain = "." + namespace } if len(parts) > 2 { @@ -174,7 +178,7 @@ func WriteResponse(w http.ResponseWriter, resp *httpgrpc.HTTPResponse) error { func WriteError(w http.ResponseWriter, err error) { resp, ok := httpgrpc.HTTPResponseFromError(err) if ok { - WriteResponse(w, resp) + _ = WriteResponse(w, resp) } else { http.Error(w, err.Error(), http.StatusInternalServerError) } @@ -185,7 +189,7 @@ func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request) { if tracer := opentracing.GlobalTracer(); tracer != nil { if span := opentracing.SpanFromContext(r.Context()); span != nil { if err := tracer.Inject(span.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(r.Header)); err != nil { - logging.Global().Warnf("Failed to inject tracing headers into request: %v", err) + log.Global().Warnf("Failed to inject tracing headers into request: %v", err) } } } diff --git a/vendor/github.com/grafana/dskit/httpgrpc/tools.go b/vendor/github.com/grafana/dskit/httpgrpc/tools.go new file mode 100644 index 00000000000..9117d39b129 --- /dev/null +++ b/vendor/github.com/grafana/dskit/httpgrpc/tools.go @@ -0,0 +1,10 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/tools.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package httpgrpc + +import ( + // This is a workaround for go mod which fails to download gogoproto otherwise + _ "github.com/gogo/protobuf/gogoproto" +) diff --git a/vendor/github.com/weaveworks/common/instrument/instrument.go b/vendor/github.com/grafana/dskit/instrument/instrument.go similarity index 79% rename from vendor/github.com/weaveworks/common/instrument/instrument.go rename to vendor/github.com/grafana/dskit/instrument/instrument.go index 07aa033c0c9..4ea480b29d6 100644 --- a/vendor/github.com/weaveworks/common/instrument/instrument.go +++ b/vendor/github.com/grafana/dskit/instrument/instrument.go @@ -1,3 +1,9 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/instrument/instrument.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +//lint:file-ignore faillint Changing from prometheus to promauto package would be a breaking change for consumers + package instrument import ( @@ -8,11 +14,10 @@ import ( "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" - oldcontext "golang.org/x/net/context" - "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/tracing" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/tracing" + "github.com/grafana/dskit/user" ) // DefBuckets are histogram buckets for the response time (in seconds) @@ -53,7 +58,7 @@ func (c *HistogramCollector) Register() { } // Before collects for the upcoming request. -func (c *HistogramCollector) Before(ctx context.Context, method string, start time.Time) { +func (c *HistogramCollector) Before(context.Context, string, time.Time) { } // After collects when the request is done. @@ -131,13 +136,13 @@ func (c *JobCollector) Register() { } // Before collects for the upcoming request. -func (c *JobCollector) Before(ctx context.Context, method string, start time.Time) { +func (c *JobCollector) Before(_ context.Context, method string, start time.Time) { c.start.WithLabelValues(method).Set(float64(start.UTC().Unix())) c.started.WithLabelValues(method).Inc() } // After collects when the request is done. -func (c *JobCollector) After(ctx context.Context, method, statusCode string, start time.Time) { +func (c *JobCollector) After(_ context.Context, method, statusCode string, start time.Time) { end := time.Now() c.end.WithLabelValues(method, statusCode).Set(float64(end.UTC().Unix())) c.duration.WithLabelValues(method, statusCode).Set(end.Sub(start).Seconds()) @@ -168,7 +173,7 @@ func CollectedRequest(ctx context.Context, method string, col Collector, toStatu col.After(newCtx, method, toStatusCode(err), start) if err != nil { - if !grpc.IsCanceled(err) { + if !grpcutil.IsCanceled(err) { ext.Error.Set(sp, true) } sp.LogFields(otlog.Error(err)) @@ -185,21 +190,3 @@ func ErrorCode(err error) string { } return "500" } - -// TimeRequestHistogram runs 'f' and records how long it took in the given Prometheus -// histogram metric. If 'f' returns successfully, record a "200". Otherwise, record -// "500". It will also emit an OpenTracing span if you have a global tracer configured. -// -// Deprecated: Use CollectedRequest() -func TimeRequestHistogram(ctx oldcontext.Context, method string, metric *prometheus.HistogramVec, f func(context.Context) error) error { - return CollectedRequest(ctx, method, NewHistogramCollector(metric), ErrorCode, f) -} - -// TimeRequestHistogramStatus runs 'f' and records how long it took in the given Prometheus -// histogram metric. If 'f' returns successfully, record a "200". Otherwise, record -// "500". It will also emit an OpenTracing span if you have a global tracer configured. -// -// Deprecated: Use CollectedRequest() -func TimeRequestHistogramStatus(ctx oldcontext.Context, method string, metric *prometheus.HistogramVec, toStatusCode func(error) string, f func(context.Context) error) error { - return CollectedRequest(ctx, method, NewHistogramCollector(metric), toStatusCode, f) -} diff --git a/vendor/github.com/grafana/dskit/kv/consul/client.go b/vendor/github.com/grafana/dskit/kv/consul/client.go index 861e03f5625..5501a67d894 100644 --- a/vendor/github.com/grafana/dskit/kv/consul/client.go +++ b/vendor/github.com/grafana/dskit/kv/consul/client.go @@ -14,9 +14,10 @@ import ( consul "github.com/hashicorp/consul/api" "github.com/hashicorp/go-cleanhttp" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/instrument" "golang.org/x/time/rate" + "github.com/grafana/dskit/instrument" + "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv/codec" diff --git a/vendor/github.com/grafana/dskit/kv/consul/metrics.go b/vendor/github.com/grafana/dskit/kv/consul/metrics.go index 52a1d4e843a..166e79bc98e 100644 --- a/vendor/github.com/grafana/dskit/kv/consul/metrics.go +++ b/vendor/github.com/grafana/dskit/kv/consul/metrics.go @@ -6,7 +6,8 @@ import ( consul "github.com/hashicorp/consul/api" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/instrument" + + "github.com/grafana/dskit/instrument" ) type consulInstrumentation struct { diff --git a/vendor/github.com/grafana/dskit/kv/metrics.go b/vendor/github.com/grafana/dskit/kv/metrics.go index 66fe9fa91be..7361b8c41c7 100644 --- a/vendor/github.com/grafana/dskit/kv/metrics.go +++ b/vendor/github.com/grafana/dskit/kv/metrics.go @@ -6,8 +6,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/instrument" + + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/instrument" ) // RegistererWithKVName wraps the provided Registerer with the KV name label. If a nil reg diff --git a/vendor/github.com/grafana/dskit/log/buffered.go b/vendor/github.com/grafana/dskit/log/buffered.go new file mode 100644 index 00000000000..301ea8e69a2 --- /dev/null +++ b/vendor/github.com/grafana/dskit/log/buffered.go @@ -0,0 +1,159 @@ +// Provenance-includes-location: https://github.com/grafana/loki/blob/7c78d7ea44afb420847255f9f5a4f677ad0f47bf/pkg/util/log/line_buffer.go +// Provenance-includes-location: https://github.com/grafana/mimir/blob/c8b24a462f7e224950409e7e0a4e0a58f3a79599/pkg/util/log/line_buffer.go +// Provenance-includes-copyright: Grafana Labs +package log + +import ( + "bytes" + "io" + "sync" + "time" + + "go.uber.org/atomic" +) + +// BufferedLogger buffers log lines to be flushed periodically. Without a line buffer, Log() will call the write +// syscall for every log line which is expensive if logging thousands of lines per second. +type BufferedLogger struct { + buf *threadsafeBuffer + entries atomic.Uint32 + cap uint32 + w io.Writer + + onFlush func(entries uint32) +} + +// Size returns the number of entries in the buffer. +func (l *BufferedLogger) Size() uint32 { + return l.entries.Load() +} + +// Write writes the given bytes to the line buffer, and increments the entries counter. +// If the buffer is full (entries == cap), it will be flushed, and the entries counter reset. +func (l *BufferedLogger) Write(p []byte) (n int, err error) { + // when we've filled the buffer, flush it + if l.Size() >= l.cap { + // Flush resets the size to 0 + if err := l.Flush(); err != nil { + l.buf.Reset() + return 0, err + } + } + + l.entries.Inc() + + return l.buf.Write(p) +} + +// Flush forces the buffer to be written to the underlying writer. +func (l *BufferedLogger) Flush() error { + // reset the counter + sz := l.entries.Swap(0) + if sz <= 0 { + return nil + } + + // WriteTo() calls Reset() on the underlying buffer, so it's not needed here + _, err := l.buf.WriteTo(l.w) + + // only call OnFlush callback if write was successful + if err == nil && l.onFlush != nil { + l.onFlush(sz) + } + + return err +} + +type BufferedLoggerOption func(*BufferedLogger) + +// WithFlushPeriod creates a new BufferedLoggerOption that sets the flush period for the BufferedLogger. +func WithFlushPeriod(d time.Duration) BufferedLoggerOption { + return func(l *BufferedLogger) { + go func() { + tick := time.NewTicker(d) + defer tick.Stop() + + for range tick.C { + l.Flush() + } + }() + } +} + +// WithFlushCallback allows for a callback function to be executed when Flush() is called. +// The length of the buffer at the time of the Flush() will be passed to the function. +func WithFlushCallback(fn func(entries uint32)) BufferedLoggerOption { + return func(l *BufferedLogger) { + l.onFlush = fn + } +} + +// WithPrellocatedBuffer preallocates a buffer to reduce GC cycles and slice resizing. +func WithPrellocatedBuffer(size uint32) BufferedLoggerOption { + return func(l *BufferedLogger) { + l.buf = newThreadsafeBuffer(bytes.NewBuffer(make([]byte, 0, size))) + } +} + +// NewBufferedLogger creates a new BufferedLogger with a configured capacity. +// Lines are flushed when the context is done, the buffer is full, or the flush period is reached. +func NewBufferedLogger(w io.Writer, cap uint32, opts ...BufferedLoggerOption) *BufferedLogger { + l := &BufferedLogger{ + w: w, + buf: newThreadsafeBuffer(bytes.NewBuffer([]byte{})), + cap: cap, + } + + for _, opt := range opts { + opt(l) + } + + return l +} + +// threadsafeBuffer wraps the non-threadsafe bytes.Buffer. +type threadsafeBuffer struct { + mx sync.Mutex + buf *bytes.Buffer +} + +// Read reads up to len(p) bytes into p. It returns the number of bytes read (0 <= n <= len(p)) and any error encountered. +func (t *threadsafeBuffer) Read(p []byte) (n int, err error) { + t.mx.Lock() + defer t.mx.Unlock() + + return t.buf.Read(p) +} + +// Write writes the given bytes to the underlying writer. +func (t *threadsafeBuffer) Write(p []byte) (n int, err error) { + t.mx.Lock() + defer t.mx.Unlock() + + return t.buf.Write(p) +} + +// WriteTo writes the buffered lines to the given writer. +func (t *threadsafeBuffer) WriteTo(w io.Writer) (n int64, err error) { + t.mx.Lock() + defer t.mx.Unlock() + + return t.buf.WriteTo(w) +} + +// Reset resets the buffer to be empty, +// but it retains the underlying storage for use by future writes. +// Reset is the same as Truncate(0). +func (t *threadsafeBuffer) Reset() { + t.mx.Lock() + defer t.mx.Unlock() + + t.buf.Reset() +} + +// newThreadsafeBuffer returns a new threadsafeBuffer wrapping the given bytes.Buffer. +func newThreadsafeBuffer(buf *bytes.Buffer) *threadsafeBuffer { + return &threadsafeBuffer{ + buf: buf, + } +} diff --git a/vendor/github.com/weaveworks/common/logging/format.go b/vendor/github.com/grafana/dskit/log/format.go similarity index 83% rename from vendor/github.com/weaveworks/common/logging/format.go rename to vendor/github.com/grafana/dskit/log/format.go index 701b32f5632..3925b3c14a4 100644 --- a/vendor/github.com/weaveworks/common/logging/format.go +++ b/vendor/github.com/grafana/dskit/log/format.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/format.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "flag" @@ -15,7 +19,7 @@ type Format struct { // RegisterFlags adds the log format flag to the provided flagset. func (f *Format) RegisterFlags(fs *flag.FlagSet) { - f.Set("logfmt") + _ = f.Set("logfmt") fs.Var(f, "log.format", "Output log messages in the given format. Valid formats: [logfmt, json]") } diff --git a/vendor/github.com/weaveworks/common/logging/global.go b/vendor/github.com/grafana/dskit/log/global.go similarity index 87% rename from vendor/github.com/weaveworks/common/logging/global.go rename to vendor/github.com/grafana/dskit/log/global.go index ed72daf739c..68131a156d5 100644 --- a/vendor/github.com/weaveworks/common/logging/global.go +++ b/vendor/github.com/grafana/dskit/log/global.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/global.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log var global = Noop() diff --git a/vendor/github.com/weaveworks/common/logging/gokit.go b/vendor/github.com/grafana/dskit/log/gokit.go similarity index 92% rename from vendor/github.com/weaveworks/common/logging/gokit.go rename to vendor/github.com/grafana/dskit/log/gokit.go index e4b6fdc032c..c956c677533 100644 --- a/vendor/github.com/weaveworks/common/logging/gokit.go +++ b/vendor/github.com/grafana/dskit/log/gokit.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/gokit.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "fmt" diff --git a/vendor/github.com/weaveworks/common/logging/interface.go b/vendor/github.com/grafana/dskit/log/interface.go similarity index 76% rename from vendor/github.com/weaveworks/common/logging/interface.go rename to vendor/github.com/grafana/dskit/log/interface.go index f4625e474f8..a074fef90b9 100644 --- a/vendor/github.com/weaveworks/common/logging/interface.go +++ b/vendor/github.com/grafana/dskit/log/interface.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/interface.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log // Interface 'unifies' gokit logging and logrus logging, such that // the middleware in this repo can be used in projects which use either diff --git a/vendor/github.com/weaveworks/common/logging/level.go b/vendor/github.com/grafana/dskit/log/level.go similarity index 90% rename from vendor/github.com/weaveworks/common/logging/level.go rename to vendor/github.com/grafana/dskit/log/level.go index d7b92eaaa10..f2b8db55b1f 100644 --- a/vendor/github.com/weaveworks/common/logging/level.go +++ b/vendor/github.com/grafana/dskit/log/level.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/level.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log // Copy-pasted from prometheus/common/promlog. // Copyright 2017 The Prometheus Authors @@ -32,7 +36,7 @@ type Level struct { // RegisterFlags adds the log level flag to the provided flagset. func (l *Level) RegisterFlags(f *flag.FlagSet) { - l.Set("info") + _ = l.Set("info") f.Var(l, "log.level", "Only log messages with the given severity or above. Valid levels: [debug, info, warn, error]") } diff --git a/vendor/github.com/weaveworks/common/logging/logging.go b/vendor/github.com/grafana/dskit/log/logging.go similarity index 76% rename from vendor/github.com/weaveworks/common/logging/logging.go rename to vendor/github.com/grafana/dskit/log/logging.go index f23db5f6630..5bb80dee293 100644 --- a/vendor/github.com/weaveworks/common/logging/logging.go +++ b/vendor/github.com/grafana/dskit/log/logging.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "fmt" diff --git a/vendor/github.com/weaveworks/common/logging/logrus.go b/vendor/github.com/grafana/dskit/log/logrus.go similarity index 86% rename from vendor/github.com/weaveworks/common/logging/logrus.go rename to vendor/github.com/grafana/dskit/log/logrus.go index d302613f7b6..df0e1ae07e8 100644 --- a/vendor/github.com/weaveworks/common/logging/logrus.go +++ b/vendor/github.com/grafana/dskit/log/logrus.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/logrus.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "os" diff --git a/vendor/github.com/grafana/dskit/log/noop.go b/vendor/github.com/grafana/dskit/log/noop.go new file mode 100644 index 00000000000..89d437468d5 --- /dev/null +++ b/vendor/github.com/grafana/dskit/log/noop.go @@ -0,0 +1,27 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/noop.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log + +// Noop logger. +func Noop() Interface { + return noop{} +} + +type noop struct{} + +func (noop) Debugf(string, ...interface{}) {} +func (noop) Debugln(...interface{}) {} +func (noop) Infof(string, ...interface{}) {} +func (noop) Infoln(...interface{}) {} +func (noop) Warnf(string, ...interface{}) {} +func (noop) Warnln(...interface{}) {} +func (noop) Errorf(string, ...interface{}) {} +func (noop) Errorln(...interface{}) {} +func (noop) WithField(string, interface{}) Interface { + return noop{} +} +func (noop) WithFields(Fields) Interface { + return noop{} +} diff --git a/vendor/github.com/weaveworks/common/middleware/counting_listener.go b/vendor/github.com/grafana/dskit/middleware/counting_listener.go similarity index 82% rename from vendor/github.com/weaveworks/common/middleware/counting_listener.go rename to vendor/github.com/grafana/dskit/middleware/counting_listener.go index 1e8526288da..961f71a5125 100644 --- a/vendor/github.com/weaveworks/common/middleware/counting_listener.go +++ b/vendor/github.com/grafana/dskit/middleware/counting_listener.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/counting_listener.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/errorhandler.go b/vendor/github.com/grafana/dskit/middleware/errorhandler.go similarity index 92% rename from vendor/github.com/weaveworks/common/middleware/errorhandler.go rename to vendor/github.com/grafana/dskit/middleware/errorhandler.go index ab2354fa163..4a48c90c9ca 100644 --- a/vendor/github.com/weaveworks/common/middleware/errorhandler.go +++ b/vendor/github.com/grafana/dskit/middleware/errorhandler.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/errorhandler.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_auth.go b/vendor/github.com/grafana/dskit/middleware/grpc_auth.go similarity index 85% rename from vendor/github.com/weaveworks/common/middleware/grpc_auth.go rename to vendor/github.com/grafana/dskit/middleware/grpc_auth.go index 10be1f8d706..156ddaf10a1 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_auth.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_auth.go @@ -1,10 +1,15 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_auth.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) // ClientUserHeaderInterceptor propagates the user ID from the context to gRPC metadata, which eventually ends up as a HTTP2 header. @@ -29,7 +34,7 @@ func StreamClientUserHeaderInterceptor(ctx context.Context, desc *grpc.StreamDes } // ServerUserHeaderInterceptor propagates the user ID from the gRPC metadata back to our context. -func ServerUserHeaderInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { +func ServerUserHeaderInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { _, ctx, err := user.ExtractFromGRPCRequest(ctx) if err != nil { return nil, err diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go b/vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go similarity index 92% rename from vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go rename to vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go index 90c955f1e82..4a0899c25f9 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_instrumentation.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -7,11 +11,12 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - grpcUtils "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/instrument" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + + grpcUtils "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/instrument" ) func observe(ctx context.Context, hist *prometheus.HistogramVec, method string, err error, duration time.Duration) { diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_logging.go b/vendor/github.com/grafana/dskit/middleware/grpc_logging.go similarity index 63% rename from vendor/github.com/weaveworks/common/middleware/grpc_logging.go rename to vendor/github.com/grafana/dskit/middleware/grpc_logging.go index 59994413cd8..bb9c99571e9 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_logging.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_logging.go @@ -1,14 +1,19 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( + "context" + "errors" "time" - "golang.org/x/net/context" "google.golang.org/grpc" - grpcUtils "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/user" + grpcUtils "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/user" ) const ( @@ -16,9 +21,14 @@ const ( errorKey = "err" ) +// An error can implement ShouldLog() to control whether GRPCServerLog will log. +type OptionalLogging interface { + ShouldLog(ctx context.Context, duration time.Duration) bool +} + // GRPCServerLog logs grpc requests, errors, and latency. type GRPCServerLog struct { - Log logging.Interface + Log log.Interface // WithRequest will log the entire request rather than just the error WithRequest bool DisableRequestSuccessLog bool @@ -31,8 +41,12 @@ func (s GRPCServerLog) UnaryServerInterceptor(ctx context.Context, req interface if err == nil && s.DisableRequestSuccessLog { return resp, nil } + var optional OptionalLogging + if errors.As(err, &optional) && !optional.ShouldLog(ctx, time.Since(begin)) { + return resp, err + } - entry := user.LogWith(ctx, s.Log).WithFields(logging.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) + entry := user.LogWith(ctx, s.Log).WithFields(log.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) if err != nil { if s.WithRequest { entry = entry.WithField("request", req) @@ -56,7 +70,7 @@ func (s GRPCServerLog) StreamServerInterceptor(srv interface{}, ss grpc.ServerSt return nil } - entry := user.LogWith(ss.Context(), s.Log).WithFields(logging.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) + entry := user.LogWith(ss.Context(), s.Log).WithFields(log.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) if err != nil { if grpcUtils.IsCanceled(err) { entry.WithField(errorKey, err).Debugln(gRPC) diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_stats.go b/vendor/github.com/grafana/dskit/middleware/grpc_stats.go similarity index 91% rename from vendor/github.com/weaveworks/common/middleware/grpc_stats.go rename to vendor/github.com/grafana/dskit/middleware/grpc_stats.go index 6c2581c4c2f..3d29d9baabb 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_stats.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_stats.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_stats.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/header_adder.go b/vendor/github.com/grafana/dskit/middleware/header_adder.go similarity index 71% rename from vendor/github.com/weaveworks/common/middleware/header_adder.go rename to vendor/github.com/grafana/dskit/middleware/header_adder.go index ce7f07df578..ffd5cc8db0c 100644 --- a/vendor/github.com/weaveworks/common/middleware/header_adder.go +++ b/vendor/github.com/grafana/dskit/middleware/header_adder.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/header_adder.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/http_auth.go b/vendor/github.com/grafana/dskit/middleware/http_auth.go similarity index 66% rename from vendor/github.com/weaveworks/common/middleware/http_auth.go rename to vendor/github.com/grafana/dskit/middleware/http_auth.go index 704d1dab4e2..2b576a929b1 100644 --- a/vendor/github.com/weaveworks/common/middleware/http_auth.go +++ b/vendor/github.com/grafana/dskit/middleware/http_auth.go @@ -1,9 +1,13 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/http_auth.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( "net/http" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) // AuthenticateUser propagates the user ID from HTTP headers back to the request's context. diff --git a/vendor/github.com/weaveworks/common/middleware/http_tracing.go b/vendor/github.com/grafana/dskit/middleware/http_tracing.go similarity index 86% rename from vendor/github.com/weaveworks/common/middleware/http_tracing.go rename to vendor/github.com/grafana/dskit/middleware/http_tracing.go index 7b55557677e..e36bf436df1 100644 --- a/vendor/github.com/weaveworks/common/middleware/http_tracing.go +++ b/vendor/github.com/grafana/dskit/middleware/http_tracing.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/http_tracing.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/instrument.go b/vendor/github.com/grafana/dskit/middleware/instrument.go similarity index 87% rename from vendor/github.com/weaveworks/common/middleware/instrument.go rename to vendor/github.com/grafana/dskit/middleware/instrument.go index ac1f76f007c..e5ae9c53c98 100644 --- a/vendor/github.com/weaveworks/common/middleware/instrument.go +++ b/vendor/github.com/grafana/dskit/middleware/instrument.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/instrument.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -11,7 +15,7 @@ import ( "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/instrument" + "github.com/grafana/dskit/instrument" ) const mb = 1024 * 1024 @@ -78,11 +82,12 @@ func (i Instrument) Wrap(next http.Handler) http.Handler { } // Return a name identifier for ths request. There are three options: -// 1. The request matches a gorilla mux route, with a name. Use that. -// 2. The request matches an unamed gorilla mux router. Munge the path -// template such that templates like '/api/{org}/foo' come out as -// 'api_org_foo'. -// 3. The request doesn't match a mux route. Return "other" +// 1. The request matches a gorilla mux route, with a name. Use that. +// 2. The request matches an unamed gorilla mux router. Munge the path +// template such that templates like '/api/{org}/foo' come out as +// 'api_org_foo'. +// 3. The request doesn't match a mux route. Return "other" +// // We do all this as we do not wish to emit high cardinality labels to // prometheus. func (i Instrument) getRouteName(r *http.Request) string { diff --git a/vendor/github.com/weaveworks/common/middleware/logging.go b/vendor/github.com/grafana/dskit/middleware/logging.go similarity index 69% rename from vendor/github.com/weaveworks/common/middleware/logging.go rename to vendor/github.com/grafana/dskit/middleware/logging.go index eb07466e7c7..ca13f330ed2 100644 --- a/vendor/github.com/weaveworks/common/middleware/logging.go +++ b/vendor/github.com/grafana/dskit/middleware/logging.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -7,18 +11,19 @@ import ( "net/http" "time" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/tracing" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/tracing" + "github.com/grafana/dskit/user" ) // Log middleware logs http requests type Log struct { - Log logging.Interface - LogRequestHeaders bool // LogRequestHeaders true -> dump http headers at debug log level - LogRequestAtInfoLevel bool // LogRequestAtInfoLevel true -> log requests at info log level - SourceIPs *SourceIPExtractor - HttpHeadersToExclude map[string]bool + Log log.Interface + DisableRequestSuccessLog bool + LogRequestHeaders bool // LogRequestHeaders true -> dump http headers at debug log level + LogRequestAtInfoLevel bool // LogRequestAtInfoLevel true -> log requests at info log level + SourceIPs *SourceIPExtractor + HTTPHeadersToExclude map[string]bool } var defaultExcludedHeaders = map[string]bool{ @@ -27,7 +32,7 @@ var defaultExcludedHeaders = map[string]bool{ "Authorization": true, } -func NewLogMiddleware(log logging.Interface, logRequestHeaders bool, logRequestAtInfoLevel bool, sourceIPs *SourceIPExtractor, headersList []string) Log { +func NewLogMiddleware(log log.Interface, logRequestHeaders bool, logRequestAtInfoLevel bool, sourceIPs *SourceIPExtractor, headersList []string) Log { httpHeadersToExclude := map[string]bool{} for header := range defaultExcludedHeaders { httpHeadersToExclude[header] = true @@ -41,12 +46,12 @@ func NewLogMiddleware(log logging.Interface, logRequestHeaders bool, logRequestA LogRequestHeaders: logRequestHeaders, LogRequestAtInfoLevel: logRequestAtInfoLevel, SourceIPs: sourceIPs, - HttpHeadersToExclude: httpHeadersToExclude, + HTTPHeadersToExclude: httpHeadersToExclude, } } // logWithRequest information from the request and context as fields. -func (l Log) logWithRequest(r *http.Request) logging.Interface { +func (l Log) logWithRequest(r *http.Request) log.Interface { localLog := l.Log traceID, ok := tracing.ExtractTraceID(r.Context()) if ok { @@ -70,7 +75,7 @@ func (l Log) Wrap(next http.Handler) http.Handler { uri := r.RequestURI // capture the URI before running next, as it may get rewritten requestLog := l.logWithRequest(r) // Log headers before running 'next' in case other interceptors change the data. - headers, err := dumpRequest(r, l.HttpHeadersToExclude) + headers, err := dumpRequest(r, l.HTTPHeadersToExclude) if err != nil { headers = nil requestLog.Errorf("Could not dump request headers: %v", err) @@ -94,20 +99,27 @@ func (l Log) Wrap(next http.Handler) http.Handler { return } - if 100 <= statusCode && statusCode < 500 || statusCode == http.StatusBadGateway || statusCode == http.StatusServiceUnavailable { + + switch { + // success and shouldn't log successful requests. + case statusCode >= 200 && statusCode < 300 && l.DisableRequestSuccessLog: + return + + case 100 <= statusCode && statusCode < 500 || statusCode == http.StatusBadGateway || statusCode == http.StatusServiceUnavailable: if l.LogRequestAtInfoLevel { requestLog.Infof("%s %s (%d) %s", r.Method, uri, statusCode, time.Since(begin)) - } else { - requestLog.Debugf("%s %s (%d) %s", r.Method, uri, statusCode, time.Since(begin)) - } - if l.LogRequestHeaders && headers != nil { - if l.LogRequestAtInfoLevel { + + if l.LogRequestHeaders && headers != nil { requestLog.Infof("ws: %v; %s", IsWSHandshakeRequest(r), string(headers)) - } else { - requestLog.Debugf("ws: %v; %s", IsWSHandshakeRequest(r), string(headers)) } + return + } + + requestLog.Debugf("%s %s (%d) %s", r.Method, uri, statusCode, time.Since(begin)) + if l.LogRequestHeaders && headers != nil { + requestLog.Debugf("ws: %v; %s", IsWSHandshakeRequest(r), string(headers)) } - } else { + default: requestLog.Warnf("%s %s (%d) %s Response: %q ws: %v; %s", r.Method, uri, statusCode, time.Since(begin), buf.Bytes(), IsWSHandshakeRequest(r), headers) } @@ -117,7 +129,7 @@ func (l Log) Wrap(next http.Handler) http.Handler { // Logging middleware logs each HTTP request method, path, response code and // duration for all HTTP requests. var Logging = Log{ - Log: logging.Global(), + Log: log.Global(), } func dumpRequest(req *http.Request, httpHeadersToExclude map[string]bool) ([]byte, error) { diff --git a/vendor/github.com/weaveworks/common/middleware/middleware.go b/vendor/github.com/grafana/dskit/middleware/middleware.go similarity index 81% rename from vendor/github.com/weaveworks/common/middleware/middleware.go rename to vendor/github.com/grafana/dskit/middleware/middleware.go index ad8925ac868..79720b333f2 100644 --- a/vendor/github.com/weaveworks/common/middleware/middleware.go +++ b/vendor/github.com/grafana/dskit/middleware/middleware.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/middleware.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/path_rewrite.go b/vendor/github.com/grafana/dskit/middleware/path_rewrite.go similarity index 87% rename from vendor/github.com/weaveworks/common/middleware/path_rewrite.go rename to vendor/github.com/grafana/dskit/middleware/path_rewrite.go index 8250201a88c..c9e917a72b7 100644 --- a/vendor/github.com/weaveworks/common/middleware/path_rewrite.go +++ b/vendor/github.com/grafana/dskit/middleware/path_rewrite.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/path_rewrite.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/response.go b/vendor/github.com/grafana/dskit/middleware/response.go similarity index 90% rename from vendor/github.com/weaveworks/common/middleware/response.go rename to vendor/github.com/grafana/dskit/middleware/response.go index 2655003c88f..e2ce1d0a7ee 100644 --- a/vendor/github.com/weaveworks/common/middleware/response.go +++ b/vendor/github.com/grafana/dskit/middleware/response.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/response.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -108,12 +112,12 @@ func (b *nonFlushingBadResponseLoggingWriter) getWriteError() error { func (b *nonFlushingBadResponseLoggingWriter) captureResponseBody(data []byte) { if len(data) > b.bodyBytesLeft { - b.buffer.Write(data[:b.bodyBytesLeft]) - io.WriteString(b.buffer, "...") + _, _ = b.buffer.Write(data[:b.bodyBytesLeft]) + _, _ = io.WriteString(b.buffer, "...") b.bodyBytesLeft = 0 b.logBody = false } else { - b.buffer.Write(data) + _, _ = b.buffer.Write(data) b.bodyBytesLeft -= len(data) } } diff --git a/vendor/github.com/weaveworks/common/middleware/source_ips.go b/vendor/github.com/grafana/dskit/middleware/source_ips.go similarity index 95% rename from vendor/github.com/weaveworks/common/middleware/source_ips.go rename to vendor/github.com/grafana/dskit/middleware/source_ips.go index 17178d427dd..7c035ddbf47 100644 --- a/vendor/github.com/weaveworks/common/middleware/source_ips.go +++ b/vendor/github.com/grafana/dskit/middleware/source_ips.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/source_ips.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/grafana/dskit/ring/client/pool.go b/vendor/github.com/grafana/dskit/ring/client/pool.go index ee9d06b6b39..5e21e69c339 100644 --- a/vendor/github.com/grafana/dskit/ring/client/pool.go +++ b/vendor/github.com/grafana/dskit/ring/client/pool.go @@ -10,12 +10,12 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/user" "google.golang.org/grpc/health/grpc_health_v1" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/internal/slices" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" ) // PoolClient is the interface that should be implemented by a diff --git a/vendor/github.com/weaveworks/common/server/fake_server.pb.go b/vendor/github.com/grafana/dskit/server/fake_server.pb.go similarity index 53% rename from vendor/github.com/weaveworks/common/server/fake_server.pb.go rename to vendor/github.com/grafana/dskit/server/fake_server.pb.go index 4fafbb2f32d..75ee6b0a14e 100644 --- a/vendor/github.com/weaveworks/common/server/fake_server.pb.go +++ b/vendor/github.com/grafana/dskit/server/fake_server.pb.go @@ -1,17 +1,21 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: server/fake_server.proto +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fake_server.proto package server import ( context "context" fmt "fmt" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,33 +27,37 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type FailWithHTTPErrorRequest struct { - Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` } -func (m *FailWithHTTPErrorRequest) Reset() { *m = FailWithHTTPErrorRequest{} } -func (m *FailWithHTTPErrorRequest) String() string { return proto.CompactTextString(m) } -func (*FailWithHTTPErrorRequest) ProtoMessage() {} +func (m *FailWithHTTPErrorRequest) Reset() { *m = FailWithHTTPErrorRequest{} } +func (*FailWithHTTPErrorRequest) ProtoMessage() {} func (*FailWithHTTPErrorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2267b95bf2c64cdc, []int{0} + return fileDescriptor_a932e7b7b9f5c118, []int{0} } - func (m *FailWithHTTPErrorRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FailWithHTTPErrorRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *FailWithHTTPErrorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FailWithHTTPErrorRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_FailWithHTTPErrorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *FailWithHTTPErrorRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_FailWithHTTPErrorRequest.Merge(m, src) } func (m *FailWithHTTPErrorRequest) XXX_Size() int { - return xxx_messageInfo_FailWithHTTPErrorRequest.Size(m) + return m.Size() } func (m *FailWithHTTPErrorRequest) XXX_DiscardUnknown() { xxx_messageInfo_FailWithHTTPErrorRequest.DiscardUnknown(m) @@ -68,26 +76,70 @@ func init() { proto.RegisterType((*FailWithHTTPErrorRequest)(nil), "server.FailWithHTTPErrorRequest") } -func init() { proto.RegisterFile("server/fake_server.proto", fileDescriptor_2267b95bf2c64cdc) } - -var fileDescriptor_2267b95bf2c64cdc = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x4e, 0x2d, 0x2a, - 0x4b, 0x2d, 0xd2, 0x4f, 0x4b, 0xcc, 0x4e, 0x8d, 0x87, 0xb0, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, - 0x85, 0xd8, 0x20, 0x3c, 0x29, 0xe9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0xb0, 0x68, 0x52, - 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x91, 0x92, 0x1e, 0x97, 0x84, 0x5b, 0x62, - 0x66, 0x4e, 0x78, 0x66, 0x49, 0x86, 0x47, 0x48, 0x48, 0x80, 0x6b, 0x51, 0x51, 0x7e, 0x51, 0x50, - 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x10, 0x17, 0x8b, 0x73, 0x7e, 0x4a, 0xaa, 0x04, 0xa3, - 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x98, 0x6d, 0x74, 0x9b, 0x89, 0x8b, 0xcb, 0x2d, 0x31, 0x3b, 0x35, - 0x18, 0x6c, 0xb6, 0x90, 0x35, 0x17, 0x7b, 0x70, 0x69, 0x72, 0x72, 0x6a, 0x6a, 0x8a, 0x90, 0x98, - 0x1e, 0xc4, 0x1e, 0x3d, 0x98, 0x3d, 0x7a, 0xae, 0x20, 0x7b, 0xa4, 0x70, 0x88, 0x2b, 0x31, 0x08, - 0x39, 0x72, 0xf1, 0xc2, 0xec, 0x06, 0xdb, 0x4b, 0x86, 0x11, 0xfe, 0x5c, 0x82, 0x18, 0xce, 0x17, - 0x52, 0xd0, 0x83, 0x86, 0x03, 0x2e, 0x9f, 0xe1, 0x31, 0xd0, 0x92, 0x8b, 0x35, 0x38, 0x27, 0x35, - 0xb5, 0x80, 0x2c, 0xef, 0x70, 0x07, 0x97, 0x14, 0xa5, 0x26, 0xe6, 0x92, 0x69, 0x80, 0x01, 0xa3, - 0x93, 0x6a, 0x94, 0x72, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x79, - 0x6a, 0x62, 0x59, 0x6a, 0x79, 0x7e, 0x51, 0x76, 0xb1, 0x7e, 0x72, 0x7e, 0x6e, 0x6e, 0x7e, 0x9e, - 0x3e, 0xc4, 0x5f, 0x49, 0x6c, 0x60, 0xad, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xcd, - 0xa4, 0xf9, 0xfc, 0x01, 0x00, 0x00, +func init() { proto.RegisterFile("fake_server.proto", fileDescriptor_a932e7b7b9f5c118) } + +var fileDescriptor_a932e7b7b9f5c118 = []byte{ + // 265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x4b, 0xcc, 0x4e, + 0x8d, 0x2f, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, + 0xf0, 0xa4, 0xa4, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xa2, 0x49, 0xa5, 0x69, 0xfa, + 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x10, 0x45, 0x4a, 0x7a, 0x5c, 0x12, 0x6e, 0x89, 0x99, 0x39, 0xe1, + 0x99, 0x25, 0x19, 0x1e, 0x21, 0x21, 0x01, 0xae, 0x45, 0x45, 0xf9, 0x45, 0x41, 0xa9, 0x85, 0xa5, + 0xa9, 0xc5, 0x25, 0x42, 0x42, 0x5c, 0x2c, 0xce, 0xf9, 0x29, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0xac, 0x41, 0x60, 0xb6, 0xd1, 0x6d, 0x26, 0x2e, 0x2e, 0xb7, 0xc4, 0xec, 0xd4, 0x60, 0xb0, 0xd9, + 0x42, 0xd6, 0x5c, 0xec, 0xc1, 0xa5, 0xc9, 0xc9, 0xa9, 0xa9, 0x29, 0x42, 0x62, 0x7a, 0x10, 0x7b, + 0xf4, 0x60, 0xf6, 0xe8, 0xb9, 0x82, 0xec, 0x91, 0xc2, 0x21, 0xae, 0xc4, 0x20, 0xe4, 0xc8, 0xc5, + 0x0b, 0xb3, 0x1b, 0x6c, 0x2f, 0x19, 0x46, 0xf8, 0x73, 0x09, 0x62, 0x38, 0x5f, 0x48, 0x41, 0x0f, + 0x1a, 0x0e, 0xb8, 0x7c, 0x86, 0xc7, 0x40, 0x4b, 0x2e, 0xd6, 0xe0, 0x9c, 0xd4, 0xd4, 0x02, 0xb2, + 0xbc, 0xc3, 0x1d, 0x5c, 0x52, 0x94, 0x9a, 0x98, 0x4b, 0xa6, 0x01, 0x06, 0x8c, 0x4e, 0x26, 0x17, + 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, + 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, + 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, + 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x92, 0xd8, 0xc0, 0x26, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x43, 0x2b, 0x71, 0x6d, 0x04, 0x02, 0x00, 0x00, +} + +func (this *FailWithHTTPErrorRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FailWithHTTPErrorRequest) + if !ok { + that2, ok := that.(FailWithHTTPErrorRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Code != that1.Code { + return false + } + return true +} +func (this *FailWithHTTPErrorRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&server.FailWithHTTPErrorRequest{") + s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFakeServer(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) } // Reference imports to suppress errors if they are not otherwise used. @@ -339,5 +391,263 @@ var _FakeServer_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "server/fake_server.proto", + Metadata: "fake_server.proto", +} + +func (m *FailWithHTTPErrorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FailWithHTTPErrorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FailWithHTTPErrorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintFakeServer(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintFakeServer(dAtA []byte, offset int, v uint64) int { + offset -= sovFakeServer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FailWithHTTPErrorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovFakeServer(uint64(m.Code)) + } + return n +} + +func sovFakeServer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFakeServer(x uint64) (n int) { + return sovFakeServer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *FailWithHTTPErrorRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FailWithHTTPErrorRequest{`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `}`, + }, "") + return s +} +func valueToStringFakeServer(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FailWithHTTPErrorRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFakeServer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FailWithHTTPErrorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FailWithHTTPErrorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFakeServer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFakeServer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFakeServer + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthFakeServer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFakeServer(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFakeServer + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthFakeServer + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipFakeServer(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthFakeServer + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthFakeServer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFakeServer = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/github.com/weaveworks/common/server/fake_server.proto b/vendor/github.com/grafana/dskit/server/fake_server.proto similarity index 90% rename from vendor/github.com/weaveworks/common/server/fake_server.proto rename to vendor/github.com/grafana/dskit/server/fake_server.proto index bbf39381af5..248a6f244bd 100644 --- a/vendor/github.com/weaveworks/common/server/fake_server.proto +++ b/vendor/github.com/grafana/dskit/server/fake_server.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package server; -option go_package = "github.com/weaveworks/common/server"; - import "google/protobuf/empty.proto"; service FakeServer { diff --git a/vendor/github.com/grafana/dskit/server/metrics.go b/vendor/github.com/grafana/dskit/server/metrics.go new file mode 100644 index 00000000000..aa1c3e53aef --- /dev/null +++ b/vendor/github.com/grafana/dskit/server/metrics.go @@ -0,0 +1,67 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/metrics.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package server + +import ( + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + + "github.com/grafana/dskit/instrument" + "github.com/grafana/dskit/middleware" +) + +type Metrics struct { + TCPConnections *prometheus.GaugeVec + TCPConnectionsLimit *prometheus.GaugeVec + RequestDuration *prometheus.HistogramVec + ReceivedMessageSize *prometheus.HistogramVec + SentMessageSize *prometheus.HistogramVec + InflightRequests *prometheus.GaugeVec +} + +func NewServerMetrics(cfg Config) *Metrics { + reg := promauto.With(cfg.registererOrDefault()) + + return &Metrics{ + TCPConnections: reg.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: cfg.MetricsNamespace, + Name: "tcp_connections", + Help: "Current number of accepted TCP connections.", + }, []string{"protocol"}), + TCPConnectionsLimit: reg.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: cfg.MetricsNamespace, + Name: "tcp_connections_limit", + Help: "The max number of TCP connections that can be accepted (0 means no limit).", + }, []string{"protocol"}), + RequestDuration: reg.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: cfg.MetricsNamespace, + Name: "request_duration_seconds", + Help: "Time (in seconds) spent serving HTTP requests.", + Buckets: instrument.DefBuckets, + NativeHistogramBucketFactor: cfg.MetricsNativeHistogramFactor, + NativeHistogramMaxBucketNumber: 100, + NativeHistogramMinResetDuration: time.Hour, + }, []string{"method", "route", "status_code", "ws"}), + ReceivedMessageSize: reg.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: cfg.MetricsNamespace, + Name: "request_message_bytes", + Help: "Size (in bytes) of messages received in the request.", + Buckets: middleware.BodySizeBuckets, + }, []string{"method", "route"}), + SentMessageSize: reg.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: cfg.MetricsNamespace, + Name: "response_message_bytes", + Help: "Size (in bytes) of messages sent in response.", + Buckets: middleware.BodySizeBuckets, + }, []string{"method", "route"}), + InflightRequests: reg.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: cfg.MetricsNamespace, + Name: "inflight_requests", + Help: "Current number of inflight requests.", + }, []string{"method", "route"}), + } +} diff --git a/vendor/github.com/weaveworks/common/server/server.go b/vendor/github.com/grafana/dskit/server/server.go similarity index 81% rename from vendor/github.com/weaveworks/common/server/server.go rename to vendor/github.com/grafana/dskit/server/server.go index 4026516f5eb..9275637cf7e 100644 --- a/vendor/github.com/weaveworks/common/server/server.go +++ b/vendor/github.com/grafana/dskit/server/server.go @@ -1,6 +1,11 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/server.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( + "context" "crypto/tls" "flag" "fmt" @@ -18,18 +23,16 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/exporter-toolkit/web" "github.com/soheilhy/cmux" - "golang.org/x/net/context" "golang.org/x/net/netutil" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepalive" - "github.com/weaveworks/common/httpgrpc" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/instrument" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/signals" + "github.com/grafana/dskit/httpgrpc" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/signals" ) // Listen on the named network @@ -110,15 +113,15 @@ type Config struct { GRPCServerMinTimeBetweenPings time.Duration `yaml:"grpc_server_min_time_between_pings"` GRPCServerPingWithoutStreamAllowed bool `yaml:"grpc_server_ping_without_stream_allowed"` - LogFormat logging.Format `yaml:"log_format"` - LogLevel logging.Level `yaml:"log_level"` - Log logging.Interface `yaml:"-"` - LogSourceIPs bool `yaml:"log_source_ips_enabled"` - LogSourceIPsHeader string `yaml:"log_source_ips_header"` - LogSourceIPsRegex string `yaml:"log_source_ips_regex"` - LogRequestHeaders bool `yaml:"log_request_headers"` - LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` - LogRequestExcludeHeadersList string `yaml:"log_request_exclude_headers_list"` + LogFormat log.Format `yaml:"log_format"` + LogLevel log.Level `yaml:"log_level"` + Log log.Interface `yaml:"-"` + LogSourceIPs bool `yaml:"log_source_ips_enabled"` + LogSourceIPsHeader string `yaml:"log_source_ips_header"` + LogSourceIPsRegex string `yaml:"log_source_ips_regex"` + LogRequestHeaders bool `yaml:"log_request_headers"` + LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` + LogRequestExcludeHeadersList string `yaml:"log_request_exclude_headers_list"` // If not set, default signal handler is used. SignalHandler SignalHandler `yaml:"-"` @@ -178,6 +181,14 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { f.BoolVar(&cfg.LogRequestAtInfoLevel, "server.log-request-at-info-level-enabled", false, "Optionally log requests at info level instead of debug level. Applies to request headers as well if server.log-request-headers is enabled.") } +func (cfg *Config) registererOrDefault() prometheus.Registerer { + // If user doesn't supply a Registerer/gatherer, use Prometheus' by default. + if cfg.Registerer != nil { + return cfg.Registerer + } + return prometheus.DefaultRegisterer +} + // Server wraps a HTTP and gRPC server, and some common initialization. // // Servers will be automatically instrumented for Prometheus metrics. @@ -197,44 +208,36 @@ type Server struct { HTTP *mux.Router HTTPServer *http.Server GRPC *grpc.Server - Log logging.Interface + Log log.Interface Registerer prometheus.Registerer Gatherer prometheus.Gatherer } -// New makes a new Server +// New makes a new Server. It will panic if the metrics cannot be registered. func New(cfg Config) (*Server, error) { + metrics := NewServerMetrics(cfg) + return newServer(cfg, metrics) +} + +// NewWithMetrics makes a new Server using the provided Metrics. It will not attempt to register the metrics, +// the user is responsible for doing so. +func NewWithMetrics(cfg Config, metrics *Metrics) (*Server, error) { + return newServer(cfg, metrics) +} + +func newServer(cfg Config, metrics *Metrics) (*Server, error) { // If user doesn't supply a logging implementation, by default instantiate // logrus. - log := cfg.Log - if log == nil { - log = logging.NewLogrus(cfg.LogLevel) + logger := cfg.Log + if logger == nil { + logger = log.NewLogrus(cfg.LogLevel) } - // If user doesn't supply a registerer/gatherer, use Prometheus' by default. - reg := cfg.Registerer - if reg == nil { - reg = prometheus.DefaultRegisterer - } gatherer := cfg.Gatherer if gatherer == nil { gatherer = prometheus.DefaultGatherer } - tcpConnections := prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: cfg.MetricsNamespace, - Name: "tcp_connections", - Help: "Current number of accepted TCP connections.", - }, []string{"protocol"}) - reg.MustRegister(tcpConnections) - - tcpConnectionsLimit := prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: cfg.MetricsNamespace, - Name: "tcp_connections_limit", - Help: "The max number of TCP connections that can be accepted (0 means no limit).", - }, []string{"protocol"}) - reg.MustRegister(tcpConnectionsLimit) - network := cfg.HTTPListenNetwork if network == "" { network = DefaultNetwork @@ -244,9 +247,9 @@ func New(cfg Config) (*Server, error) { if err != nil { return nil, err } - httpListener = middleware.CountingListener(httpListener, tcpConnections.WithLabelValues("http")) + httpListener = middleware.CountingListener(httpListener, metrics.TCPConnections.WithLabelValues("http")) - tcpConnectionsLimit.WithLabelValues("http").Set(float64(cfg.HTTPConnLimit)) + metrics.TCPConnectionsLimit.WithLabelValues("http").Set(float64(cfg.HTTPConnLimit)) if cfg.HTTPConnLimit > 0 { httpListener = netutil.LimitListener(httpListener, cfg.HTTPConnLimit) } @@ -268,9 +271,9 @@ func New(cfg Config) (*Server, error) { if err != nil { return nil, err } - grpcListener = middleware.CountingListener(grpcListener, tcpConnections.WithLabelValues("grpc")) + grpcListener = middleware.CountingListener(grpcListener, metrics.TCPConnections.WithLabelValues("grpc")) - tcpConnectionsLimit.WithLabelValues("grpc").Set(float64(cfg.GRPCConnLimit)) + metrics.TCPConnectionsLimit.WithLabelValues("grpc").Set(float64(cfg.GRPCConnLimit)) if cfg.GRPCConnLimit > 0 { grpcListener = netutil.LimitListener(grpcListener, cfg.GRPCConnLimit) } @@ -316,60 +319,25 @@ func New(cfg Config) (*Server, error) { } } - // Prometheus histograms for requests. - requestDuration := prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: cfg.MetricsNamespace, - Name: "request_duration_seconds", - Help: "Time (in seconds) spent serving HTTP requests.", - Buckets: instrument.DefBuckets, - NativeHistogramBucketFactor: cfg.MetricsNativeHistogramFactor, - NativeHistogramMaxBucketNumber: 100, - NativeHistogramMinResetDuration: time.Hour, - }, []string{"method", "route", "status_code", "ws"}) - reg.MustRegister(requestDuration) - - receivedMessageSize := prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: cfg.MetricsNamespace, - Name: "request_message_bytes", - Help: "Size (in bytes) of messages received in the request.", - Buckets: middleware.BodySizeBuckets, - }, []string{"method", "route"}) - reg.MustRegister(receivedMessageSize) - - sentMessageSize := prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: cfg.MetricsNamespace, - Name: "response_message_bytes", - Help: "Size (in bytes) of messages sent in response.", - Buckets: middleware.BodySizeBuckets, - }, []string{"method", "route"}) - reg.MustRegister(sentMessageSize) - - inflightRequests := prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: cfg.MetricsNamespace, - Name: "inflight_requests", - Help: "Current number of inflight requests.", - }, []string{"method", "route"}) - reg.MustRegister(inflightRequests) - - log.WithField("http", httpListener.Addr()).WithField("grpc", grpcListener.Addr()).Infof("server listening on addresses") + logger.WithField("http", httpListener.Addr()).WithField("grpc", grpcListener.Addr()).Infof("server listening on addresses") // Setup gRPC server serverLog := middleware.GRPCServerLog{ - Log: log, + Log: logger, WithRequest: !cfg.ExcludeRequestInLog, DisableRequestSuccessLog: cfg.DisableRequestSuccessLog, } grpcMiddleware := []grpc.UnaryServerInterceptor{ serverLog.UnaryServerInterceptor, otgrpc.OpenTracingServerInterceptor(opentracing.GlobalTracer()), - middleware.UnaryServerInstrumentInterceptor(requestDuration), + middleware.UnaryServerInstrumentInterceptor(metrics.RequestDuration), } grpcMiddleware = append(grpcMiddleware, cfg.GRPCMiddleware...) grpcStreamMiddleware := []grpc.StreamServerInterceptor{ serverLog.StreamServerInterceptor, otgrpc.OpenTracingStreamServerInterceptor(opentracing.GlobalTracer()), - middleware.StreamServerInstrumentInterceptor(requestDuration), + middleware.StreamServerInstrumentInterceptor(metrics.RequestDuration), } grpcStreamMiddleware = append(grpcStreamMiddleware, cfg.GRPCStreamMiddleware...) @@ -394,7 +362,11 @@ func New(cfg Config) (*Server, error) { grpc.MaxRecvMsgSize(cfg.GPRCServerMaxRecvMsgSize), grpc.MaxSendMsgSize(cfg.GRPCServerMaxSendMsgSize), grpc.MaxConcurrentStreams(uint32(cfg.GPRCServerMaxConcurrentStreams)), - grpc.StatsHandler(middleware.NewStatsHandler(receivedMessageSize, sentMessageSize, inflightRequests)), + grpc.StatsHandler(middleware.NewStatsHandler( + metrics.ReceivedMessageSize, + metrics.SentMessageSize, + metrics.InflightRequests, + )), } grpcOptions = append(grpcOptions, cfg.GRPCOptions...) if grpcTLSConfig != nil { @@ -402,7 +374,7 @@ func New(cfg Config) (*Server, error) { grpcOptions = append(grpcOptions, grpc.Creds(grpcCreds)) } grpcServer := grpc.NewServer(grpcOptions...) - grpcOnHttpServer := grpc.NewServer(grpcOptions...) + grpcOnHTTPServer := grpc.NewServer(grpcOptions...) // Setup HTTP server var router *mux.Router @@ -428,18 +400,21 @@ func New(cfg Config) (*Server, error) { } } + defaultLogMiddleware := middleware.NewLogMiddleware(logger, cfg.LogRequestHeaders, cfg.LogRequestAtInfoLevel, sourceIPs, strings.Split(cfg.LogRequestExcludeHeadersList, ",")) + defaultLogMiddleware.DisableRequestSuccessLog = cfg.DisableRequestSuccessLog + defaultHTTPMiddleware := []middleware.Interface{ middleware.Tracer{ RouteMatcher: router, SourceIPs: sourceIPs, }, - middleware.NewLogMiddleware(log, cfg.LogRequestHeaders, cfg.LogRequestAtInfoLevel, sourceIPs, strings.Split(cfg.LogRequestExcludeHeadersList, ",")), + defaultLogMiddleware, middleware.Instrument{ RouteMatcher: router, - Duration: requestDuration, - RequestBodySize: receivedMessageSize, - ResponseBodySize: sentMessageSize, - InflightRequests: inflightRequests, + Duration: metrics.RequestDuration, + RequestBodySize: metrics.ReceivedMessageSize, + ResponseBodySize: metrics.SentMessageSize, + InflightRequests: metrics.InflightRequests, }, } var httpMiddleware []middleware.Interface @@ -461,7 +436,7 @@ func New(cfg Config) (*Server, error) { handler := cfg.SignalHandler if handler == nil { - handler = signals.NewHandler(log) + handler = signals.NewHandler(logger) } return &Server{ @@ -475,9 +450,9 @@ func New(cfg Config) (*Server, error) { HTTP: router, HTTPServer: httpServer, GRPC: grpcServer, - GRPCOnHTTPServer: grpcOnHttpServer, - Log: log, - Registerer: reg, + GRPCOnHTTPServer: grpcOnHTTPServer, + Log: logger, + Registerer: cfg.registererOrDefault(), Gatherer: gatherer, }, nil } @@ -583,6 +558,6 @@ func (s *Server) Shutdown() { ctx, cancel := context.WithTimeout(context.Background(), s.cfg.ServerGracefulShutdownTimeout) defer cancel() // releases resources if httpServer.Shutdown completes before timeout elapses - s.HTTPServer.Shutdown(ctx) + _ = s.HTTPServer.Shutdown(ctx) s.GRPC.GracefulStop() } diff --git a/vendor/github.com/weaveworks/common/server/tls_config.go b/vendor/github.com/grafana/dskit/server/tls_config.go similarity index 87% rename from vendor/github.com/weaveworks/common/server/tls_config.go rename to vendor/github.com/grafana/dskit/server/tls_config.go index b374a67c41b..128c6d04f05 100644 --- a/vendor/github.com/weaveworks/common/server/tls_config.go +++ b/vendor/github.com/grafana/dskit/server/tls_config.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/tls_config.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( diff --git a/vendor/github.com/weaveworks/common/signals/signals.go b/vendor/github.com/grafana/dskit/signals/signals.go similarity index 78% rename from vendor/github.com/weaveworks/common/signals/signals.go rename to vendor/github.com/grafana/dskit/signals/signals.go index 29d45fc8980..75609a745e6 100644 --- a/vendor/github.com/weaveworks/common/signals/signals.go +++ b/vendor/github.com/grafana/dskit/signals/signals.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/signals/signals.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package signals import ( @@ -6,7 +10,7 @@ import ( "runtime" "syscall" - "github.com/weaveworks/common/logging" + "github.com/grafana/dskit/log" ) // SignalReceiver represents a subsystem/server/... that can be stopped or @@ -19,13 +23,13 @@ type SignalReceiver interface { // On SIGINT or SIGTERM it will exit, on SIGQUIT it // will dump goroutine stacks to the Logger. type Handler struct { - log logging.Interface + log log.Interface receivers []SignalReceiver quit chan struct{} } // NewHandler makes a new Handler. -func NewHandler(log logging.Interface, receivers ...SignalReceiver) *Handler { +func NewHandler(log log.Interface, receivers ...SignalReceiver) *Handler { return &Handler{ log: log, receivers: receivers, @@ -54,7 +58,7 @@ func (h *Handler) Loop() { case syscall.SIGINT, syscall.SIGTERM: h.log.Infof("=== received SIGINT/SIGTERM ===\n*** exiting") for _, subsystem := range h.receivers { - subsystem.Stop() + _ = subsystem.Stop() } return case syscall.SIGQUIT: @@ -68,6 +72,6 @@ func (h *Handler) Loop() { // SignalHandlerLoop blocks until it receives a SIGINT, SIGTERM or SIGQUIT. // For SIGINT and SIGTERM, it exits; for SIGQUIT is print a goroutine stack // dump. -func SignalHandlerLoop(log logging.Interface, ss ...SignalReceiver) { +func SignalHandlerLoop(log log.Interface, ss ...SignalReceiver) { NewHandler(log, ss...).Loop() } diff --git a/vendor/github.com/grafana/dskit/tenant/resolver.go b/vendor/github.com/grafana/dskit/tenant/resolver.go index f0fd8abfea7..aa19d75bb4a 100644 --- a/vendor/github.com/grafana/dskit/tenant/resolver.go +++ b/vendor/github.com/grafana/dskit/tenant/resolver.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) var defaultResolver Resolver = NewSingleResolver() diff --git a/vendor/github.com/grafana/dskit/tenant/tenant.go b/vendor/github.com/grafana/dskit/tenant/tenant.go index c7c772648c5..a5807500e52 100644 --- a/vendor/github.com/grafana/dskit/tenant/tenant.go +++ b/vendor/github.com/grafana/dskit/tenant/tenant.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) var ( diff --git a/vendor/github.com/weaveworks/common/tracing/tracing.go b/vendor/github.com/grafana/dskit/tracing/tracing.go similarity index 92% rename from vendor/github.com/weaveworks/common/tracing/tracing.go rename to vendor/github.com/grafana/dskit/tracing/tracing.go index 55fdfde972f..66b3a3cef4c 100644 --- a/vendor/github.com/weaveworks/common/tracing/tracing.go +++ b/vendor/github.com/grafana/dskit/tracing/tracing.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/tracing/tracing.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package tracing import ( diff --git a/vendor/github.com/weaveworks/common/user/grpc.go b/vendor/github.com/grafana/dskit/user/grpc.go similarity index 85% rename from vendor/github.com/weaveworks/common/user/grpc.go rename to vendor/github.com/grafana/dskit/user/grpc.go index 64f0491a85b..201b835eeab 100644 --- a/vendor/github.com/weaveworks/common/user/grpc.go +++ b/vendor/github.com/grafana/dskit/user/grpc.go @@ -1,7 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/grpc.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc/metadata" ) diff --git a/vendor/github.com/weaveworks/common/user/http.go b/vendor/github.com/grafana/dskit/user/http.go similarity index 91% rename from vendor/github.com/weaveworks/common/user/http.go rename to vendor/github.com/grafana/dskit/user/http.go index c15fd4106d5..ca015b36de3 100644 --- a/vendor/github.com/weaveworks/common/user/http.go +++ b/vendor/github.com/grafana/dskit/user/http.go @@ -1,9 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/http.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( + "context" "net/http" - - "golang.org/x/net/context" ) const ( diff --git a/vendor/github.com/weaveworks/common/user/id.go b/vendor/github.com/grafana/dskit/user/id.go similarity index 86% rename from vendor/github.com/weaveworks/common/user/id.go rename to vendor/github.com/grafana/dskit/user/id.go index a1f91f0c1f0..2396787c28c 100644 --- a/vendor/github.com/weaveworks/common/user/id.go +++ b/vendor/github.com/grafana/dskit/user/id.go @@ -1,9 +1,13 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/id.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" - "github.com/weaveworks/common/errors" + "github.com/grafana/dskit/errors" ) type contextKey int diff --git a/vendor/github.com/weaveworks/common/user/logging.go b/vendor/github.com/grafana/dskit/user/logging.go similarity index 50% rename from vendor/github.com/weaveworks/common/user/logging.go rename to vendor/github.com/grafana/dskit/user/logging.go index b873945be36..0db1946c864 100644 --- a/vendor/github.com/weaveworks/common/user/logging.go +++ b/vendor/github.com/grafana/dskit/user/logging.go @@ -1,13 +1,17 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" - "github.com/weaveworks/common/logging" + "github.com/grafana/dskit/log" ) // LogWith returns user and org information from the context as log fields. -func LogWith(ctx context.Context, log logging.Interface) logging.Interface { +func LogWith(ctx context.Context, log log.Interface) log.Interface { userID, err := ExtractUserID(ctx) if err == nil { log = log.WithField("userID", userID) diff --git a/vendor/github.com/weaveworks/common/COPYING.LGPL-3 b/vendor/github.com/weaveworks/common/COPYING.LGPL-3 deleted file mode 100644 index 89c7d69ec7c..00000000000 --- a/vendor/github.com/weaveworks/common/COPYING.LGPL-3 +++ /dev/null @@ -1,175 +0,0 @@ -./tools/integration/assert.sh is a copy of - - https://github.com/lehmannro/assert.sh/blob/master/assert.sh - -Since it was imported from its original source, it has only received -cosmetic modifications. As it is licensed under the LGPL-3, here's the -license text in its entirety: - - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/vendor/github.com/weaveworks/common/LICENSE b/vendor/github.com/weaveworks/common/LICENSE deleted file mode 100644 index a710357f3b0..00000000000 --- a/vendor/github.com/weaveworks/common/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014-2016 Weaveworks Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/weaveworks/common/NOTICE b/vendor/github.com/weaveworks/common/NOTICE deleted file mode 100644 index 4c34873a360..00000000000 --- a/vendor/github.com/weaveworks/common/NOTICE +++ /dev/null @@ -1,3 +0,0 @@ -Weave -Copyright 2016 Weaveworks Ltd. -This product includes software developed at Weaveworks Ltd. diff --git a/vendor/github.com/weaveworks/common/errors/error.go b/vendor/github.com/weaveworks/common/errors/error.go deleted file mode 100644 index 6d1f9799553..00000000000 --- a/vendor/github.com/weaveworks/common/errors/error.go +++ /dev/null @@ -1,6 +0,0 @@ -package errors - -// Error see https://dave.cheney.net/2016/04/07/constant-errors. -type Error string - -func (e Error) Error() string { return string(e) } diff --git a/vendor/github.com/weaveworks/common/httpgrpc/tools.go b/vendor/github.com/weaveworks/common/httpgrpc/tools.go deleted file mode 100644 index 866af4b6975..00000000000 --- a/vendor/github.com/weaveworks/common/httpgrpc/tools.go +++ /dev/null @@ -1,6 +0,0 @@ -package httpgrpc - -import ( - // This is a workaround for go mod which fails to download gogoproto otherwise - _ "github.com/gogo/protobuf/gogoproto" -) diff --git a/vendor/github.com/weaveworks/common/logging/noop.go b/vendor/github.com/weaveworks/common/logging/noop.go deleted file mode 100644 index 8b7201ca948..00000000000 --- a/vendor/github.com/weaveworks/common/logging/noop.go +++ /dev/null @@ -1,23 +0,0 @@ -package logging - -// Noop logger. -func Noop() Interface { - return noop{} -} - -type noop struct{} - -func (noop) Debugf(format string, args ...interface{}) {} -func (noop) Debugln(args ...interface{}) {} -func (noop) Infof(format string, args ...interface{}) {} -func (noop) Infoln(args ...interface{}) {} -func (noop) Warnf(format string, args ...interface{}) {} -func (noop) Warnln(args ...interface{}) {} -func (noop) Errorf(format string, args ...interface{}) {} -func (noop) Errorln(args ...interface{}) {} -func (noop) WithField(key string, value interface{}) Interface { - return noop{} -} -func (noop) WithFields(Fields) Interface { - return noop{} -} diff --git a/vendor/modules.txt b/vendor/modules.txt index f22ea9a0da0..2b4867a5261 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -353,7 +353,7 @@ github.com/gorilla/handlers # github.com/gorilla/mux v1.8.0 ## explicit; go 1.12 github.com/gorilla/mux -# github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 +# github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 ## explicit; go 1.18 github.com/grafana/dskit/backoff github.com/grafana/dskit/concurrency @@ -361,10 +361,14 @@ github.com/grafana/dskit/crypto/tls github.com/grafana/dskit/dns github.com/grafana/dskit/dns/godns github.com/grafana/dskit/dns/miekgdns +github.com/grafana/dskit/errors github.com/grafana/dskit/flagext github.com/grafana/dskit/grpcclient github.com/grafana/dskit/grpcencoding/snappy github.com/grafana/dskit/grpcutil +github.com/grafana/dskit/httpgrpc +github.com/grafana/dskit/httpgrpc/server +github.com/grafana/dskit/instrument github.com/grafana/dskit/internal/math github.com/grafana/dskit/internal/slices github.com/grafana/dskit/kv @@ -373,7 +377,9 @@ github.com/grafana/dskit/kv/consul github.com/grafana/dskit/kv/etcd github.com/grafana/dskit/kv/memberlist github.com/grafana/dskit/limiter +github.com/grafana/dskit/log github.com/grafana/dskit/loser +github.com/grafana/dskit/middleware github.com/grafana/dskit/modules github.com/grafana/dskit/multierror github.com/grafana/dskit/netutil @@ -382,8 +388,12 @@ github.com/grafana/dskit/ring/client github.com/grafana/dskit/ring/shard github.com/grafana/dskit/runtimeconfig github.com/grafana/dskit/runutil +github.com/grafana/dskit/server github.com/grafana/dskit/services +github.com/grafana/dskit/signals github.com/grafana/dskit/tenant +github.com/grafana/dskit/tracing +github.com/grafana/dskit/user # github.com/grafana/e2e v0.1.1-0.20221018202458-cffd2bb71c7b ## explicit; go 1.17 github.com/grafana/e2e @@ -1026,19 +1036,6 @@ github.com/uber/jaeger-client-go/utils ## explicit github.com/uber/jaeger-lib/metrics github.com/uber/jaeger-lib/metrics/prometheus -# github.com/weaveworks/common v0.0.0-20230511094633-334485600903 -## explicit; go 1.14 -github.com/weaveworks/common/errors -github.com/weaveworks/common/grpc -github.com/weaveworks/common/httpgrpc -github.com/weaveworks/common/httpgrpc/server -github.com/weaveworks/common/instrument -github.com/weaveworks/common/logging -github.com/weaveworks/common/middleware -github.com/weaveworks/common/server -github.com/weaveworks/common/signals -github.com/weaveworks/common/tracing -github.com/weaveworks/common/user # github.com/weaveworks/promrus v1.2.0 ## explicit github.com/weaveworks/promrus