From 576ce1345511f3b1e560ee15245711e02e0c7cc4 Mon Sep 17 00:00:00 2001 From: kpango Date: Fri, 2 Sep 2022 17:16:44 +0900 Subject: [PATCH] change opencensus tracing to opentelemetry tracing Signed-off-by: kpango --- Makefile | 16 +- apis/docs/v1/docs.md | 142 +- apis/grpc/v1/agent/core/agent.pb.go | 2 +- apis/grpc/v1/agent/sidecar/sidecar.pb.go | 2 +- apis/grpc/v1/discoverer/discoverer.pb.go | 2 +- .../grpc/v1/filter/egress/egress_filter.pb.go | 2 +- .../v1/filter/ingress/ingress_filter.pb.go | 2 +- .../grpc/v1/manager/index/index_manager.pb.go | 2 +- apis/grpc/v1/payload/interface.go | 4 +- apis/grpc/v1/payload/payload.pb.go | 7 +- apis/grpc/v1/vald/filter.pb.go | 2 +- apis/grpc/v1/vald/insert.pb.go | 2 +- apis/grpc/v1/vald/object.pb.go | 2 +- apis/grpc/v1/vald/remove.pb.go | 2 +- apis/grpc/v1/vald/search.pb.go | 2 +- apis/grpc/v1/vald/update.pb.go | 2 +- apis/grpc/v1/vald/upsert.pb.go | 2 +- charts/vald/values.go | 4 +- charts/vald/values.yaml | 4 +- cmd/tools/cli/loadtest/main.go | 4 +- cmd/tools/cli/loadtest/main_test.go | 4 +- example/client/agent/main.go | 4 +- example/client/go.mod | 16 +- example/client/go.sum | 47 +- example/client/main.go | 4 +- go.mod | 262 +-- go.sum | 475 ++-- hack/benchmark/assets/x1b/loader.go | 4 +- .../benchmark/assets/x1b/loader_bench_test.go | 4 +- hack/benchmark/assets/x1b/loader_test.go | 4 +- .../e2e/agent/core/ngt/ngt_bench_test.go | 4 +- hack/benchmark/internal/assets/dataset.go | 4 +- .../benchmark/internal/assets/dataset_test.go | 4 +- hack/benchmark/internal/operation/insert.go | 4 +- .../internal/operation/insert_test.go | 4 +- .../benchmark/internal/operation/operation.go | 4 +- .../internal/operation/operation_test.go | 4 +- hack/benchmark/internal/operation/option.go | 4 +- .../internal/operation/option_test.go | 4 +- hack/benchmark/internal/operation/remove.go | 4 +- .../internal/operation/remove_test.go | 4 +- hack/benchmark/internal/operation/search.go | 4 +- .../internal/operation/search_test.go | 4 +- hack/benchmark/internal/operation/util.go | 4 +- .../benchmark/internal/operation/util_test.go | 4 +- hack/benchmark/metrics/metrics.go | 4 +- .../singleflight/singleflight_bench_test.go | 4 +- hack/go.mod.default | 3 +- hack/gorules/rules.go | 4 +- hack/gorules/rules_test.go | 4 +- hack/gorules/testdata/tests.go | 4 +- hack/license/gen/main.go | 3 +- hack/tools/metrics/main.go | 4 +- hack/tools/metrics/main_test.go | 4 +- internal/backoff/backoff.go | 3 +- internal/backoff/context.go | 4 +- internal/backoff/context_test.go | 4 +- internal/backoff/option_test.go | 4 +- internal/circuitbreaker/breaker.go | 4 +- internal/circuitbreaker/breaker_test.go | 4 +- internal/circuitbreaker/counter.go | 4 +- internal/circuitbreaker/counter_test.go | 4 +- internal/circuitbreaker/manager.go | 7 +- internal/circuitbreaker/manager_test.go | 4 +- internal/circuitbreaker/options.go | 4 +- internal/circuitbreaker/options_test.go | 122 +- internal/circuitbreaker/state.go | 4 +- internal/circuitbreaker/state_test.go | 4 +- internal/circuitbreaker/tripper.go | 4 +- internal/circuitbreaker/tripper_test.go | 4 +- internal/compress/gob/gob.go | 4 +- internal/compress/gob/gob_mock.go | 4 +- internal/compress/gzip/gzip.go | 4 +- internal/compress/gzip/gzip_mock.go | 4 +- internal/compress/lz4/lz4.go | 4 +- internal/compress/lz4/lz4_mock.go | 4 +- internal/compress/mock.go | 4 +- internal/compress/mock_test.go | 4 +- internal/compress/zstd/option.go | 4 +- internal/compress/zstd/zstd.go | 4 +- internal/compress/zstd/zstd_mock.go | 4 +- internal/config/circuitbreaker.go | 4 +- internal/config/circuitbreaker_test.go | 4 +- internal/config/observability.go | 10 +- internal/conv/conv.go | 4 +- internal/conv/conv_bench_test.go | 4 +- internal/conv/conv_test.go | 4 +- internal/core/algorithm/ngt/ngt.go | 4 - internal/db/kvs/redis/redis_mock.go | 4 +- internal/db/nosql/cassandra/cassandra_mock.go | 4 +- .../storage/blob/cloudstorage/cloudstorage.go | 4 +- .../blob/cloudstorage/cloudstorage_test.go | 4 +- .../db/storage/blob/cloudstorage/option.go | 4 +- .../storage/blob/cloudstorage/option_test.go | 4 +- .../blob/cloudstorage/urlopener/option.go | 4 +- .../cloudstorage/urlopener/option_test.go | 4 +- .../blob/cloudstorage/urlopener/urlopener.go | 4 +- .../cloudstorage/urlopener/urlopener_test.go | 4 +- internal/db/storage/blob/s3/reader/io/io.go | 4 +- .../db/storage/blob/s3/reader/io/io_test.go | 4 +- internal/db/storage/blob/s3/sdk/s3/s3.go | 4 +- .../storage/blob/s3/sdk/s3/s3iface/s3iface.go | 4 +- .../blob/s3/sdk/s3/s3manager/s3manager.go | 4 +- .../s3/sdk/s3/s3manager/s3manager_test.go | 4 +- .../db/storage/blob/s3/writer/writer_mock.go | 4 +- internal/encoding/json/json_test.go | 4 +- internal/errors/circuitbreaker.go | 4 +- internal/errors/circuitbreaker_test.go | 4 +- internal/errors/compressor_test.go | 4 +- internal/errors/discoverer_test.go | 4 +- internal/errors/errors_test.go | 4 +- internal/errors/file_test.go | 4 +- internal/errors/grpc_test.go | 4 +- internal/errors/http_test.go | 4 +- internal/errors/info.go | 4 +- internal/errors/io_test.go | 4 +- internal/errors/net_test.go | 4 +- internal/errors/observability_test.go | 4 +- internal/errors/option.go | 4 +- internal/errors/option_test.go | 4 +- internal/errors/runner_test.go | 4 +- internal/errors/unit_test.go | 4 +- internal/errors/vald_test.go | 4 +- internal/info/info_bench_test.go | 4 +- internal/info/option.go | 4 +- internal/info/option_test.go | 4 +- internal/log/format/format_test.go | 4 +- internal/log/glg/glg_test.go | 4 +- internal/log/glg/option_test.go | 4 +- internal/log/level/level_test.go | 4 +- internal/log/mock/logger.go | 4 +- internal/log/mock/logger_test.go | 4 +- internal/log/mock/retry.go | 4 +- internal/log/mock/retry_test.go | 4 +- internal/log/nop/nop.go | 4 +- internal/log/nop/nop_test.go | 4 +- internal/log/option.go | 4 +- internal/log/option_test.go | 4 +- internal/log/retry/option.go | 4 +- internal/log/retry/option_test.go | 4 +- internal/log/retry/retry.go | 4 +- internal/log/retry/retry_test.go | 4 +- internal/log/zap/option.go | 4 +- internal/log/zap/option_test.go | 4 +- internal/log/zap/zap.go | 4 +- internal/log/zap/zap_test.go | 4 +- internal/net/control/control_darwin.go | 1 - internal/net/control/control_other.go | 1 - internal/net/control/control_unix.go | 1 - internal/net/control/control_windows.go | 1 - internal/net/grpc/context.go | 4 +- internal/net/grpc/context_test.go | 4 +- .../interceptor/server/logging/accesslog.go | 4 +- .../grpc/interceptor/server/trace/payload.go | 10 +- internal/net/grpc/logger/logger.go | 4 +- internal/net/grpc/logger/logger_test.go | 4 +- internal/net/grpc/proto/proto_test.go | 6 +- internal/net/grpc/status/status.go | 4 +- internal/net/grpc/stream.go | 12 +- internal/net/http/client/option.go | 12 +- internal/net/http/dump/dump_test.go | 4 +- internal/net/http/json/json_test.go | 4 +- internal/net/http/metrics/pprof_test.go | 4 +- internal/net/http/middleware/option_test.go | 4 +- internal/net/http/middleware/timeout_test.go | 4 +- internal/net/http/rest/rest_test.go | 4 +- internal/net/http/routing/middleware_mock.go | 4 +- internal/net/http/routing/option_test.go | 4 +- internal/net/http/routing/router_test.go | 4 +- internal/net/http/transport/roundtrip_mock.go | 4 +- .../observability/exporter/jaeger/jaeger.go | 103 +- .../exporter/jaeger/jaeger_option.go | 95 - .../exporter/jaeger/jaeger_test.go | 137 +- .../observability/exporter/jaeger/option.go | 85 + .../{jaeger_option_test.go => option_test.go} | 186 +- .../observability/metrics/backoff/backoff.go | 4 +- .../metrics/backoff/backoff_test.go | 4 +- .../metrics/circuitbreaker/circuitbreaker.go | 4 +- .../circuitbreaker/circuitbreaker_test.go | 4 +- .../metrics/db/kvs/redis/redis.go | 257 --- .../metrics/db/kvs/redis/redis_test.go | 913 -------- .../metrics/db/nosql/cassandra/cassandra.go | 193 -- .../db/nosql/cassandra/cassandra_test.go | 613 ----- .../metrics/db/rdb/mysql/mysql.go | 136 -- .../metrics/db/rdb/mysql/mysql_test.go | 706 ------ internal/observability/trace/status.go | 148 +- internal/observability/trace/status_test.go | 277 ++- internal/observability/trace/trace.go | 39 +- internal/observability/trace/trace_test.go | 30 +- internal/rand/rand_bench_test.go | 4 +- internal/rand/rand_test.go | 4 +- internal/runner/runner_mock.go | 4 +- internal/runner/runner_race_test.go | 5 +- internal/safety/safety_bench_test.go | 4 +- internal/safety/safety_test.go | 4 +- internal/servers/option_test.go | 4 +- internal/servers/server/option_test.go | 4 +- internal/servers/server/server_test.go | 4 +- internal/servers/servers_mock.go | 4 +- internal/servers/servers_test.go | 4 +- internal/servers/starter/option_test.go | 4 +- internal/servers/starter/starter_test.go | 4 +- internal/singleflight/singleflight_test.go | 1 - internal/strings/strings.go | 4 +- internal/strings/strings_test.go | 4 +- internal/test/comparator/comparators.go | 4 +- internal/test/comparator/standard.go | 4 +- internal/test/data/backup/100index/grp | Bin 29355 -> 12 bytes .../test/data/backup/100index/metadata.json | 1 - .../test/data/backup/100index/ngt-meta.kvsdb | Bin 2222 -> 0 bytes internal/test/data/backup/100index/obj | Bin 313709 -> 8 bytes internal/test/data/backup/100index/prf | 6 +- internal/test/data/backup/100index/tre | Bin 3964 -> 28 bytes internal/test/data/request/insert.go | 4 +- internal/test/data/request/insert_test.go | 4 +- internal/test/data/request/object.go | 4 +- internal/test/data/request/object_test.go | 4 +- internal/test/data/request/remove.go | 4 +- internal/test/data/request/remove_test.go | 4 +- internal/test/data/vector/gen.go | 4 +- internal/test/data/vector/gen_test.go | 4 +- internal/test/goleak/goleak.go | 4 +- internal/test/goleak/goleak_test.go | 4 +- internal/test/mock/server_stream.go | 4 +- internal/test/testdata.go | 4 +- internal/test/testdata_test.go | 4 +- internal/timeutil/location/loc.go | 4 +- internal/timeutil/location/loc_bench_test.go | 4 +- internal/timeutil/location/loc_test.go | 4 +- internal/timeutil/location/set.go | 4 +- internal/timeutil/location/set_test.go | 5 +- internal/timeutil/time_bench_test.go | 4 +- internal/version/version_test.go | 4 +- internal/worker/queue_mock.go | 4 +- internal/worker/worker.go | 4 +- k8s/agent/configmap.yaml | 42 +- k8s/discoverer/configmap.yaml | 42 +- k8s/discoverer/deployment.yaml | 2 +- k8s/gateway/lb/configmap.yaml | 54 +- k8s/gateway/lb/deployment.yaml | 2 +- k8s/manager/index/configmap.yaml | 54 +- k8s/manager/index/deployment.yaml | 2 +- k8s/operator/helm/crds/valdrelease.yaml | 720 +----- .../core/ngt/handler/grpc/handler_test.go | 1 + pkg/agent/core/ngt/handler/grpc/index.go | 24 +- pkg/agent/core/ngt/handler/grpc/index_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/insert.go | 46 +- .../core/ngt/handler/grpc/insert_test.go | 4 +- .../core/ngt/handler/grpc/linear_search.go | 79 +- .../ngt/handler/grpc/linear_search_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/object.go | 28 +- .../core/ngt/handler/grpc/object_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/remove.go | 41 +- .../core/ngt/handler/grpc/remove_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/search.go | 79 +- .../core/ngt/handler/grpc/search_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/update.go | 49 +- .../core/ngt/handler/grpc/update_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/upsert.go | 28 +- .../core/ngt/handler/grpc/upsert_test.go | 4 +- pkg/agent/core/ngt/service/kvs/ou.go | 4 +- pkg/agent/core/ngt/service/kvs/ou_test.go | 4 +- pkg/agent/core/ngt/service/kvs/uo.go | 4 +- pkg/agent/core/ngt/service/kvs/uo_test.go | 4 +- pkg/agent/core/ngt/service/ngt.go | 6 +- .../ngt/service/vqueue/undeleted_index_map.go | 4 +- .../vqueue/undeleted_index_map_test.go | 4 +- .../service/vqueue/uninserted_index_map.go | 4 +- .../vqueue/uninserted_index_map_test.go | 4 +- .../sidecar/service/observer/observer.go | 2 +- pkg/discoverer/k8s/handler/grpc/handler.go | 32 +- pkg/gateway/filter/handler/grpc/handler.go | 2025 +++++++++++++++-- pkg/gateway/filter/handler/grpc/option.go | 29 + .../filter/handler/grpc/option_test.go | 236 ++ pkg/gateway/internal/location/location.go | 4 +- .../internal/location/location_test.go | 4 +- pkg/gateway/lb/handler/grpc/handler.go | 736 +++--- pkg/tools/cli/loadtest/assets/dataset.go | 4 +- pkg/tools/cli/loadtest/assets/dataset_test.go | 4 +- pkg/tools/cli/loadtest/assets/hdf5_loader.go | 4 +- .../cli/loadtest/assets/hdf5_loader_test.go | 4 +- .../cli/loadtest/assets/large_dataset.go | 4 +- .../cli/loadtest/assets/large_dataset_test.go | 4 +- .../cli/loadtest/assets/small_dataset.go | 4 +- .../cli/loadtest/assets/small_dataset_test.go | 4 +- pkg/tools/cli/loadtest/service/insert.go | 4 +- pkg/tools/cli/loadtest/service/insert_test.go | 4 +- pkg/tools/cli/loadtest/service/loader.go | 4 +- .../cli/loadtest/service/loader_option.go | 4 +- .../loadtest/service/loader_option_test.go | 4 +- pkg/tools/cli/loadtest/service/loader_test.go | 4 +- pkg/tools/cli/loadtest/service/search.go | 4 +- pkg/tools/cli/loadtest/service/search_test.go | 4 +- tests/e2e/crud/crud_test.go | 1 - tests/e2e/hdf5/hdf5.go | 1 - tests/e2e/kubernetes/client/client.go | 1 - .../e2e/kubernetes/portforward/portforward.go | 1 - tests/e2e/multiapis/multiapis_test.go | 1 - tests/e2e/operation/doc.go | 1 - tests/e2e/operation/multi.go | 5 +- tests/e2e/operation/operation.go | 5 +- tests/e2e/operation/stream.go | 5 +- tests/e2e/performance/max_vector_dim_test.go | 1 - tests/e2e/sidecar/sidecar_test.go | 1 - tests/performance/max_vector_dim_test.go | 4 +- versions/GO_VERSION | 2 +- versions/OPERATOR_SDK_VERSION | 2 +- 307 files changed, 4310 insertions(+), 6043 deletions(-) delete mode 100644 internal/observability/exporter/jaeger/jaeger_option.go create mode 100644 internal/observability/exporter/jaeger/option.go rename internal/observability/exporter/jaeger/{jaeger_option_test.go => option_test.go} (81%) delete mode 100644 internal/observability/metrics/db/kvs/redis/redis.go delete mode 100644 internal/observability/metrics/db/kvs/redis/redis_test.go delete mode 100644 internal/observability/metrics/db/nosql/cassandra/cassandra.go delete mode 100644 internal/observability/metrics/db/nosql/cassandra/cassandra_test.go delete mode 100644 internal/observability/metrics/db/rdb/mysql/mysql.go delete mode 100644 internal/observability/metrics/db/rdb/mysql/mysql_test.go delete mode 100644 internal/test/data/backup/100index/metadata.json delete mode 100644 internal/test/data/backup/100index/ngt-meta.kvsdb diff --git a/Makefile b/Makefile index 32551d23c2..64cd5230aa 100644 --- a/Makefile +++ b/Makefile @@ -51,16 +51,16 @@ TEMP_DIR := $(eval TEMP_DIR := $(shell mktemp -d))$(TEMP_DIR) OPERATOR_SDK_VERSION := $(eval OPERATOR_SDK_VERSION := $(shell cat versions/OPERATOR_SDK_VERSION))$(OPERATOR_SDK_VERSION) -KIND_VERSION ?= v0.14.0 -HELM_VERSION ?= v3.9.0 +KIND_VERSION ?= v0.15.0 +HELM_VERSION ?= v3.9.4 HELM_DOCS_VERSION ?= 1.11.0 -YQ_VERSION ?= v4.25.3 -VALDCLI_VERSION ?= v1.5.4 -TELEPRESENCE_VERSION ?= 2.6.8 -KUBELINTER_VERSION ?= 0.3.0 -GOLANGCILINT_VERSION ?= v1.46.2 +YQ_VERSION ?= v4.27.3 +VALDCLI_VERSION ?= v1.5.6 +TELEPRESENCE_VERSION ?= 2.7.2 +KUBELINTER_VERSION ?= 0.4.0 +GOLANGCILINT_VERSION ?= v1.49.0 REVIEWDOG_VERSION ?= v0.14.1 -PROTOBUF_VERSION ?= 21.2 +PROTOBUF_VERSION ?= 21.5 JAEGER_OPERATOR_VERSION ?= 2.30.0 SWAP_DEPLOYMENT_TYPE ?= deployment diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md index 4cedbc6796..92dc01a59c 100644 --- a/apis/docs/v1/docs.md +++ b/apis/docs/v1/docs.md @@ -92,12 +92,6 @@ - [Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest) - [Upsert.Request](#payload-v1-Upsert-Request) -- [apis/proto/v1/vald/filter.proto](#apis_proto_v1_vald_filter-proto) - - [Filter](#vald-v1-Filter) - -- [apis/proto/v1/vald/insert.proto](#apis_proto_v1_vald_insert-proto) - - [Insert](#vald-v1-Insert) - - [apis/proto/v1/vald/object.proto](#apis_proto_v1_vald_object-proto) - [Object](#vald-v1-Object) @@ -113,6 +107,12 @@ - [apis/proto/v1/vald/upsert.proto](#apis_proto_v1_vald_upsert-proto) - [Upsert](#vald-v1-Upsert) +- [apis/proto/v1/vald/filter.proto](#apis_proto_v1_vald_filter-proto) + - [Filter](#vald-v1-Filter) + +- [apis/proto/v1/vald/insert.proto](#apis_proto_v1_vald_insert-proto) + - [Insert](#vald-v1-Insert) + - [Scalar Value Types](#scalar-value-types) @@ -1326,71 +1326,6 @@ Represent the upsert request. - -

Top

- -## apis/proto/v1/vald/filter.proto - - - - - - - - - - - -### Filter -Filter service provides ways to connect to Vald through filter. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SearchObject | [.payload.v1.Search.ObjectRequest](#payload-v1-Search-ObjectRequest) | [.payload.v1.Search.Response](#payload-v1-Search-Response) | A method to search object. | -| MultiSearchObject | [.payload.v1.Search.MultiObjectRequest](#payload-v1-Search-MultiObjectRequest) | [.payload.v1.Search.Responses](#payload-v1-Search-Responses) | A method to search multiple objects. | -| StreamSearchObject | [.payload.v1.Search.ObjectRequest](#payload-v1-Search-ObjectRequest) stream | [.payload.v1.Search.StreamResponse](#payload-v1-Search-StreamResponse) stream | A method to search object by bidirectional streaming. | -| InsertObject | [.payload.v1.Insert.ObjectRequest](#payload-v1-Insert-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method insert object. | -| StreamInsertObject | [.payload.v1.Insert.ObjectRequest](#payload-v1-Insert-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | Represent the streaming RPC to insert object by bidirectional streaming. | -| MultiInsertObject | [.payload.v1.Insert.MultiObjectRequest](#payload-v1-Insert-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to insert multiple objects. | -| UpdateObject | [.payload.v1.Update.ObjectRequest](#payload-v1-Update-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to update object. | -| StreamUpdateObject | [.payload.v1.Update.ObjectRequest](#payload-v1-Update-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to update object by bidirectional streaming. | -| MultiUpdateObject | [.payload.v1.Update.MultiObjectRequest](#payload-v1-Update-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to update multiple objects. | -| UpsertObject | [.payload.v1.Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to upsert object. | -| StreamUpsertObject | [.payload.v1.Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to upsert object by bidirectional streaming. | -| MultiUpsertObject | [.payload.v1.Upsert.MultiObjectRequest](#payload-v1-Upsert-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to upsert multiple objects. | - - - - - - -

Top

- -## apis/proto/v1/vald/insert.proto - - - - - - - - - - - -### Insert -Insert service provides ways to add new vectors. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Insert | [.payload.v1.Insert.Request](#payload-v1-Insert-Request) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to add a new single vector. | -| StreamInsert | [.payload.v1.Insert.Request](#payload-v1-Insert-Request) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to add new multiple vectors by bidirectional streaming. | -| MultiInsert | [.payload.v1.Insert.MultiRequest](#payload-v1-Insert-MultiRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to add new multiple vectors in a single request. | - - - - -

Top

@@ -1540,6 +1475,71 @@ Upsert service provides ways to insert/update vectors. + +

Top

+ +## apis/proto/v1/vald/filter.proto + + + + + + + + + + + +### Filter +Filter service provides ways to connect to Vald through filter. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| SearchObject | [.payload.v1.Search.ObjectRequest](#payload-v1-Search-ObjectRequest) | [.payload.v1.Search.Response](#payload-v1-Search-Response) | A method to search object. | +| MultiSearchObject | [.payload.v1.Search.MultiObjectRequest](#payload-v1-Search-MultiObjectRequest) | [.payload.v1.Search.Responses](#payload-v1-Search-Responses) | A method to search multiple objects. | +| StreamSearchObject | [.payload.v1.Search.ObjectRequest](#payload-v1-Search-ObjectRequest) stream | [.payload.v1.Search.StreamResponse](#payload-v1-Search-StreamResponse) stream | A method to search object by bidirectional streaming. | +| InsertObject | [.payload.v1.Insert.ObjectRequest](#payload-v1-Insert-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method insert object. | +| StreamInsertObject | [.payload.v1.Insert.ObjectRequest](#payload-v1-Insert-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | Represent the streaming RPC to insert object by bidirectional streaming. | +| MultiInsertObject | [.payload.v1.Insert.MultiObjectRequest](#payload-v1-Insert-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to insert multiple objects. | +| UpdateObject | [.payload.v1.Update.ObjectRequest](#payload-v1-Update-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to update object. | +| StreamUpdateObject | [.payload.v1.Update.ObjectRequest](#payload-v1-Update-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to update object by bidirectional streaming. | +| MultiUpdateObject | [.payload.v1.Update.MultiObjectRequest](#payload-v1-Update-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to update multiple objects. | +| UpsertObject | [.payload.v1.Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to upsert object. | +| StreamUpsertObject | [.payload.v1.Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to upsert object by bidirectional streaming. | +| MultiUpsertObject | [.payload.v1.Upsert.MultiObjectRequest](#payload-v1-Upsert-MultiObjectRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to upsert multiple objects. | + + + + + + +

Top

+ +## apis/proto/v1/vald/insert.proto + + + + + + + + + + + +### Insert +Insert service provides ways to add new vectors. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Insert | [.payload.v1.Insert.Request](#payload-v1-Insert-Request) | [.payload.v1.Object.Location](#payload-v1-Object-Location) | A method to add a new single vector. | +| StreamInsert | [.payload.v1.Insert.Request](#payload-v1-Insert-Request) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to add new multiple vectors by bidirectional streaming. | +| MultiInsert | [.payload.v1.Insert.MultiRequest](#payload-v1-Insert-MultiRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to add new multiple vectors in a single request. | + + + + + ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/apis/grpc/v1/agent/core/agent.pb.go b/apis/grpc/v1/agent/core/agent.pb.go index 5df84fbcb2..559b2e5aa9 100644 --- a/apis/grpc/v1/agent/core/agent.pb.go +++ b/apis/grpc/v1/agent/core/agent.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/agent/core/agent.proto package core diff --git a/apis/grpc/v1/agent/sidecar/sidecar.pb.go b/apis/grpc/v1/agent/sidecar/sidecar.pb.go index 0810964d78..d41fd398e9 100644 --- a/apis/grpc/v1/agent/sidecar/sidecar.pb.go +++ b/apis/grpc/v1/agent/sidecar/sidecar.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/agent/sidecar/sidecar.proto package sidecar diff --git a/apis/grpc/v1/discoverer/discoverer.pb.go b/apis/grpc/v1/discoverer/discoverer.pb.go index 153282aa83..6e17b2b584 100644 --- a/apis/grpc/v1/discoverer/discoverer.pb.go +++ b/apis/grpc/v1/discoverer/discoverer.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/discoverer/discoverer.proto package discoverer diff --git a/apis/grpc/v1/filter/egress/egress_filter.pb.go b/apis/grpc/v1/filter/egress/egress_filter.pb.go index 8735b34817..e5a2fce938 100644 --- a/apis/grpc/v1/filter/egress/egress_filter.pb.go +++ b/apis/grpc/v1/filter/egress/egress_filter.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/filter/egress/egress_filter.proto package egress diff --git a/apis/grpc/v1/filter/ingress/ingress_filter.pb.go b/apis/grpc/v1/filter/ingress/ingress_filter.pb.go index fff6983294..d1f4901787 100644 --- a/apis/grpc/v1/filter/ingress/ingress_filter.pb.go +++ b/apis/grpc/v1/filter/ingress/ingress_filter.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/filter/ingress/ingress_filter.proto package ingress diff --git a/apis/grpc/v1/manager/index/index_manager.pb.go b/apis/grpc/v1/manager/index/index_manager.pb.go index a8585ba14f..37441ccfcc 100644 --- a/apis/grpc/v1/manager/index/index_manager.pb.go +++ b/apis/grpc/v1/manager/index/index_manager.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/manager/index/index_manager.proto package index diff --git a/apis/grpc/v1/payload/interface.go b/apis/grpc/v1/payload/interface.go index 0ce9770a92..f5b0f3a646 100644 --- a/apis/grpc/v1/payload/interface.go +++ b/apis/grpc/v1/payload/interface.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package payload import proto "google.golang.org/protobuf/proto" diff --git a/apis/grpc/v1/payload/payload.pb.go b/apis/grpc/v1/payload/payload.pb.go index ed2ce3097c..02e834e840 100644 --- a/apis/grpc/v1/payload/payload.pb.go +++ b/apis/grpc/v1/payload/payload.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/payload/payload.proto package payload @@ -1024,6 +1024,7 @@ type Search_StreamResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Payload: + // // *Search_StreamResponse_Response // *Search_StreamResponse_Status Payload isSearch_StreamResponse_Payload `protobuf_oneof:"payload"` @@ -2365,6 +2366,7 @@ type Object_StreamDistance struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Payload: + // // *Object_StreamDistance_Distance // *Object_StreamDistance_Status Payload isObject_StreamDistance_Payload `protobuf_oneof:"payload"` @@ -2650,6 +2652,7 @@ type Object_StreamVector struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Payload: + // // *Object_StreamVector_Vector // *Object_StreamVector_Status Payload isObject_StreamVector_Payload `protobuf_oneof:"payload"` @@ -2849,6 +2852,7 @@ type Object_StreamBlob struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Payload: + // // *Object_StreamBlob_Blob // *Object_StreamBlob_Status Payload isObject_StreamBlob_Payload `protobuf_oneof:"payload"` @@ -2999,6 +3003,7 @@ type Object_StreamLocation struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Payload: + // // *Object_StreamLocation_Location // *Object_StreamLocation_Status Payload isObject_StreamLocation_Payload `protobuf_oneof:"payload"` diff --git a/apis/grpc/v1/vald/filter.pb.go b/apis/grpc/v1/vald/filter.pb.go index c558e34bfd..c17fac8e1d 100644 --- a/apis/grpc/v1/vald/filter.pb.go +++ b/apis/grpc/v1/vald/filter.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/filter.proto package vald diff --git a/apis/grpc/v1/vald/insert.pb.go b/apis/grpc/v1/vald/insert.pb.go index b7fab530e8..5acbf73005 100644 --- a/apis/grpc/v1/vald/insert.pb.go +++ b/apis/grpc/v1/vald/insert.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/insert.proto package vald diff --git a/apis/grpc/v1/vald/object.pb.go b/apis/grpc/v1/vald/object.pb.go index 1773e5c80b..8ccef391ac 100644 --- a/apis/grpc/v1/vald/object.pb.go +++ b/apis/grpc/v1/vald/object.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/object.proto package vald diff --git a/apis/grpc/v1/vald/remove.pb.go b/apis/grpc/v1/vald/remove.pb.go index 4198fb06d2..865988fe51 100644 --- a/apis/grpc/v1/vald/remove.pb.go +++ b/apis/grpc/v1/vald/remove.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/remove.proto package vald diff --git a/apis/grpc/v1/vald/search.pb.go b/apis/grpc/v1/vald/search.pb.go index 5af5b89819..f39030295c 100644 --- a/apis/grpc/v1/vald/search.pb.go +++ b/apis/grpc/v1/vald/search.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/search.proto package vald diff --git a/apis/grpc/v1/vald/update.pb.go b/apis/grpc/v1/vald/update.pb.go index 0e598df8ca..b77d4ca10a 100644 --- a/apis/grpc/v1/vald/update.pb.go +++ b/apis/grpc/v1/vald/update.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/update.proto package vald diff --git a/apis/grpc/v1/vald/upsert.pb.go b/apis/grpc/v1/vald/upsert.pb.go index 4dae79c21d..7344706967 100644 --- a/apis/grpc/v1/vald/upsert.pb.go +++ b/apis/grpc/v1/vald/upsert.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.1 +// protoc v3.21.5 // source: apis/proto/v1/vald/upsert.proto package vald diff --git a/charts/vald/values.go b/charts/vald/values.go index 81878140c8..5a234c510d 100644 --- a/charts/vald/values.go +++ b/charts/vald/values.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vald import ( diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index 17b20c07ce..4fa55354c1 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -888,7 +888,7 @@ defaults: collector_endpoint: "" # http://jaeger-collector.default.svc.cluster.local:14268/api/traces # @schema {"name": "defaults.observability.jaeger.agent_endpoint", "type": "string"} # defaults.observability.jaeger.agent_endpoint -- Jaeger agent endpoint - agent_endpoint: jaeger-agent.default.svc.cluster.local:6831 + agent_endpoint: "" # @schema {"name": "defaults.observability.jaeger.username", "type": "string"} # defaults.observability.jaeger.username -- Jaeger username username: "" @@ -900,7 +900,7 @@ defaults: service_name: vald # @schema {"name": "defaults.observability.jaeger.buffer_max_count", "type": "integer"} # defaults.observability.jaeger.buffer_max_count -- Jaeger buffer max count - buffer_max_count: 10 + buffer_max_count: 65000 # @schema {"name": "gateway", "type": "object"} gateway: # @schema {"name": "gateway.lb", "type": "object"} diff --git a/cmd/tools/cli/loadtest/main.go b/cmd/tools/cli/loadtest/main.go index 33aeb5203e..d62aaf8da8 100644 --- a/cmd/tools/cli/loadtest/main.go +++ b/cmd/tools/cli/loadtest/main.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/cmd/tools/cli/loadtest/main_test.go b/cmd/tools/cli/loadtest/main_test.go index 42c7455f25..924dca23a3 100644 --- a/cmd/tools/cli/loadtest/main_test.go +++ b/cmd/tools/cli/loadtest/main_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/example/client/agent/main.go b/example/client/agent/main.go index b38800fa67..7c2a4fa928 100644 --- a/example/client/agent/main.go +++ b/example/client/agent/main.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/example/client/go.mod b/example/client/go.mod index 9bd661d68a..86c916d99b 100644 --- a/example/client/go.mod +++ b/example/client/go.mod @@ -4,15 +4,15 @@ go 1.18 replace ( github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v0.6.7 - github.com/goccy/go-json => github.com/goccy/go-json v0.9.10 + github.com/goccy/go-json => github.com/goccy/go-json v0.9.11 github.com/golang/protobuf => github.com/golang/protobuf v1.5.2 - github.com/kpango/glg => github.com/kpango/glg v1.6.12 + github.com/kpango/glg => github.com/kpango/glg v1.6.13 github.com/pkg/sftp => github.com/pkg/sftp v1.13.5 - golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa - golang.org/x/net => golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 + golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 + golang.org/x/net => golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b golang.org/x/text => golang.org/x/text v0.3.7 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 - google.golang.org/grpc => google.golang.org/grpc v1.48.0 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf + google.golang.org/grpc => google.golang.org/grpc v1.49.0 google.golang.org/protobuf => google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1 @@ -28,12 +28,12 @@ require ( require ( github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect - github.com/goccy/go-json v0.9.10 // indirect + github.com/goccy/go-json v0.9.11 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/kpango/fastime v1.1.4 // indirect golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90 // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/example/client/go.sum b/example/client/go.sum index f053a219e8..57fa3917e0 100644 --- a/example/client/go.sum +++ b/example/client/go.sum @@ -1,40 +1,24 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/goccy/go-json v0.9.10 h1:hCeNmprSNLB8B8vQKWl6DpuH0t60oEs+TAk9a7CScKc= -github.com/goccy/go-json v0.9.10/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/kpango/fastime v1.1.4 h1:pus9JgJBg/8Jie3ozayA4yNIV67BUPhbq0wMZY3CtYo= github.com/kpango/fastime v1.1.4/go.mod h1:tTNDbIo5qL6D7g5vh2YbkyUbOVP2kD/we3rSjN22PMY= github.com/kpango/fuid v0.0.0-20220209050620-e5987ba1ea5e h1:S07NQvXJsAHn9XyHDSD43YzUyWdKW6M9Qb/sx8JY2+U= github.com/kpango/fuid v0.0.0-20220209050620-e5987ba1ea5e/go.mod h1:nVt6Zyj+/b/kdTPOrrW9Rf0QyCl3i3nCnO3b3zkCkuI= -github.com/kpango/glg v1.6.12 h1:DyfcHrBAOpnYU85YJK4QUynQ2WA73r+9+lc7XxvGiws= -github.com/kpango/glg v1.6.12/go.mod h1:E8OndzZYI5jowBGwWsKvYLuwtjSKjRzSERjjYppyRjc= +github.com/kpango/glg v1.6.13 h1:QMhxOm/Oo1k8qraMtH4SQOYIgB/SI2RW2Hvrn1kgAZw= +github.com/kpango/glg v1.6.13/go.mod h1:fwP/c6NJTXe0vd9L3He6myDnO33lFVfgQGtGmlMnyws= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= @@ -46,24 +30,19 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/vdaas/vald-client-go v1.5.6 h1:qRUUQddXYS5CHL4+WOEsfnYWHzoqYOp9GEr8Xqzmldg= github.com/vdaas/vald-client-go v1.5.6/go.mod h1:JT0mLVsJYMs/ZkUxHPviWYl9Uz6QCQtmymUHOLO5FXY= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4= -golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/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-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -85,13 +64,11 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf h1:Q5xNKbTSFwkuaaGaR7CMcXEM5sy19KYdUU8iF8/iRC0= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/client/main.go b/example/client/main.go index 495d228df2..0b52300078 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/go.mod b/go.mod index 07df464e70..c8f6af5a12 100755 --- a/go.mod +++ b/go.mod @@ -3,48 +3,46 @@ module github.com/vdaas/vald go 1.18 replace ( - cloud.google.com/go => cloud.google.com/go v0.103.0 - cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.37.0 - cloud.google.com/go/compute => cloud.google.com/go/compute v1.7.0 + cloud.google.com/go => cloud.google.com/go v0.104.0 + cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.39.0 + cloud.google.com/go/compute => cloud.google.com/go/compute v1.9.0 cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.8.0 cloud.google.com/go/firestore => cloud.google.com/go/firestore v1.6.1 cloud.google.com/go/iam => cloud.google.com/go/iam v0.3.0 cloud.google.com/go/kms => cloud.google.com/go/kms v1.4.0 - cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.5.0 + cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.6.0 cloud.google.com/go/profiler => cloud.google.com/go/profiler v0.3.0 - cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.24.0 + cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.25.1 cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.5.0 - cloud.google.com/go/storage => cloud.google.com/go/storage v1.24.0 + cloud.google.com/go/storage => cloud.google.com/go/storage v1.26.0 cloud.google.com/go/trace => cloud.google.com/go/trace v1.2.0 code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 contrib.go.opencensus.io/exporter/aws => contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9 - contrib.go.opencensus.io/exporter/jaeger => contrib.go.opencensus.io/exporter/jaeger v0.2.1 - contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus v0.4.1 - contrib.go.opencensus.io/exporter/stackdriver => contrib.go.opencensus.io/exporter/stackdriver v0.13.13 + contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus v0.4.2 contrib.go.opencensus.io/integrations/ocsql => contrib.go.opencensus.io/integrations/ocsql v0.1.7 git.sr.ht/~sbinet/gg => git.sr.ht/~sbinet/gg v0.3.1 - github.com/AdaLogics/go-fuzz-headers => github.com/AdaLogics/go-fuzz-headers v0.0.0-20220708163326-82d177caec6e + github.com/AdaLogics/go-fuzz-headers => github.com/AdaLogics/go-fuzz-headers v0.0.0-20220824214621-3c06a36a6952 github.com/Azure/azure-amqp-common-go/v3 => github.com/Azure/azure-amqp-common-go/v3 v3.2.3 github.com/Azure/azure-pipeline-go => github.com/Azure/azure-pipeline-go v0.2.3 github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v66.0.0+incompatible - github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.3 github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 - github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 + github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 github.com/Azure/azure-service-bus-go => github.com/Azure/azure-service-bus-go v0.11.5 github.com/Azure/azure-storage-blob-go => github.com/Azure/azure-storage-blob-go v0.15.0 github.com/Azure/go-amqp => github.com/Azure/go-amqp v0.17.5 github.com/Azure/go-ansiterm => github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 - github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20220726153024-711dde1b1be6+incompatible - github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.28 + github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20220808173745-2fa44cb18b83+incompatible + github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.29-0.20220808173745-2fa44cb18b83 github.com/Azure/go-autorest/autorest/adal => github.com/Azure/go-autorest/autorest/adal v0.9.21 - github.com/Azure/go-autorest/autorest/azure/auth => github.com/Azure/go-autorest/autorest/azure/auth v0.5.12-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/autorest/azure/cli => github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 - github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.3.1-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/autorest/mocks => github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/autorest/to => github.com/Azure/go-autorest/autorest/to v0.4.1-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/autorest/validation => github.com/Azure/go-autorest/autorest/validation v0.3.2-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.2.2-0.20220726153024-711dde1b1be6 - github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20220726153024-711dde1b1be6 + github.com/Azure/go-autorest/autorest/azure/auth => github.com/Azure/go-autorest/autorest/azure/auth v0.5.12-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/autorest/azure/cli => github.com/Azure/go-autorest/autorest/azure/cli v0.4.7-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.3.1-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/autorest/mocks => github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/autorest/to => github.com/Azure/go-autorest/autorest/to v0.4.1-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/autorest/validation => github.com/Azure/go-autorest/autorest/validation v0.3.2-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.2.2-0.20220808173745-2fa44cb18b83 + github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20220808173745-2fa44cb18b83 github.com/BurntSushi/toml => github.com/BurntSushi/toml v1.2.0 github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/DataDog/datadog-go => github.com/DataDog/datadog-go v4.8.3+incompatible @@ -59,35 +57,35 @@ replace ( github.com/alecthomas/units => github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 github.com/alexflint/go-filemutex => github.com/alexflint/go-filemutex v1.2.0 github.com/antihax/optional => github.com/antihax/optional v1.0.0 - github.com/antlr/antlr4/runtime/Go/antlr => github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220804214150-8b0cc382067f + github.com/antlr/antlr4/runtime/Go/antlr => github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220826213629-cd8f367ca010 github.com/armon/circbuf => github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 github.com/armon/go-metrics => github.com/armon/go-metrics v0.4.0 github.com/armon/go-radix => github.com/armon/go-radix v1.0.0 github.com/armon/go-socks5 => github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/asaskevich/govalidator => github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d - github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.70 - github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.16.8 - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 - github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.15.15 - github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.12.10 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9 - github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.21 - github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9 - github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 - github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.10 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.9 - github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.18.1 - github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2 - github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.14 - github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.17.10 - github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1 - github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.27.6 - github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.11.13 - github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.16.10 - github.com/aws/smithy-go => github.com/aws/smithy-go v1.12.0 + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.90 + github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.16.13 + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.6 + github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.17.4 + github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.12.17 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.14 + github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.30 + github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.20 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.14 + github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.3.21 + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.7 + github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.15 + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.14 + github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.14 + github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.18.8 + github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.27.8 + github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.21 + github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.17.16 + github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.19.7 + github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.27.12 + github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.11.20 + github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.16.16 + github.com/aws/smithy-go => github.com/aws/smithy-go v1.13.1 github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.0 github.com/beorn7/perks => github.com/beorn7/perks v1.0.1 github.com/bgentry/speakeasy => github.com/bgentry/speakeasy v0.1.0 @@ -110,14 +108,14 @@ replace ( github.com/cncf/udpa/go => github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe github.com/cncf/xds/go => github.com/cncf/xds/go v0.0.0-20220520190051-1e77728a1eaa github.com/cockroachdb/apd => github.com/cockroachdb/apd v1.1.0 - github.com/cockroachdb/datadriven => github.com/cockroachdb/datadriven v1.0.1 + github.com/cockroachdb/datadriven => github.com/cockroachdb/datadriven v1.0.2 github.com/cockroachdb/errors => github.com/cockroachdb/errors v1.9.0 github.com/cockroachdb/logtags => github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f github.com/containerd/aufs => github.com/containerd/aufs v1.0.0 github.com/containerd/btrfs => github.com/containerd/btrfs v1.0.0 github.com/containerd/cgroups => github.com/containerd/cgroups v1.0.4 github.com/containerd/console => github.com/containerd/console v1.0.3 - github.com/containerd/containerd => github.com/containerd/containerd v1.6.7 + github.com/containerd/containerd => github.com/containerd/containerd v1.6.8 github.com/containerd/continuity => github.com/containerd/continuity v0.3.0 github.com/containerd/fifo => github.com/containerd/fifo v1.0.0 github.com/containerd/go-cni => github.com/containerd/go-cni v1.1.7 @@ -147,7 +145,7 @@ replace ( github.com/devigned/tab => github.com/devigned/tab v0.1.1 github.com/dgryski/go-rendezvous => github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f github.com/dgryski/go-sip13 => github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245 - github.com/digitalocean/godo => github.com/digitalocean/godo v1.82.0 + github.com/digitalocean/godo => github.com/digitalocean/godo v1.83.0 github.com/dimchansky/utfbom => github.com/dimchansky/utfbom v1.1.1 github.com/dnaeon/go-vcr => github.com/dnaeon/go-vcr v1.2.0 github.com/docker/cli => github.com/docker/cli v20.10.17+incompatible @@ -157,12 +155,12 @@ replace ( github.com/docker/go-connections => github.com/docker/go-connections v0.4.0 github.com/docker/go-events => github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c github.com/docker/go-metrics => github.com/docker/go-metrics v0.0.1 - github.com/docker/go-units => github.com/docker/go-units v0.4.0 + github.com/docker/go-units => github.com/docker/go-units v0.5.0 github.com/docopt/docopt-go => github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 github.com/dustin/go-humanize => github.com/dustin/go-humanize v1.0.0 github.com/dvyukov/go-fuzz => github.com/dvyukov/go-fuzz v0.0.0-20220726122315-1d375ef9f9f6 github.com/edsrzf/mmap-go => github.com/edsrzf/mmap-go v1.1.0 - github.com/elazarl/goproxy => github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 + github.com/elazarl/goproxy => github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.10.3 github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v0.6.7 github.com/evanphx/json-patch => github.com/evanphx/json-patch v0.5.2 @@ -173,7 +171,7 @@ replace ( github.com/fortytw2/leaktest => github.com/fortytw2/leaktest v1.3.0 github.com/frankban/quicktest => github.com/frankban/quicktest v1.14.3 github.com/fsnotify/fsnotify => github.com/fsnotify/fsnotify v1.5.4 - github.com/getkin/kin-openapi => github.com/getkin/kin-openapi v0.98.0 + github.com/getkin/kin-openapi => github.com/getkin/kin-openapi v0.100.0 github.com/getsentry/sentry-go => github.com/getsentry/sentry-go v0.13.0 github.com/ghodss/yaml => github.com/ghodss/yaml v1.0.0 github.com/gin-contrib/sse => github.com/gin-contrib/sse v0.1.0 @@ -193,14 +191,14 @@ replace ( github.com/go-logr/stdr => github.com/go-logr/stdr v1.2.2 github.com/go-logr/zapr => github.com/go-logr/zapr v1.2.3 github.com/go-openapi/analysis => github.com/go-openapi/analysis v0.21.4 - github.com/go-openapi/errors => github.com/go-openapi/errors v0.20.2 + github.com/go-openapi/errors => github.com/go-openapi/errors v0.20.3 github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.19.5 github.com/go-openapi/jsonreference => github.com/go-openapi/jsonreference v0.20.0 - github.com/go-openapi/loads => github.com/go-openapi/loads v0.21.1 + github.com/go-openapi/loads => github.com/go-openapi/loads v0.21.2 github.com/go-openapi/runtime => github.com/go-openapi/runtime v0.24.1 - github.com/go-openapi/spec => github.com/go-openapi/spec v0.20.6 + github.com/go-openapi/spec => github.com/go-openapi/spec v0.20.7 github.com/go-openapi/strfmt => github.com/go-openapi/strfmt v0.21.3 - github.com/go-openapi/swag => github.com/go-openapi/swag v0.21.1 + github.com/go-openapi/swag => github.com/go-openapi/swag v0.22.3 github.com/go-openapi/validate => github.com/go-openapi/validate v0.22.0 github.com/go-pdf/fpdf => github.com/go-pdf/fpdf v1.4.3 github.com/go-playground/assert/v2 => github.com/go-playground/assert/v2 v2.0.1 @@ -212,14 +210,14 @@ replace ( github.com/go-sql-driver/mysql => github.com/go-sql-driver/mysql v1.6.0 github.com/go-stack/stack => github.com/go-stack/stack v1.8.1 github.com/go-task/slim-sprig => github.com/go-task/slim-sprig v2.20.0+incompatible - github.com/go-toolsmith/astcopy => github.com/go-toolsmith/astcopy v1.0.1 - github.com/go-toolsmith/astequal => github.com/go-toolsmith/astequal v1.0.2 + github.com/go-toolsmith/astcopy => github.com/go-toolsmith/astcopy v1.0.2 + github.com/go-toolsmith/astequal => github.com/go-toolsmith/astequal v1.0.3 github.com/go-toolsmith/strparse => github.com/go-toolsmith/strparse v1.0.0 github.com/go-zookeeper/zk => github.com/go-zookeeper/zk v1.0.3 github.com/gobwas/httphead => github.com/gobwas/httphead v0.1.0 github.com/gobwas/pool => github.com/gobwas/pool v0.2.1 github.com/gobwas/ws => github.com/gobwas/ws v1.1.0 - github.com/goccy/go-json => github.com/goccy/go-json v0.9.10 + github.com/goccy/go-json => github.com/goccy/go-json v0.9.11 github.com/goccy/go-yaml => github.com/goccy/go-yaml v1.9.5 github.com/gocql/gocql => github.com/gocql/gocql v1.2.0 github.com/gocraft/dbr/v2 => github.com/gocraft/dbr/v2 v2.7.3 @@ -237,7 +235,7 @@ replace ( github.com/golang/protobuf => github.com/golang/protobuf v1.5.2 github.com/golang/snappy => github.com/golang/snappy v0.0.4 github.com/google/btree => github.com/google/btree v1.1.2 - github.com/google/cel-go => github.com/google/cel-go v0.12.4 + github.com/google/cel-go => github.com/google/cel-go v0.12.5 github.com/google/gnostic => github.com/google/gnostic v0.6.9 github.com/google/go-cmp => github.com/google/go-cmp v0.5.8 github.com/google/go-containerregistry => github.com/google/go-containerregistry v0.11.0 @@ -247,14 +245,14 @@ replace ( github.com/google/gofuzz => github.com/google/gofuzz v1.2.0 github.com/google/martian => github.com/google/martian v2.1.0+incompatible github.com/google/martian/v3 => github.com/google/martian/v3 v3.3.2 - github.com/google/pprof => github.com/google/pprof v0.0.0-20220729232143-a41b82acbcb1 + github.com/google/pprof => github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40 github.com/google/shlex => github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/subcommands => github.com/google/subcommands v1.2.0 github.com/google/uuid => github.com/google/uuid v1.3.0 github.com/google/wire => github.com/google/wire v0.5.0 github.com/googleapis/gax-go/v2 => github.com/googleapis/gax-go/v2 v2.5.1 github.com/googleapis/go-type-adapters => github.com/googleapis/go-type-adapters v1.0.0 - github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.25.0 + github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v1.0.0 github.com/gopherjs/gopherjs => github.com/gopherjs/gopherjs v1.17.2 github.com/gorilla/context => github.com/gorilla/context v1.1.1 github.com/gorilla/mux => github.com/gorilla/mux v1.8.0 @@ -264,15 +262,15 @@ replace ( github.com/grpc-ecosystem/go-grpc-middleware => github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus => github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 + github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/hailocab/go-hostpool => github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0 github.com/hanwen/go-fuse => github.com/hanwen/go-fuse v1.0.0 github.com/hanwen/go-fuse/v2 => github.com/hanwen/go-fuse/v2 v2.1.0 - github.com/hashicorp/consul/api => github.com/hashicorp/consul/api v1.13.1 - github.com/hashicorp/consul/sdk => github.com/hashicorp/consul/sdk v0.10.0 + github.com/hashicorp/consul/api => github.com/hashicorp/consul/api v1.14.0 + github.com/hashicorp/consul/sdk => github.com/hashicorp/consul/sdk v0.11.0 github.com/hashicorp/errwrap => github.com/hashicorp/errwrap v1.1.0 github.com/hashicorp/go-cleanhttp => github.com/hashicorp/go-cleanhttp v0.5.2 - github.com/hashicorp/go-hclog => github.com/hashicorp/go-hclog v1.2.2 + github.com/hashicorp/go-hclog => github.com/hashicorp/go-hclog v1.3.0 github.com/hashicorp/go-immutable-radix => github.com/hashicorp/go-immutable-radix v1.3.1 github.com/hashicorp/go-msgpack => github.com/hashicorp/go-msgpack v1.1.5 github.com/hashicorp/go-multierror => github.com/hashicorp/go-multierror v1.1.1 @@ -285,8 +283,8 @@ replace ( github.com/hashicorp/golang-lru => github.com/hashicorp/golang-lru v0.5.4 github.com/hashicorp/logutils => github.com/hashicorp/logutils v1.0.0 github.com/hashicorp/mdns => github.com/hashicorp/mdns v1.0.5 - github.com/hashicorp/memberlist => github.com/hashicorp/memberlist v0.3.2 - github.com/hashicorp/serf => github.com/hashicorp/serf v0.9.8 + github.com/hashicorp/memberlist => github.com/hashicorp/memberlist v0.4.0 + github.com/hashicorp/serf => github.com/hashicorp/serf v0.10.0 github.com/hetznercloud/hcloud-go => github.com/hetznercloud/hcloud-go v1.35.2 github.com/iancoleman/strcase => github.com/iancoleman/strcase v0.2.0 github.com/ianlancetaylor/demangle => github.com/ianlancetaylor/demangle v0.0.0-20220517205856-0058ec4f073c @@ -301,8 +299,8 @@ replace ( github.com/jackc/pgproto3/v2 => github.com/jackc/pgproto3/v2 v2.3.1 github.com/jackc/pgservicefile => github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b github.com/jackc/pgtype => github.com/jackc/pgtype v1.12.0 - github.com/jackc/pgx/v4 => github.com/jackc/pgx/v4 v4.17.0 - github.com/jackc/puddle => github.com/jackc/puddle v1.2.1 + github.com/jackc/pgx/v4 => github.com/jackc/pgx/v4 v4.17.1 + github.com/jackc/puddle => github.com/jackc/puddle v1.3.0 github.com/jessevdk/go-flags => github.com/jessevdk/go-flags v1.5.0 github.com/jmespath/go-jmespath => github.com/jmespath/go-jmespath v0.4.0 github.com/jmespath/go-jmespath/internal/testify => github.com/jmespath/go-jmespath/internal/testify v1.5.1 @@ -316,13 +314,13 @@ replace ( github.com/julienschmidt/httprouter => github.com/julienschmidt/httprouter v1.3.0 github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.6.2 github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0 - github.com/klauspost/compress => github.com/klauspost/compress v1.15.10-0.20220729101446-5a3a4a965cc6 - github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.1.0 + github.com/klauspost/compress => github.com/klauspost/compress v1.15.10-0.20220829133349-1481365fd7f6 + github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.1.1 github.com/kolo/xmlrpc => github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b github.com/kpango/fastime => github.com/kpango/fastime v1.1.4 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20220209050620-e5987ba1ea5e github.com/kpango/gache => github.com/kpango/gache v1.2.8 - github.com/kpango/glg => github.com/kpango/glg v1.6.12 + github.com/kpango/glg => github.com/kpango/glg v1.6.13 github.com/kr/fs => github.com/kr/fs v0.1.0 github.com/kr/pretty => github.com/kr/pretty v0.3.0 github.com/kr/text => github.com/kr/text v0.2.0 @@ -331,16 +329,16 @@ replace ( github.com/leodido/go-urn => github.com/leodido/go-urn v1.2.1 github.com/lib/pq => github.com/lib/pq v1.10.6 github.com/liggitt/tabwriter => github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de - github.com/linode/linodego => github.com/linode/linodego v1.9.0 + github.com/linode/linodego => github.com/linode/linodego v1.9.1 github.com/linuxkit/virtsock => github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2 github.com/lucasb-eyer/go-colorful => github.com/lucasb-eyer/go-colorful v1.2.0 - github.com/lyft/protoc-gen-star => github.com/lyft/protoc-gen-star v0.6.0 + github.com/lyft/protoc-gen-star => github.com/lyft/protoc-gen-star v0.6.1 github.com/mailru/easyjson => github.com/mailru/easyjson v0.7.7 - github.com/mattn/go-colorable => github.com/mattn/go-colorable v0.1.12 + github.com/mattn/go-colorable => github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.7 - github.com/mattn/go-isatty => github.com/mattn/go-isatty v0.0.14 + github.com/mattn/go-isatty => github.com/mattn/go-isatty v0.0.16 github.com/mattn/go-shellwords => github.com/mattn/go-shellwords v1.0.12 - github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.14 + github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.15 github.com/matttproud/golang_protobuf_extensions => github.com/matttproud/golang_protobuf_extensions v1.0.1 github.com/miekg/dns => github.com/miekg/dns v1.1.50 github.com/miekg/pkcs11 => github.com/miekg/pkcs11 v1.1.1 @@ -356,7 +354,7 @@ replace ( github.com/moby/sys/mountinfo => github.com/moby/sys/mountinfo v0.6.2 github.com/moby/sys/signal => github.com/moby/sys/signal v0.7.0 github.com/moby/sys/symlink => github.com/moby/sys/symlink v0.2.0 - github.com/moby/term => github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 + github.com/moby/term => github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae github.com/modern-go/concurrent => github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/reflect2 => github.com/modern-go/reflect2 v1.0.2 github.com/modocache/gover => github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 @@ -372,10 +370,10 @@ replace ( github.com/oklog/run => github.com/oklog/run v1.1.0 github.com/oklog/ulid => github.com/oklog/ulid v1.3.1 github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega => github.com/onsi/gomega v1.20.0 + github.com/onsi/gomega => github.com/onsi/gomega v1.20.2 github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec => github.com/opencontainers/image-spec v1.0.2 - github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.3 + github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.4 github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.0.2 github.com/opencontainers/selinux => github.com/opencontainers/selinux v1.10.1 github.com/opentracing/opentracing-go => github.com/opentracing/opentracing-go v1.2.0 @@ -403,15 +401,15 @@ replace ( github.com/prometheus/procfs => github.com/prometheus/procfs v0.8.0 github.com/prometheus/prometheus/v2 => github.com/prometheus/prometheus/v2 v2.35.0-retract github.com/prometheus/statsd_exporter => github.com/prometheus/statsd_exporter v0.22.7 - github.com/quasilyte/go-ruleguard => github.com/quasilyte/go-ruleguard v0.3.16 + github.com/quasilyte/go-ruleguard => github.com/quasilyte/go-ruleguard v0.3.18 github.com/quasilyte/go-ruleguard/dsl => github.com/quasilyte/go-ruleguard/dsl v0.3.21 - github.com/quasilyte/gogrep => github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9 + github.com/quasilyte/gogrep => github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f github.com/quasilyte/stdinfo => github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 github.com/rogpeppe/fastuuid => github.com/rogpeppe/fastuuid v1.2.0 - github.com/rogpeppe/go-internal => github.com/rogpeppe/go-internal v1.8.1 + github.com/rogpeppe/go-internal => github.com/rogpeppe/go-internal v1.9.0 github.com/rs/cors => github.com/rs/cors v1.8.2 github.com/rs/xid => github.com/rs/xid v1.4.0 - github.com/rs/zerolog => github.com/rs/zerolog v1.27.0 + github.com/rs/zerolog => github.com/rs/zerolog v1.28.0 github.com/russross/blackfriday/v2 => github.com/russross/blackfriday/v2 v2.1.0 github.com/ruudk/golang-pdf417 => github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245 github.com/ryanuber/columnize => github.com/ryanuber/columnize v2.1.2+incompatible @@ -477,6 +475,7 @@ replace ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0 go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.9.0 + go.opentelemetry.io/otel/exporters/jaeger => go.opentelemetry.io/otel/exporters/jaeger v1.9.0 go.opentelemetry.io/otel/exporters/otlp => go.opentelemetry.io/otel/exporters/otlp v0.20.0 go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 @@ -487,26 +486,26 @@ replace ( go.opentelemetry.io/otel/sdk/export/metric => go.opentelemetry.io/otel/sdk/export/metric v0.28.0 go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v0.31.0 go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.9.0 - go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.18.0 - go.starlark.net => go.starlark.net v0.0.0-20220714194419-4cadf0a12139 - go.uber.org/atomic => go.uber.org/atomic v1.9.0 + go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.19.0 + go.starlark.net => go.starlark.net v0.0.0-20220817180228-f738f5508c12 + go.uber.org/atomic => go.uber.org/atomic v1.10.0 go.uber.org/automaxprocs => go.uber.org/automaxprocs v1.5.1 go.uber.org/goleak => go.uber.org/goleak v1.1.12 go.uber.org/multierr => go.uber.org/multierr v1.8.0 - go.uber.org/zap => go.uber.org/zap v1.21.0 + go.uber.org/zap => go.uber.org/zap v1.23.0 go4.org/intern => go4.org/intern v0.0.0-20220617035311-6925f38cc365 go4.org/unsafe/assume-no-moving-gc => go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 gocloud.dev => gocloud.dev v0.26.0 - golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa - golang.org/x/exp => golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e - golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20220722155223-a9213eeb770e + golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 + golang.org/x/exp => golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 + golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 golang.org/x/image => golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 golang.org/x/lint => golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/mod => golang.org/x/mod v0.5.1 - golang.org/x/net => golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 - golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c - golang.org/x/sync => golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 - golang.org/x/sys => golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 + golang.org/x/net => golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b + golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 + golang.org/x/sync => golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde + golang.org/x/sys => golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 golang.org/x/term => golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 golang.org/x/text => golang.org/x/text v0.3.7 golang.org/x/time => golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 @@ -516,10 +515,10 @@ replace ( gonum.org/v1/gonum => gonum.org/v1/gonum v0.11.0 gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 gonum.org/v1/plot => gonum.org/v1/plot v0.11.0 - google.golang.org/api => google.golang.org/api v0.91.0 + google.golang.org/api => google.golang.org/api v0.94.0 google.golang.org/appengine => google.golang.org/appengine v1.6.7 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 - google.golang.org/grpc => google.golang.org/grpc v1.48.0 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf + google.golang.org/grpc => google.golang.org/grpc v1.49.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 google.golang.org/protobuf => google.golang.org/protobuf v1.28.1 gopkg.in/alecthomas/kingpin.v2 => gopkg.in/alecthomas/kingpin.v2 v2.2.6 @@ -527,7 +526,7 @@ replace ( gopkg.in/errgo.v2 => gopkg.in/errgo.v2 v2.1.0 gopkg.in/inconshreveable/log15.v2 => gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 gopkg.in/inf.v0 => gopkg.in/inf.v0 v0.9.1 - gopkg.in/ini.v1 => gopkg.in/ini.v1 v1.66.6 + gopkg.in/ini.v1 => gopkg.in/ini.v1 v1.67.0 gopkg.in/natefinch/lumberjack.v2 => gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/telebot.v3 => gopkg.in/telebot.v3 v3.0.0 @@ -536,7 +535,7 @@ replace ( gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 => gotest.tools/v3 v3.3.0 honnef.co/go/tools => honnef.co/go/tools v0.3.3 - inet.af/netaddr => inet.af/netaddr v0.0.0-20220617031823-097006376321 + inet.af/netaddr => inet.af/netaddr v0.0.0-20220811202034-502d2d690317 k8s.io/api => k8s.io/api v0.24.2 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.2 k8s.io/apimachinery => k8s.io/apimachinery v0.24.2 @@ -548,10 +547,10 @@ replace ( k8s.io/cri-api => k8s.io/cri-api v0.24.2 k8s.io/gengo => k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 k8s.io/klog => k8s.io/klog v1.0.0 - k8s.io/klog/v2 => k8s.io/klog/v2 v2.70.1 + k8s.io/klog/v2 => k8s.io/klog/v2 v2.80.0 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea k8s.io/metrics => k8s.io/metrics v0.24.2 - k8s.io/utils => k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed + k8s.io/utils => k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 nhooyr.io/websocket => nhooyr.io/websocket v1.8.7 rsc.io/pdf => rsc.io/pdf v0.1.1 sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.32 @@ -566,20 +565,19 @@ replace ( require ( cloud.google.com/go/storage v1.23.0 code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6 - contrib.go.opencensus.io/exporter/jaeger v0.0.0-00010101000000-000000000000 contrib.go.opencensus.io/exporter/prometheus v0.0.0-00010101000000-000000000000 github.com/aws/aws-sdk-go v1.43.31 github.com/envoyproxy/protoc-gen-validate v0.6.7 github.com/fsnotify/fsnotify v1.5.1 github.com/go-redis/redis/v8 v8.0.0-00010101000000-000000000000 github.com/go-sql-driver/mysql v1.6.0 - github.com/goccy/go-json v0.9.10 + github.com/goccy/go-json v0.9.11 github.com/gocql/gocql v0.0.0-20200131111108-92af2e088537 github.com/gocraft/dbr/v2 v2.0.0-00010101000000-000000000000 github.com/google/go-cmp v0.5.8 github.com/gorilla/mux v1.8.0 - github.com/hashicorp/go-version v1.2.0 - github.com/klauspost/compress v1.15.8 + github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000 + github.com/klauspost/compress v1.15.1 github.com/kpango/fastime v1.1.4 github.com/kpango/fuid v0.0.0-00010101000000-000000000000 github.com/kpango/gache v0.0.0-00010101000000-000000000000 @@ -588,24 +586,28 @@ require ( github.com/lucasb-eyer/go-colorful v0.0.0-00010101000000-000000000000 github.com/pierrec/lz4/v3 v3.0.0-00010101000000-000000000000 github.com/quasilyte/go-ruleguard v0.0.0-00010101000000-000000000000 - github.com/quasilyte/go-ruleguard/dsl v0.3.19 + github.com/quasilyte/go-ruleguard/dsl v0.3.21 github.com/scylladb/gocqlx v0.0.0-00010101000000-000000000000 github.com/vdaas/vald-client-go v0.0.0-00010101000000-000000000000 github.com/zeebo/xxh3 v1.0.2 go.opencensus.io v0.23.0 - go.uber.org/automaxprocs v1.5.1 + go.opentelemetry.io/otel v1.9.0 + go.opentelemetry.io/otel/exporters/jaeger v0.0.0-00010101000000-000000000000 + go.opentelemetry.io/otel/sdk v1.9.0 + go.opentelemetry.io/otel/trace v1.9.0 + go.uber.org/automaxprocs v0.0.0-00010101000000-000000000000 go.uber.org/goleak v1.1.12 - go.uber.org/zap v1.21.0 + go.uber.org/zap v1.23.0 gocloud.dev v0.0.0-00010101000000-000000000000 golang.org/x/net v0.0.0-20220722155237-a158d28d115b - golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c + golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 - golang.org/x/sys v0.0.0-20220731174439-a90be440212d + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab golang.org/x/text v0.3.7 - golang.org/x/tools v0.1.11 + golang.org/x/tools v0.1.12 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.10.1 - google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 + google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 @@ -619,7 +621,7 @@ require ( ) require ( - cloud.google.com/go v0.102.1 // indirect + cloud.google.com/go v0.104.0 // indirect cloud.google.com/go/compute v1.7.0 // indirect cloud.google.com/go/iam v0.3.0 // indirect git.sr.ht/~sbinet/gg v0.3.1 // indirect @@ -628,7 +630,7 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/go-fonts/liberation v0.2.0 // indirect @@ -636,25 +638,26 @@ require ( github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.14 // indirect github.com/go-pdf/fpdf v0.6.0 // indirect - github.com/go-toolsmith/astcopy v1.0.0 // indirect - github.com/go-toolsmith/astequal v1.0.2 // indirect + github.com/go-toolsmith/astcopy v1.0.2 // indirect + github.com/go-toolsmith/astequal v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.3 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/gofuzz v1.2.0 // indirect + github.com/google/gofuzz v1.1.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect github.com/google/wire v0.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.4.0 // indirect + github.com/googleapis/gax-go/v2 v2.5.1 // indirect github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/imdario/mergo v0.3.12 // indirect @@ -673,31 +676,30 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect + github.com/prometheus/client_golang v1.13.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - github.com/prometheus/statsd_exporter v0.21.0 // indirect - github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect + github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect - github.com/spf13/cobra v1.5.0 // indirect + github.com/spf13/cobra v1.4.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect github.com/xlab/treeprint v1.1.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect - golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171 // indirect + golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.90.0 // indirect + google.golang.org/api v0.94.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 1c076527ee..7ccba10cba 100644 --- a/go.sum +++ b/go.sum @@ -1,28 +1,26 @@ -cloud.google.com/go v0.103.0 h1:YXtxp9ymmZjlGzxV7VrYQ8aaQuAgcqxSy6YhDX4I458= -cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= -cloud.google.com/go/bigquery v1.37.0/go.mod h1:C3abDfeObLBF1Pw/R8XLLpikving5wpjneEpiqJ7OQ8= -cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go v0.104.0 h1:gSmWO7DY1vOm0MVU6DNXM11BWHHsTUmsC5cv1fuW5X8= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go/bigquery v1.39.0/go.mod h1:XVXHPWZICwGSvPcygubr2MeTF9SrNvU77dV2YYolyYQ= +cloud.google.com/go/compute v1.9.0 h1:ED/FP4xv8GJw63v556/ASNc1CeeLUO2Bs8nzaHchkHg= +cloud.google.com/go/compute v1.9.0/go.mod h1:lWv1h/zUWTm/LozzfTJhBSkd6ShQq8la8VeeuOEGxfY= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datastore v1.8.0/go.mod h1:q1CpHVByTlXppdqTcu4LIhCsTn3fhtZ5R7+TajciO+M= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/monitoring v1.5.0/go.mod h1:/o9y8NYX5j91JjD/JvGLYbi86kL11OjyJXq2XziLJu4= -cloud.google.com/go/pubsub v1.24.0/go.mod h1:rWv09Te1SsRpRGPiWOMDKraMQTJyJps4MkUCoMGUgqw= +cloud.google.com/go/monitoring v1.6.0/go.mod h1:w+OY1TYCk4MtvY7WfEHlIp5mP8SV/gDSqOsvGhVa2KM= +cloud.google.com/go/pubsub v1.25.1/go.mod h1:bY6l7rF8kCcwz6V3RaQ6kK4p5g7qc7PqjRoE9wDOqOU= cloud.google.com/go/secretmanager v1.5.0/go.mod h1:5C9kM+RwSpkURNovKySkNvGQLUaOgyoR5W0RUx2SyHQ= -cloud.google.com/go/storage v1.24.0 h1:a4N0gIkx83uoVFGz8B2eAV3OhN90QoWF5OZWLKl39ig= -cloud.google.com/go/storage v1.24.0/go.mod h1:3xrJEFMXBsQLgxwThyjuD3aYlroL0TMRec1ypGUQ0KE= +cloud.google.com/go/storage v1.26.0 h1:lYAGjknyDJirSzfwUlkv4Nsnj7od7foxQNH/fqZqles= +cloud.google.com/go/storage v1.26.0/go.mod h1:mk/N7YwIKEWyTvXAWQCIeiCTdLoRH6Pd5xmSnolQLTI= cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 h1:tM5+dn2C9xZw1RzgI6WTQW1rGqdUimKB3RFbyu4h6Hc= code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5/go.mod h1:v4VVB6oBMz/c9fRY6vZrwr5xKRWOH5NPDjQZlPk0Gbs= contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= -contrib.go.opencensus.io/exporter/jaeger v0.2.1 h1:yGBYzYMewVL0yO9qqJv3Z5+IRhPdU7e9o/2oKpX4YvI= -contrib.go.opencensus.io/exporter/jaeger v0.2.1/go.mod h1:Y8IsLgdxqh1QxYxPC5IgXVmBaeLUeQFfBeBi9PbeZd0= -contrib.go.opencensus.io/exporter/prometheus v0.4.1 h1:oObVeKo2NxpdF/fIfrPsNj6K0Prg0R0mHM+uANlYMiM= -contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U= -contrib.go.opencensus.io/exporter/stackdriver v0.13.13/go.mod h1:5pSSGY0Bhuk7waTHuDf4aQ8D2DrhgETRo9fy6k3Xlzc= +contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= +contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= +contrib.go.opencensus.io/exporter/stackdriver v0.13.10/go.mod h1:I5htMbyta491eUxufwwZPQdcKvvgzMB4O9ni41YnIM8= contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= eliasnaur.com/font v0.0.0-20220124212145-832bb8fc08c3/go.mod h1:OYVuxibdk9OSLX8vAqydtRPP87PyTFcT9uH3MlEGBQA= fyne.io/fyne v1.4.3/go.mod h1:8kiPBNSDmuplxs9WnKCkaWYqbcXFy0DeAzwa6PBO9Z8= @@ -34,57 +32,48 @@ gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3 gioui.org/shader v1.0.6/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20220708163326-82d177caec6e/go.mod h1:i9fr2JpcEcY/IHEvzCM3qXUZYOQHgR89dt4es1CgMhc= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-amqp-common-go/v3 v3.2.3/go.mod h1:7rPmbSfszeovxGfc5fSAXE4ehlXQZHpMja2OtxC2Tas= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v66.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.1/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.3/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-service-bus-go v0.11.5/go.mod h1:MI6ge2CuQWBVq+ly456MY7XqNLJip5LO1iSFodbNLbU= github.com/Azure/azure-storage-blob-go v0.15.0 h1:rXtgp8tN1p29GvpGgfJetavIG0V7OgcSXPpwp3tx6qk= github.com/Azure/azure-storage-blob-go v0.15.0/go.mod h1:vbjsVbX0dlxnRc4FFMPsS9BsJWPcne7GB7onqlPvz58= github.com/Azure/go-amqp v0.17.5/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.1-0.20220726153024-711dde1b1be6+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= +github.com/Azure/go-autorest v14.2.1-0.20220808173745-2fa44cb18b83+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.29-0.20220808173745-2fa44cb18b83/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12-0.20220726153024-711dde1b1be6/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= -github.com/Azure/go-autorest/autorest/date v0.3.1-0.20220726153024-711dde1b1be6/go.mod h1:CHJ5Cu2H2HOHbo8wSOidbGEk/L11sCIy/IglS16YuRI= -github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20220726153024-711dde1b1be6/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.1-0.20220726153024-711dde1b1be6/go.mod h1:DSh3VxN6gfEglfL5RXwMuwLQrHEayq9JF/NUe+DkxCI= -github.com/Azure/go-autorest/autorest/validation v0.3.2-0.20220726153024-711dde1b1be6/go.mod h1:y6/C2u1QjfM/lldwLunO02nDUwfTwTfJ3u/HeW7JoYs= -github.com/Azure/go-autorest/logger v0.2.2-0.20220726153024-711dde1b1be6/go.mod h1:mwDiRID/uD2cdq/qPxuXAZnmOEnn6qSn/xnC+0Q//eE= -github.com/Azure/go-autorest/tracing v0.6.1-0.20220726153024-711dde1b1be6/go.mod h1:DWJLY5/ttkqsBNafOmCvqIlik+Da9EFPSpzNnCWRjMo= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.12-0.20220808173745-2fa44cb18b83/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= +github.com/Azure/go-autorest/autorest/azure/cli v0.4.7-0.20220808173745-2fa44cb18b83/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= +github.com/Azure/go-autorest/autorest/date v0.3.1-0.20220808173745-2fa44cb18b83/go.mod h1:CHJ5Cu2H2HOHbo8wSOidbGEk/L11sCIy/IglS16YuRI= +github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20220808173745-2fa44cb18b83/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= +github.com/Azure/go-autorest/autorest/to v0.4.1-0.20220808173745-2fa44cb18b83/go.mod h1:DSh3VxN6gfEglfL5RXwMuwLQrHEayq9JF/NUe+DkxCI= +github.com/Azure/go-autorest/autorest/validation v0.3.2-0.20220808173745-2fa44cb18b83/go.mod h1:y6/C2u1QjfM/lldwLunO02nDUwfTwTfJ3u/HeW7JoYs= +github.com/Azure/go-autorest/logger v0.2.2-0.20220808173745-2fa44cb18b83/go.mod h1:mwDiRID/uD2cdq/qPxuXAZnmOEnn6qSn/xnC+0Q//eE= +github.com/Azure/go-autorest/tracing v0.6.1-0.20220808173745-2fa44cb18b83/go.mod h1:DWJLY5/ttkqsBNafOmCvqIlik+Da9EFPSpzNnCWRjMo= github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v1.31.2/go.mod h1:qR6jVnZTKDCW3j+fC9mOEPHm++1nKDMkqbbkD6KNsfo= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/deck v0.0.0-20220708113203-4c766a8e1850/go.mod h1:8XEdKkD+Bk7YhhX9FS9Nz2eghb+Hh58w9U4OL28zd14= github.com/ajstarks/deck/generate v0.0.0-20220708113203-4c766a8e1850/go.mod h1:u04DhpZIpzaPnAUmhhjibCj450/2ITtLTEnvhaM49as= github.com/ajstarks/fc v0.0.0-20220317125603-4129c66e12c7/go.mod h1:lKzlLfZDk7F4FgB15Bc5vnZI094gxuX6X0pyt56BNMk= @@ -95,60 +84,60 @@ github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGW github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alexflint/go-filemutex v1.2.0/go.mod h1:mYyQSWvw9Tx2/H2n9qXPb52tTYfE0pZAWcBq5mK025c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220804214150-8b0cc382067f/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220826213629-cd8f367ca010/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.44.70 h1:wrwAbqJqf+ncEK1F/bXTYpgO6zXIgQXi/2ppBgmYI9g= -github.com/aws/aws-sdk-go v1.44.70/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v1.16.8 h1:gOe9UPR98XSf7oEJCcojYg+N2/jCRm4DdeIsP85pIyQ= -github.com/aws/aws-sdk-go-v2 v1.16.8/go.mod h1:6CpKuLXg2w7If3ABZCl/qZ6rEgwtjZTn4eAf4RcEyuw= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 h1:S/ZBwevQkr7gv5YxONYpGQxlMFFYSRfz3RMcjsC9Qhk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3/go.mod h1:gNsR5CaXKmQSSzrmGxmwmct/r+ZBfbxorAuXYsj/M5Y= -github.com/aws/aws-sdk-go-v2/config v1.15.15 h1:yBV+J7Au5KZwOIrIYhYkTGJbifZPCkAnCFSvGsF3ui8= -github.com/aws/aws-sdk-go-v2/config v1.15.15/go.mod h1:A1Lzyy/o21I5/s2FbyX5AevQfSVXpvvIDCoVFD0BC4E= -github.com/aws/aws-sdk-go-v2/credentials v1.12.10 h1:7gGcMQePejwiKoDWjB9cWnpfVdnz/e5JwJFuT6OrroI= -github.com/aws/aws-sdk-go-v2/credentials v1.12.10/go.mod h1:g5eIM5XRs/OzIIK81QMBl+dAuDyoLN0VYaLP+tBqEOk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9 h1:hz8tc+OW17YqxyFFPSkvfSikbqWcyyHRyPVSTzC0+aI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9/go.mod h1:KDCCm4ONIdHtUloDcFvK2+vshZvx4Zmj7UMDfusuz5s= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.21 h1:bpiKFJ9aC0xTVpygSRRRL/YHC1JZ+pHQHENATHuoiwo= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.21/go.mod h1:iIYPrQ2rYfZiB/iADYlhj9HHZ9TTi6PqKQPAqygohbE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15 h1:bx5F2mr6H6FC7zNIQoDoUr8wEKnvmwRncujT3FYRtic= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15/go.mod h1:pWrr2OoHlT7M/Pd2y4HV3gJyPb3qj5qMmnPkKSNPYK4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9 h1:5sbyznZC2TeFpa4fvtpvpcGbzeXEEs1l1Jo51ynUNsQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9/go.mod h1:08tUpeSGN33QKSO7fwxXczNfiwCpbj+GxK6XKwqWVv0= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16 h1:f0ySVcmQhwmzn7zQozd8wBM3yuGBfzdpsOaKQ0/Epzw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16/go.mod h1:CYmI+7x03jjJih8kBEEFKRQc40UjUokT0k7GbvrhhTc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.6 h1:3L8pcjvgaSOs0zzZcMKzxDSkYKEpwJ2dNVDdxm68jAY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.6/go.mod h1:O7Oc4peGZDEKlddivslfYFvAbgzvl/GH3J8j3JIGBXc= +github.com/aws/aws-sdk-go v1.44.90 h1:5g93WPWhh8EL2HhQ7HOYapWj/gY6/K6rGYSx1RTyD1M= +github.com/aws/aws-sdk-go v1.44.90/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go-v2 v1.16.13 h1:HgF7OX2q0gSZtcXoo9DMEA8A2Qk/GCxmWyM0RI7Yz2Y= +github.com/aws/aws-sdk-go-v2 v1.16.13/go.mod h1:xSyvSnzh0KLs5H4HJGeIEsNYemUWdNIl0b/rP6SIsLU= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.6 h1:PPefqpze5qW/eqdgK5RqtOTQi5GhXpSxitbGqImAQ1I= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.6/go.mod h1:bcLsAUI2iDC8zC52XQvczR/zpaC1q/wP32p3wwvqGVo= +github.com/aws/aws-sdk-go-v2/config v1.17.4 h1:9HY1wbShqObySCHP2Z07blfrSWVX+nVxCZmUuLZKcG8= +github.com/aws/aws-sdk-go-v2/config v1.17.4/go.mod h1:ul+ru+huVpfduF9XRmGUq82T8T3K+nIFQuF6F+L+548= +github.com/aws/aws-sdk-go-v2/credentials v1.12.17 h1:htUjIJOQcvIUR0jC4eLkdis1DfaLL4EUbIKUFqh2WFA= +github.com/aws/aws-sdk-go-v2/credentials v1.12.17/go.mod h1:jd1mvJulXY7ccHvcSiJceYhv06yWIIRkJnwWEA4IX+g= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.14 h1:NZwZFtxXGOEIiCd8jWN55lexakug543CaO68bTpoLwg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.14/go.mod h1:5CU57SyF5jZLSIw4OOll0PG83ThXwNdkRFOc0EltD/0= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.30 h1:Rtd+R7uWtQg5+bZ72x1g1ENjQykhFKnayo6Lv/QpxFU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.30/go.mod h1:Fbi0PULkPycJg44P9rwhQUGknk8Fl6DUTXcCaSZ6FeI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.20 h1:Rk8eqZSdFovt8Id+O+i2qT0c3CY13DPn2SfGOEVlxNs= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.20/go.mod h1:gdZ5gRUaxThXIZyZQ8MTtgYBk2jbHgp05BO3GcD9Cwc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.14 h1:6Yxuq9yrkoLYab5JXqJnto9tdRuIcYVdR+eiKjsJYWU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.14/go.mod h1:GEV9jaDPIgayiU+uevxwozcvUOjc+P4aHE2BeSjm2vE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.21 h1:lpwSbLKYTuABo6SyUoC25xAmfO3/TehGS2SmD1EtOL0= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.21/go.mod h1:Q0pktZjvRZk77TBto6yAvUAi7fcse1bdcMctBDVGgBw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.11 h1:zFriLANEIFWl/TQvPqhRASnU8Xr9fzshPL0OY7e1DpM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.11/go.mod h1:EAtoA46xWR2I0fROMCsb0lgC4kYfgaK9EBrCv9hIHYM= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 h1:4n4KCtv5SUoT5Er5XV41huuzrCqepxlW3SDI9qHQebc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3/go.mod h1:gkb2qADY+OHaGLKNTYxMaQNacfeyQpZ4csDTQMeFmcw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.10 h1:7LJcuRalaLw+GYQTMGmVUl4opg2HrDZkvn/L3KvIQfw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.10/go.mod h1:Qks+dxK3O+Z2deAhNo6cJ8ls1bam3tUGUAcgxQP1c70= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9 h1:sHfDuhbOuuWSIAEDd3pma6p0JgUcR2iePxtCE8gfCxQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9/go.mod h1:yQowTpvdZkFVuHrLBXmczat4W+WJKg/PafBZnGBLga0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.9 h1:sJdKvydGYDML9LTFcp6qq6Z5fIjN0Rdq2Gvw1hUg8tc= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.9/go.mod h1:Rc5+wn2k8gFSi3V1Ch4mhxOzjMh+bYSXVFfVaqowQOY= -github.com/aws/aws-sdk-go-v2/service/kms v1.18.1/go.mod h1:4PZMUkc9rXHWGVB5J9vKaZy3D7Nai79ORworQ3ASMiM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2 h1:NvzGue25jKnuAsh6yQ+TZ4ResMcnp49AWgWGm2L4b5o= -github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2/go.mod h1:u+566cosFI+d+motIz3USXEh6sN8Nq4GrNXSg2RXVMo= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.14/go.mod h1:xakbH8KMsQQKqzX87uyyzTHshc/0/Df8bsTneTS5pFU= -github.com/aws/aws-sdk-go-v2/service/sns v1.17.10/go.mod h1:uITsRNVMeCB3MkWpXxXw0eDz8pW4TYLzj+eyQtbhSxM= -github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1/go.mod h1:A94o564Gj+Yn+7QO1eLFeI7UVv3riy/YBFOfICVqFvU= -github.com/aws/aws-sdk-go-v2/service/ssm v1.27.6/go.mod h1:fiFzQgj4xNOg4/wqmAiPvzgDMXPD+cUEplX/CYn+0j0= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.13 h1:DQpf+al+aWozOEmVEdml67qkVZ6vdtGUi71BZZWw40k= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.13/go.mod h1:d7ptRksDDgvXaUvxyHZ9SYh+iMDymm94JbVcgvSYSzU= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.10 h1:7tquJrhjYz2EsCBvA9VTl+sBAAh1bv7h/sGASdZOGGo= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.10/go.mod h1:cftkHYN6tCDNfkSasAmclSfl4l7cySoay8vz7p/ce0E= -github.com/aws/smithy-go v1.12.0 h1:gXpeZel/jPoWQ7OEmLIgCUnhkFftqNfwWUwAHSlp1v0= -github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.7 h1:f0l2kujaZ0UyqwfKdtPaYQs8vzFmLbtPhWDNYeEY4ho= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.7/go.mod h1:aGaU7sKr91r4yZCi+4fWpsDepAzy8A6u/1enpD3K6mM= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.15 h1:xw0EMeNfAdmiFX3Ix9OOdqW/S2GPeV3WAYKHr2qR/W4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.15/go.mod h1:SvmZIJp6fx7Yua+4hhigLm5kVRDWo56Cj+j8FvVl6M8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.14 h1:c5hJNN2DkK1gAytcKp7LkiKNDJeevFSboPezEHAM4Ro= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.14/go.mod h1:8qOLjqMzY/S1kh3myDXA1yxK5eD4uN8aOJgKpgvc4OM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.14 h1:sGFyMilgKmgg8TsGMUXApIvIrbc9SZs2sFrbdugL21c= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.14/go.mod h1:QWqlQbLB0GYO6hDDUwPKr2VKr7C6lpCdOzs92IVYQmk= +github.com/aws/aws-sdk-go-v2/service/kms v1.18.8/go.mod h1:NjgXnn0pk5rLSWZIgtx0BCwoCugRXzKZ7cDNsl98W7U= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.8 h1:zYpocIndjdPRURWkq/Rschy8WpC+vL0f74z+lJhEpJk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.8/go.mod h1:aljgUlqAplymnhQNEcyx/fjUmQtOXCsS6Ry+ySpCcA8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.21/go.mod h1:6JkZkiwXG3TLJh9O+WysncUbD1hTrsKiSTO1kbYM/MQ= +github.com/aws/aws-sdk-go-v2/service/sns v1.17.16/go.mod h1:4WxvZBlY3vIqs/zNL7IJpP5SPf5rf2wncX8z9iJGRps= +github.com/aws/aws-sdk-go-v2/service/sqs v1.19.7/go.mod h1:vMdSMmI0ajtCjxN4pTocddojOpPSQWBH6L0VsuQbLyQ= +github.com/aws/aws-sdk-go-v2/service/ssm v1.27.12/go.mod h1:YKSwltOXNDEOzMLcr9vaiFnfZbB6l6Etf94ViogY/Bk= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.20 h1:3raP0UC9rvRyY4/cc4o4F3jTrNo94AYiarNUGNnq6dU= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.20/go.mod h1:hPsROgDdgY/NQ1gPt7VJWG0GjSnalDC0DkkMfGEw2gc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.2 h1:/SYpdjjAtraymql+/r719OgjxezdanAQiLb/NMxDb04= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.2/go.mod h1:5cxfDYtY2mDOlmesy4yycb6lwyy1U/iAUOHKhQLKw/E= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.16 h1:otZvq9r+xjPL7qU/luX2QdBamiN+oSZURRi4sAKymO8= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.16/go.mod h1:Y9iBgT1w2vHtYzJEkwD6FqILjDSsvbxcW/+wIYxyse4= +github.com/aws/smithy-go v1.13.1 h1:q09BdpUiaqpothcv393ACfWJJHzlzjB5HaNL1XHKmoQ= +github.com/aws/smithy-go v1.13.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benoitkugler/pstokenizer v1.0.0/go.mod h1:l1G2Voirz0q/jj0TQfabNxVsa8HZXh/VMxFSRALWTiE= @@ -159,7 +148,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -170,11 +158,9 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= -github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= @@ -182,62 +168,22 @@ github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21/go.mod github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20220520190051-1e77728a1eaa/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/datadriven v1.0.1/go.mod h1:ayXb8FgaXxgGObAHeeLXa1bPh52ZpuWSY560iFfB3jI= -github.com/cockroachdb/errors v1.9.0/go.mod h1:vaNcEYYqbIqB5JhKBhFV9CneUqeuEbB2OYJBK4GBNYQ= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.6.7/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.1.7/go.mod h1:Ve4Q0RB2Bw78D90OL0YVyDjqdTL7FKh9W+UPbhWiZXA= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.1.6/go.mod h1:cBSGSd3q2oo+r2Glsiix6O5g2eKFaYe0bMNrYjN+V7M= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.12.0/go.mod h1:AIQ59TewBFJ4GOPEQXujcrJ/EKxh5xXZegW1rkR1P/M= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= -github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8= -github.com/containers/ocicrypt v1.1.5/go.mod h1:WgjxPWdTJMqYMjf3M6cuIFFA1/MpyyhIM99YInA+Rvc= -github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= 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= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= -github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvyukov/go-fuzz v0.0.0-20220726122315-1d375ef9f9f6/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= @@ -245,21 +191,20 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 h1:EbF0UihnxWRcIMOwoVtqnAylsqcjzqpSvMdjF2Ud4rA= -github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 h1:ecIiM5NYeEOhy5trm8xel6wpUhYH+QWteUKnwcbCMl4= +github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -273,14 +218,11 @@ github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3/go.mod h1:CzM2G82Q9BDUv github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fyne-io/mobile v0.1.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getkin/kin-openapi v0.98.0/go.mod h1:w4lRPHiyOdwGbOkLIyk+P0qCwlu7TXPCHD/64nSXzgE= -github.com/getsentry/sentry-go v0.13.0/go.mod h1:EOsfu5ZdvKPfeHYV6pTVQnsjfp30+XA7//UooKNumH0= +github.com/getkin/kin-openapi v0.100.0/go.mod h1:w4lRPHiyOdwGbOkLIyk+P0qCwlu7TXPCHD/64nSXzgE= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gioui/uax v0.2.1-0.20220325163150-e3d987515a12/go.mod h1:kDhBRTA/i3H46PVdhqcw26TdGSIj42TOKNWKY+Kipnw= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0 h1:JSajPXURYqpr+Cu8U9bt8K+XcACIHWqWrvWCKyeFmVQ= @@ -301,24 +243,17 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/runtime v0.24.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-pdf/fpdf v1.4.3 h1:0ZbUVyy3URshI6fCIaCD/iTVW33dqA8zbUHuGynxAPA= github.com/go-pdf/fpdf v1.4.3/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -327,39 +262,34 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v2.20.0+incompatible/go.mod h1:N/mhXZITr/EQAOErEHciKvO1bFei2Lld2Ym6h96pdy0= github.com/go-text/typesetting v0.0.0-20220411150340-35994bc27a7b/go.mod h1:ZNYu5saGoMOqtkVH5T8onTwhzenDUVszI+5WFHJRaxQ= -github.com/go-toolsmith/astcopy v1.0.1 h1:l09oBhAPyV74kLJ3ZO31iBU8htZGTwr9LTjuMCyL8go= -github.com/go-toolsmith/astcopy v1.0.1/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= -github.com/go-toolsmith/astequal v1.0.2 h1:+XvaV8zNxua+9+Oa4AHmgmpo4RYAbwr/qjNppLfX2yM= -github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astcopy v1.0.2 h1:YnWf5Rnh1hUudj11kei53kI57quN/VH6Hp1n+erozn0= +github.com/go-toolsmith/astcopy v1.0.2/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= +github.com/go-toolsmith/astequal v1.0.3 h1:+LVdyRatFS+XO78SGV4I3TCEA0AC7fKEGma+fH+674o= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= -github.com/goccy/go-json v0.9.10 h1:hCeNmprSNLB8B8vQKWl6DpuH0t60oEs+TAk9a7CScKc= -github.com/goccy/go-json v0.9.10/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gocql/gocql v1.2.0 h1:TZhsCd7fRuye4VyHr3WCvWwIQaZUmjsqnSIXK9FcVCE= github.com/gocql/gocql v1.2.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= github.com/gocraft/dbr/v2 v2.7.3 h1:5/PTRiBkdD2FoHpnrCMoEUw5Wf/Cl3l3PjJ02Wm+pwM= github.com/gocraft/dbr/v2 v2.7.3/go.mod h1:8IH98S8M8J0JSEiYk0MPH26ZDUKemiQ/GvmXL5jo+Uw= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= 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.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw= github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= @@ -375,16 +305,13 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.12.4/go.mod h1:Av7CU6r6X3YmcHR9GXqVDaEJYfEtSxl6wvIjUQTriCw= +github.com/google/cel-go v0.12.5/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.11.0/go.mod h1:BBaYtsHPHA42uEgAvd/NejvAfPSlz281sJWqupjSxfk= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE= github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk= github.com/google/go-replayers/httpreplay v1.1.1 h1:H91sIMlt1NZzN7R+/ASswyouLJfW0WLW7fhyUFvDEkY= @@ -395,7 +322,7 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20220729232143-a41b82acbcb1/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= +github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -409,26 +336,24 @@ github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049 github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v0.25.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= -github.com/hashicorp/consul/api v1.13.1/go.mod h1:+1VcOos0TVdQFqXxphG4zmGcwQB4KVGkp1maPqnkDpE= -github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= +github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.3.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= @@ -442,28 +367,19 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.5/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.8/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hetznercloud/hcloud-go v1.35.2/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= +github.com/hashicorp/memberlist v0.4.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/serf v0.10.0/go.mod h1:bXN03oZc5xlH46k/K1qTrpXb9ERKyY1/i/N5mxvgrZw= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20220517205856-0058ec4f073c/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= @@ -472,8 +388,8 @@ github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5ey github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx/v4 v4.17.0/go.mod h1:Gd6RmOhtFLTu8cp/Fhq4kP195KrshxYJH3oW8AWJ1pw= -github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/pgx/v4 v4.17.1/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526/go.mod h1:UQkeMHVoNcyXYq9otUupF7/h/2tmHlhrS2zw7ZVvUqc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -492,27 +408,20 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.15.10-0.20220729101446-5a3a4a965cc6 h1:+ELgmq9xsmvPMOw1RHLGL34BslRaqaDsA0gnIxp9uZE= -github.com/klauspost/compress v1.15.10-0.20220729101446-5a3a4a965cc6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= -github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= +github.com/klauspost/compress v1.15.10-0.20220829133349-1481365fd7f6 h1:XvRQFsgUiUur2+46prtn50vffdMrgZL9rff9228HYhw= +github.com/klauspost/compress v1.15.10-0.20220829133349-1481365fd7f6/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0= +github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kpango/fastime v1.1.4 h1:pus9JgJBg/8Jie3ozayA4yNIV67BUPhbq0wMZY3CtYo= github.com/kpango/fastime v1.1.4/go.mod h1:tTNDbIo5qL6D7g5vh2YbkyUbOVP2kD/we3rSjN22PMY= github.com/kpango/fuid v0.0.0-20220209050620-e5987ba1ea5e h1:S07NQvXJsAHn9XyHDSD43YzUyWdKW6M9Qb/sx8JY2+U= github.com/kpango/fuid v0.0.0-20220209050620-e5987ba1ea5e/go.mod h1:nVt6Zyj+/b/kdTPOrrW9Rf0QyCl3i3nCnO3b3zkCkuI= github.com/kpango/gache v1.2.8 h1:+OjREOmuWO4qrJksDhzWJq80o9iwHiezdVmMR1jtCG0= github.com/kpango/gache v1.2.8/go.mod h1:UyBo0IoPFDSJypK2haDXeV6PwHEmBcXQA0BLuOYEvWg= -github.com/kpango/glg v1.6.12 h1:DyfcHrBAOpnYU85YJK4QUynQ2WA73r+9+lc7XxvGiws= -github.com/kpango/glg v1.6.12/go.mod h1:E8OndzZYI5jowBGwWsKvYLuwtjSKjRzSERjjYppyRjc= +github.com/kpango/glg v1.6.13 h1:QMhxOm/Oo1k8qraMtH4SQOYIgB/SI2RW2Hvrn1kgAZw= +github.com/kpango/glg v1.6.13/go.mod h1:fwP/c6NJTXe0vd9L3He6myDnO33lFVfgQGtGmlMnyws= github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0 h1:orIEVdc68woWO1ZyYWEVOl5Kl33eDjP+kbxgbdpMwi4= github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0/go.mod h1:CJt2OTBmIWH7X/gYDy8fg67d26E/a8MpbGvgrKWZQxQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -521,8 +430,6 @@ github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NB github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -530,31 +437,23 @@ github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/linode/linodego v1.9.0/go.mod h1:h6AuFR/JpqwwM/vkj7s8KV3iGN8/jxn+zc437F8SZ8w= -github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2/go.mod h1:SWzULI85WerrFt3u+nIm5F9l7EvxZTKQvd0InF3nmgM= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucor/goinfo v0.0.0-20200401173949-526b5363a13a/go.mod h1:ORP3/rB5IsulLEBwQZCJyyV6niqmI7P4EWSmkug+1Ng= github.com/lucor/goinfo v0.0.0-20210802170112-c078a2b0f08b/go.mod h1:PRq09yoB+Q2OJReAmwzKivcYyremnibWGbK7WfftHzc= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.7 h1:d2hBmNUJOAf2aGgzMQtz1wBByJQvRk72/1TXBiCVHXU= github.com/mattn/go-ieproxy v0.0.7/go.mod h1:6ZpRmhBaYuBX1U2za+9rC9iCGLsSp2tftelZne7CPko= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -562,14 +461,9 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/moby v20.10.17+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= -github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= -github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= @@ -578,49 +472,34 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/networkplumbing/go-nft v0.2.0/go.mod h1:HnnM+tYvlGAsMU7yoYwXEVLLiDW9gdMmb5HoGcwpuQs= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY= +github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -631,7 +510,6 @@ github.com/pierrec/cmdflag v0.0.2/go.mod h1:a3zKGZ3cdQUfxjd0RGMLZr8xI3nvpJOB+m6o github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4/v3 v3.3.5 h1:JzKda6jLXZpQK5/ulrEfT1I66tsKiGlw6sjKssFpwt8= github.com/pierrec/lz4/v3 v3.3.5/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbORyey8Q= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -643,60 +521,47 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= -github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/prometheus v0.35.0/go.mod h1:7HaLx5kEPKJ0GDgbODG0fZgXbQ8K/XjZNJXQmbmgQlY= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/quasilyte/go-ruleguard v0.3.16 h1:jvwWgz0rsVy91m8gy2vLFPMU0K63utoLYBVYDkOLATU= -github.com/quasilyte/go-ruleguard v0.3.16/go.mod h1:aykhjU4hUplU3VXDm9EBcovBvlEwolXMEYcmTgq3eG4= +github.com/quasilyte/go-ruleguard v0.3.18 h1:sd+abO1PEI9fkYennwzHn9kl3nqP6M5vE7FiOzZ+5CE= +github.com/quasilyte/go-ruleguard v0.3.18/go.mod h1:lOIzcYlgxrQ2sGJ735EHXmf/e9MJ516j16K/Ifcttvs= github.com/quasilyte/go-ruleguard/dsl v0.3.21 h1:vNkC6fC6qMLzCOGbnIHOd5ixUGgTbp3Z4fGnUgULlDA= github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9 h1:mEQjyqtrQ6eB7oW9Qm+5po33faQIbhWp3qfhxGYuHKc= -github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9/go.mod h1:MsVMK2P94jAne/7vEaLCRmjmOL0aTGAkvVOVuT+UYww= +github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f h1:6Gtn2i04RD0gVyYf2/IUMTIs+qYleBt4zxDqkLTcu4U= +github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.2.0/go.mod h1:WkKB1DnNtvsMlDmQ50sgwowDJV/hGbJSOvJoEXs1AJQ= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/schollz/progressbar/v2 v2.15.0/go.mod h1:UdPq3prGkfQ7MOzZKlDRpYKcFqEMczbD7YmbPgpzKMI= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/scylladb/gocqlx v1.5.0 h1:p7NEqRaCMAtW2nvq62iyUNXmIYP29373YOC7D2Xd7Qg= github.com/scylladb/gocqlx v1.5.0/go.mod h1:QarZcw5kpYh31MXfxiN2JWWvF1cgZbYqfTfXwmwhpEQ= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.10.0/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -715,7 +580,6 @@ github.com/srwiley/oksvg v0.0.0-20220128195007-1f435e4c2b44/go.mod h1:cNQ3dwVJtS github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU= github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU= github.com/srwiley/rasterx v0.0.0-20220128185129-2efea2b9ea41/go.mod h1:nXTWP6+gD5+LUJ8krVhhoeHjvHTutPxMYl5SvkcnJNE= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -725,41 +589,19 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= -github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vdaas/vald-client-go v1.5.6 h1:qRUUQddXYS5CHL4+WOEsfnYWHzoqYOp9GEr8Xqzmldg= github.com/vdaas/vald-client-go v1.5.6/go.mod h1:JT0mLVsJYMs/ZkUxHPviWYl9Uz6QCQtmymUHOLO5FXY= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.1 h1:vukIABvugfNMZMQO1ABsyQDJDTVQbn+LWSMy1ol1h6A= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= @@ -772,62 +614,61 @@ go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/ go.etcd.io/etcd/pkg/v3 v3.5.4/go.mod h1:OI+TtO+Aa3nhQSppMbwE4ld3uF1/fqqwbpfndbbrEe0= go.etcd.io/etcd/raft/v3 v3.5.4/go.mod h1:SCuunjYvZFC0fBX0vxMSPjuZmpcSk+XaAcMrD6Do03w= go.etcd.io/etcd/server/v3 v3.5.4/go.mod h1:S5/YTU15KxymM5l3T6b09sNOHPXqGYIZStpuuGbb65c= -go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8= -go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0/go.mod h1:548ZsYzmT4PL4zWKRd8q/N4z0Wxzn/ZxUE+lkEpwWQA= +go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= +go.opentelemetry.io/otel/exporters/jaeger v1.9.0 h1:gAEgEVGDWwFjcis9jJTOJqZNxDzoZfR12WNIxr7g9Ww= +go.opentelemetry.io/otel/exporters/jaeger v1.9.0/go.mod h1:hquezOLVAybNW6vanIxkdLXTXvzlj2Vn3wevSP15RYs= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= +go.opentelemetry.io/otel/sdk v1.9.0 h1:LNXp1vrr83fNXTHgU8eO89mhzxb/bbWAsHG6fNf3qWo= go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= go.opentelemetry.io/otel/sdk/export/metric v0.28.0/go.mod h1:2HTuv+l3ia7NquArnWavCoKhXi9yBJPpKqMHr1trKa0= go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk= +go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= -go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.starlark.net v0.0.0-20220714194419-4cadf0a12139 h1:zMemyQYZSyEdPaUFixYICrXf/0Rfnil7+jiQRf5IBZ0= -go.starlark.net v0.0.0-20220714194419-4cadf0a12139/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.starlark.net v0.0.0-20220817180228-f738f5508c12 h1:xOBJXWGEDwU5xSDxH6macxO11Us0AH2fTa9rmsbbF7g= +go.starlark.net v0.0.0-20220817180228-f738f5508c12/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= +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/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go4.org/intern v0.0.0-20220617035311-6925f38cc365 h1:t9hFvR102YlOqU0fQn1wgwhNvSbHGBbbJxX9JKfU3l0= go4.org/intern v0.0.0-20220617035311-6925f38cc365/go.mod h1:WXRv3p7T6gzt0CcJm43AAKdKVZmcQbwwC7EwquU5BZU= go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 h1:FyBZqvoA/jbNzuAWLQE2kG820zMAkcilx6BMjGbL/E4= go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= gocloud.dev v0.26.0 h1:4rM/SVL0lLs+rhC0Gmc+gt/82DBpb7nbpIZKXXnfMXg= gocloud.dev v0.26.0/go.mod h1:mkUgejbnbLotorqDyvedJO20XcZNTynmSeVSQS9btVg= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/exp/typeparams v0.0.0-20220722155223-a9213eeb770e h1:7Xs2YCOpMlNqSQSmrrnhlzBXIE/bpMecZplbLePTJvE= -golang.org/x/exp/typeparams v0.0.0-20220722155223-a9213eeb770e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk= +golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 h1:/eM0PCrQI2xd471rI+snWuu251/+/jpBpZqir2mPdnU= golang.org/x/image v0.0.0-20220722155232-062f8c9fd539/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4= -golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c h1:q3gFqPqH7NVofKo3c3yETAP//pPI+G5mvB7qqj1Y5kY= -golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME= -golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= @@ -846,30 +687,26 @@ gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENE gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= gonum.org/v1/plot v0.11.0 h1:z2ZkgNqW34d0oYUzd80RRlc0L9kWtenqK4kflZG1lGc= gonum.org/v1/plot v0.11.0/go.mod h1:fH9YnKnDKax0u5EzHVXvhN5HJwtMFWIOLNuhgUahbCQ= -google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= -google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.94.0 h1:KtKM9ru3nzQioV1HLlUf1cR7vMYJIpgls5VhAYQXIwA= +google.golang.org/api v0.94.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno= -google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf h1:Q5xNKbTSFwkuaaGaR7CMcXEM5sy19KYdUU8iF8/iRC0= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/telebot.v3 v3.0.0/go.mod h1:7rExV8/0mDDNu9epSrDm/8j22KLaActH1Tbee6YjzWg= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -879,8 +716,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= -inet.af/netaddr v0.0.0-20220617031823-097006376321 h1:B4dC8ySKTQXasnjDTMsoCMf1sQG4WsMej0WXaHxunmU= -inet.af/netaddr v0.0.0-20220617031823-097006376321/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= +inet.af/netaddr v0.0.0-20220811202034-502d2d690317 h1:U2fwK6P2EqmopP/hFLTOAjWTki0qgd4GMJn5X8wOleU= +inet.af/netaddr v0.0.0-20220811202034-502d2d690317/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= @@ -895,17 +732,15 @@ k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU= k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= -k8s.io/cri-api v0.24.2/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig= k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.80.0 h1:lyJt0TWMPaGoODa8B8bUuxgHS3W/m/bNr2cca3brA/g= +k8s.io/klog/v2 v2.80.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea h1:3QOH5+2fGsY8e1qf+GIFpg+zw/JGNrgyZRQR7/m6uWg= k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= k8s.io/metrics v0.24.2 h1:3lgEq973VGPWAEaT9VI/p0XmI0R5kJgb/r9Ufr5fz8k= k8s.io/metrics v0.24.2/go.mod h1:5NWURxZ6Lz5gj8TFU83+vdWIVASx7W8lwPpHYCqopMo= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= +k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/hack/benchmark/assets/x1b/loader.go b/hack/benchmark/assets/x1b/loader.go index e5f242533d..37403a9abd 100644 --- a/hack/benchmark/assets/x1b/loader.go +++ b/hack/benchmark/assets/x1b/loader.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package x1b import ( diff --git a/hack/benchmark/assets/x1b/loader_bench_test.go b/hack/benchmark/assets/x1b/loader_bench_test.go index b88598b462..910577bf8a 100644 --- a/hack/benchmark/assets/x1b/loader_bench_test.go +++ b/hack/benchmark/assets/x1b/loader_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package x1b import ( diff --git a/hack/benchmark/assets/x1b/loader_test.go b/hack/benchmark/assets/x1b/loader_test.go index eb74e5fe81..13ab633d07 100644 --- a/hack/benchmark/assets/x1b/loader_test.go +++ b/hack/benchmark/assets/x1b/loader_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package x1b import ( diff --git a/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go b/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go index 33bef1a67f..592b27009d 100644 --- a/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go +++ b/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package ngt import ( diff --git a/hack/benchmark/internal/assets/dataset.go b/hack/benchmark/internal/assets/dataset.go index 0d875494bc..6481fe46ac 100644 --- a/hack/benchmark/internal/assets/dataset.go +++ b/hack/benchmark/internal/assets/dataset.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/hack/benchmark/internal/assets/dataset_test.go b/hack/benchmark/internal/assets/dataset_test.go index 099ace605b..03e861c229 100644 --- a/hack/benchmark/internal/assets/dataset_test.go +++ b/hack/benchmark/internal/assets/dataset_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/hack/benchmark/internal/operation/insert.go b/hack/benchmark/internal/operation/insert.go index 0ed0d170d9..145b582a90 100644 --- a/hack/benchmark/internal/operation/insert.go +++ b/hack/benchmark/internal/operation/insert.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/insert_test.go b/hack/benchmark/internal/operation/insert_test.go index a205690468..bb483973ba 100644 --- a/hack/benchmark/internal/operation/insert_test.go +++ b/hack/benchmark/internal/operation/insert_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/operation.go b/hack/benchmark/internal/operation/operation.go index 5085fe14e9..a3f14d52bd 100644 --- a/hack/benchmark/internal/operation/operation.go +++ b/hack/benchmark/internal/operation/operation.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/operation_test.go b/hack/benchmark/internal/operation/operation_test.go index 1e3b2d06df..c2f777b6da 100644 --- a/hack/benchmark/internal/operation/operation_test.go +++ b/hack/benchmark/internal/operation/operation_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/option.go b/hack/benchmark/internal/operation/option.go index 6018065a4f..aaec7a0d3d 100644 --- a/hack/benchmark/internal/operation/option.go +++ b/hack/benchmark/internal/operation/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import "github.com/vdaas/vald/internal/client/v1/client" diff --git a/hack/benchmark/internal/operation/option_test.go b/hack/benchmark/internal/operation/option_test.go index 954fedf0cf..d2670ba1a6 100644 --- a/hack/benchmark/internal/operation/option_test.go +++ b/hack/benchmark/internal/operation/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/remove.go b/hack/benchmark/internal/operation/remove.go index f9755b9c48..da4b58b24b 100644 --- a/hack/benchmark/internal/operation/remove.go +++ b/hack/benchmark/internal/operation/remove.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/remove_test.go b/hack/benchmark/internal/operation/remove_test.go index 2cd0c6f6e7..15bc609027 100644 --- a/hack/benchmark/internal/operation/remove_test.go +++ b/hack/benchmark/internal/operation/remove_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/search.go b/hack/benchmark/internal/operation/search.go index 716052cf50..fa75c6ee59 100644 --- a/hack/benchmark/internal/operation/search.go +++ b/hack/benchmark/internal/operation/search.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/search_test.go b/hack/benchmark/internal/operation/search_test.go index 0f9126ba8f..b4ab357caf 100644 --- a/hack/benchmark/internal/operation/search_test.go +++ b/hack/benchmark/internal/operation/search_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/util.go b/hack/benchmark/internal/operation/util.go index c62b9f7eaa..57f82aac41 100644 --- a/hack/benchmark/internal/operation/util.go +++ b/hack/benchmark/internal/operation/util.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/internal/operation/util_test.go b/hack/benchmark/internal/operation/util_test.go index a722b4987c..459ab19097 100644 --- a/hack/benchmark/internal/operation/util_test.go +++ b/hack/benchmark/internal/operation/util_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/hack/benchmark/metrics/metrics.go b/hack/benchmark/metrics/metrics.go index 6de5d86415..f1e3356681 100644 --- a/hack/benchmark/metrics/metrics.go +++ b/hack/benchmark/metrics/metrics.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package metrics type SearchMetrics struct { diff --git a/hack/benchmark/src/singleflight/singleflight_bench_test.go b/hack/benchmark/src/singleflight/singleflight_bench_test.go index 146bdac7a1..9eff4d1f18 100644 --- a/hack/benchmark/src/singleflight/singleflight_bench_test.go +++ b/hack/benchmark/src/singleflight/singleflight_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package singleflight import ( diff --git a/hack/go.mod.default b/hack/go.mod.default index 33290b5887..81cfbc4c69 100755 --- a/hack/go.mod.default +++ b/hack/go.mod.default @@ -18,9 +18,7 @@ replace ( cloud.google.com/go/trace => cloud.google.com/go/trace latest code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt latest contrib.go.opencensus.io/exporter/aws => contrib.go.opencensus.io/exporter/aws latest - contrib.go.opencensus.io/exporter/jaeger => contrib.go.opencensus.io/exporter/jaeger latest contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus latest - contrib.go.opencensus.io/exporter/stackdriver => contrib.go.opencensus.io/exporter/stackdriver latest contrib.go.opencensus.io/integrations/ocsql => contrib.go.opencensus.io/integrations/ocsql latest git.sr.ht/~sbinet/gg => git.sr.ht/~sbinet/gg latest github.com/AdaLogics/go-fuzz-headers => github.com/AdaLogics/go-fuzz-headers latest @@ -477,6 +475,7 @@ replace ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc latest go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp latest go.opentelemetry.io/otel => go.opentelemetry.io/otel latest + go.opentelemetry.io/otel/exporters/jaeger => go.opentelemetry.io/otel/exporters/jaeger latest go.opentelemetry.io/otel/exporters/otlp => go.opentelemetry.io/otel/exporters/otlp latest go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry latest go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace latest diff --git a/hack/gorules/rules.go b/hack/gorules/rules.go index f2e742fc29..90de160e33 100644 --- a/hack/gorules/rules.go +++ b/hack/gorules/rules.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gorules import ( diff --git a/hack/gorules/rules_test.go b/hack/gorules/rules_test.go index eea18f549f..bcdf400519 100644 --- a/hack/gorules/rules_test.go +++ b/hack/gorules/rules_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gorules import ( diff --git a/hack/gorules/testdata/tests.go b/hack/gorules/testdata/tests.go index 3d058e3c1d..c562870ad5 100644 --- a/hack/gorules/testdata/tests.go +++ b/hack/gorules/testdata/tests.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package target import ( diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index 1762126775..1ed4f27e5f 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -114,6 +114,7 @@ func dirwalk(dir string) []string { ".html", ".json", ".key", + ".kvsdb", ".lock", ".md", ".md5", @@ -194,7 +195,7 @@ func readAndRewrite(path string) error { once := sync.Once{} for sc.Scan() { line := sc.Text() - if filepath.Ext(path) == ".go" && strings.HasPrefix(line, "// +build") || + if filepath.Ext(path) == ".go" && strings.HasPrefix(line, "//go:") || filepath.Ext(path) == ".py" && strings.HasPrefix(line, "# -*-") { bf = true _, err = buf.WriteString(line) diff --git a/hack/tools/metrics/main.go b/hack/tools/metrics/main.go index 19dae34d3d..aed8ab1e95 100644 --- a/hack/tools/metrics/main.go +++ b/hack/tools/metrics/main.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/hack/tools/metrics/main_test.go b/hack/tools/metrics/main_test.go index c966c22592..2ed51e9434 100644 --- a/hack/tools/metrics/main_test.go +++ b/hack/tools/metrics/main_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package main import ( diff --git a/internal/backoff/backoff.go b/internal/backoff/backoff.go index 3177aff73e..52eef3f936 100644 --- a/internal/backoff/backoff.go +++ b/internal/backoff/backoff.go @@ -31,7 +31,8 @@ import ( ) // NOTE: This variable is for observability package. -// This will be fixed when refactoring the observability package. +// +// This will be fixed when refactoring the observability package. var ( mu sync.RWMutex metrics map[string]int64 = make(map[string]int64) diff --git a/internal/backoff/context.go b/internal/backoff/context.go index 8d41c35bf8..4928c40737 100644 --- a/internal/backoff/context.go +++ b/internal/backoff/context.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package backoff import "context" diff --git a/internal/backoff/context_test.go b/internal/backoff/context_test.go index 38ab622b2b..705709490e 100644 --- a/internal/backoff/context_test.go +++ b/internal/backoff/context_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package backoff import ( diff --git a/internal/backoff/option_test.go b/internal/backoff/option_test.go index 4e7f2e890a..cac866a363 100644 --- a/internal/backoff/option_test.go +++ b/internal/backoff/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package backoff import ( diff --git a/internal/circuitbreaker/breaker.go b/internal/circuitbreaker/breaker.go index 86539d8eb7..a0d6ca8030 100644 --- a/internal/circuitbreaker/breaker.go +++ b/internal/circuitbreaker/breaker.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/breaker_test.go b/internal/circuitbreaker/breaker_test.go index 831f63b9f5..7a6f8c5bb7 100644 --- a/internal/circuitbreaker/breaker_test.go +++ b/internal/circuitbreaker/breaker_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/counter.go b/internal/circuitbreaker/counter.go index a1649c98bc..5ebea3ae3e 100644 --- a/internal/circuitbreaker/counter.go +++ b/internal/circuitbreaker/counter.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import "sync/atomic" diff --git a/internal/circuitbreaker/counter_test.go b/internal/circuitbreaker/counter_test.go index a63c2b1d34..025bc909b4 100644 --- a/internal/circuitbreaker/counter_test.go +++ b/internal/circuitbreaker/counter_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/manager.go b/internal/circuitbreaker/manager.go index 4e3a336195..f7038a21a4 100644 --- a/internal/circuitbreaker/manager.go +++ b/internal/circuitbreaker/manager.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( @@ -25,7 +23,8 @@ import ( ) // NOTE: This variable is for observability package. -// This will be fixed when refactoring the observability package. +// +// This will be fixed when refactoring the observability package. var ( mu sync.RWMutex metrics = make(map[string]map[State]int64) // map[breaker_name]map[state]count diff --git a/internal/circuitbreaker/manager_test.go b/internal/circuitbreaker/manager_test.go index 12aaef915b..69fd3596e5 100644 --- a/internal/circuitbreaker/manager_test.go +++ b/internal/circuitbreaker/manager_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/options.go b/internal/circuitbreaker/options.go index cc12870d77..bc0820f724 100644 --- a/internal/circuitbreaker/options.go +++ b/internal/circuitbreaker/options.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/options_test.go b/internal/circuitbreaker/options_test.go index 94cb8a3754..3b0c10310f 100644 --- a/internal/circuitbreaker/options_test.go +++ b/internal/circuitbreaker/options_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( @@ -964,3 +962,121 @@ func TestWithClosedRefreshTimeout(t *testing.T) { }) } } + +func TestWithHalfOpenErrorTripper(t *testing.T) { + // Change interface type to the type of object you are testing + type T = interface{} + type args struct { + tp Tripper + } + type want struct { + obj *T + // Uncomment this line if the option returns an error, otherwise delete it + // err error + } + type test struct { + name string + args args + want want + // Use the first line if the option returns an error. otherwise use the second line + // checkFunc func(want, *T, error) error + // checkFunc func(want, *T) error + beforeFunc func(args) + afterFunc func(args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T, err error) error { + if !errors.Is(err, w.err) { + return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) + } + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + // Uncomment this block if the option do not returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T) error { + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + tests := []test{ + // TODO test cases + /* + { + name: "test_case_1", + args: args { + tp: nil, + }, + want: want { + obj: new(T), + }, + }, + */ + + // TODO test cases + /* + func() test { + return test { + name: "test_case_2", + args: args { + tp: nil, + }, + want: want { + obj: new(T), + }, + } + }(), + */ + } + + for _, tc := range tests { + test := tc + t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) + if test.beforeFunc != nil { + test.beforeFunc(test.args) + } + if test.afterFunc != nil { + defer test.afterFunc(test.args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + + got := WithHalfOpenErrorTripper(test.args.tp) + obj := new(T) + if err := checkFunc(test.want, obj, got(obj)); err != nil { + tt.Errorf("error = %v", err) + } + */ + + // Uncomment this block if the option do not return an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + got := WithHalfOpenErrorTripper(test.args.tp) + obj := new(T) + got(obj) + if err := checkFunc(test.want, obj); err != nil { + tt.Errorf("error = %v", err) + } + */ + }) + } +} diff --git a/internal/circuitbreaker/state.go b/internal/circuitbreaker/state.go index 57d336028a..850815bdd3 100644 --- a/internal/circuitbreaker/state.go +++ b/internal/circuitbreaker/state.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker type State uint32 diff --git a/internal/circuitbreaker/state_test.go b/internal/circuitbreaker/state_test.go index 1be652ca33..4b11e29a76 100644 --- a/internal/circuitbreaker/state_test.go +++ b/internal/circuitbreaker/state_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/circuitbreaker/tripper.go b/internal/circuitbreaker/tripper.go index 6f34ce121b..8352f686ba 100644 --- a/internal/circuitbreaker/tripper.go +++ b/internal/circuitbreaker/tripper.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker // Tripper is a function type to determine if the CircuitBreaker should trip. diff --git a/internal/circuitbreaker/tripper_test.go b/internal/circuitbreaker/tripper_test.go index 6572027fe0..3ef03b2587 100644 --- a/internal/circuitbreaker/tripper_test.go +++ b/internal/circuitbreaker/tripper_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/compress/gob/gob.go b/internal/compress/gob/gob.go index fd3610fe3a..f1311d9c8e 100644 --- a/internal/compress/gob/gob.go +++ b/internal/compress/gob/gob.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gob import ( diff --git a/internal/compress/gob/gob_mock.go b/internal/compress/gob/gob_mock.go index 4043cb305c..2de56576a6 100644 --- a/internal/compress/gob/gob_mock.go +++ b/internal/compress/gob/gob_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gob import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/gzip/gzip.go b/internal/compress/gzip/gzip.go index 960d9371df..39c3b29362 100644 --- a/internal/compress/gzip/gzip.go +++ b/internal/compress/gzip/gzip.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gzip import ( diff --git a/internal/compress/gzip/gzip_mock.go b/internal/compress/gzip/gzip_mock.go index 4308d7048b..c467bcbe32 100644 --- a/internal/compress/gzip/gzip_mock.go +++ b/internal/compress/gzip/gzip_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package gzip import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/lz4/lz4.go b/internal/compress/lz4/lz4.go index 906dc3bebe..e0fc71059f 100644 --- a/internal/compress/lz4/lz4.go +++ b/internal/compress/lz4/lz4.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package lz4 import ( diff --git a/internal/compress/lz4/lz4_mock.go b/internal/compress/lz4/lz4_mock.go index 6ce4690dea..25bda942fe 100644 --- a/internal/compress/lz4/lz4_mock.go +++ b/internal/compress/lz4/lz4_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package lz4 import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/mock.go b/internal/compress/mock.go index b28a3ff98a..7bc486e22b 100644 --- a/internal/compress/mock.go +++ b/internal/compress/mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package compress import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/mock_test.go b/internal/compress/mock_test.go index 2267fdb053..607870a7b8 100644 --- a/internal/compress/mock_test.go +++ b/internal/compress/mock_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package compress import ( diff --git a/internal/compress/zstd/option.go b/internal/compress/zstd/option.go index fb5efb98f9..847a284ea4 100644 --- a/internal/compress/zstd/option.go +++ b/internal/compress/zstd/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zstd import "github.com/klauspost/compress/zstd" diff --git a/internal/compress/zstd/zstd.go b/internal/compress/zstd/zstd.go index c0d642e79d..f5dc8008b9 100644 --- a/internal/compress/zstd/zstd.go +++ b/internal/compress/zstd/zstd.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zstd import ( diff --git a/internal/compress/zstd/zstd_mock.go b/internal/compress/zstd/zstd_mock.go index 7a8a11bbd8..a8d88026ca 100644 --- a/internal/compress/zstd/zstd_mock.go +++ b/internal/compress/zstd/zstd_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zstd import ( diff --git a/internal/config/circuitbreaker.go b/internal/config/circuitbreaker.go index 7031566e43..d54da042d6 100644 --- a/internal/config/circuitbreaker.go +++ b/internal/config/circuitbreaker.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package config // CircuitBreaker represents the configuration for the internal circuitbreaker package. diff --git a/internal/config/circuitbreaker_test.go b/internal/config/circuitbreaker_test.go index be0d097b49..1a224bb01f 100644 --- a/internal/config/circuitbreaker_test.go +++ b/internal/config/circuitbreaker_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package config import ( diff --git a/internal/config/observability.go b/internal/config/observability.go index f69a270301..ced6f96e3f 100644 --- a/internal/config/observability.go +++ b/internal/config/observability.go @@ -19,11 +19,11 @@ package config // Observability represents the configuration for the observability. type Observability struct { - Enabled bool `json:"enabled" yaml:"enabled"` - Collector *Collector `json:"collector" yaml:"collector"` - Trace *Trace `json:"trace" yaml:"trace"` - Prometheus *Prometheus `json:"prometheus" yaml:"prometheus"` - Jaeger *Jaeger `json:"jaeger" yaml:"jaeger"` + Enabled bool `json:"enabled" yaml:"enabled"` + Collector *Collector `json:"collector" yaml:"collector"` + Trace *Trace `json:"trace" yaml:"trace"` + Prometheus *Prometheus `json:"prometheus" yaml:"prometheus"` + Jaeger *Jaeger `json:"jaeger" yaml:"jaeger"` } // Collector represents the configuration for the collector. diff --git a/internal/conv/conv.go b/internal/conv/conv.go index 26ce135a7a..70583f84bd 100644 --- a/internal/conv/conv.go +++ b/internal/conv/conv.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package conv import ( diff --git a/internal/conv/conv_bench_test.go b/internal/conv/conv_bench_test.go index a310e1d88c..a94ab8399a 100644 --- a/internal/conv/conv_bench_test.go +++ b/internal/conv/conv_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package conv import ( diff --git a/internal/conv/conv_test.go b/internal/conv/conv_test.go index 2dd3a7476d..68e05006ea 100644 --- a/internal/conv/conv_test.go +++ b/internal/conv/conv_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package conv import ( diff --git a/internal/core/algorithm/ngt/ngt.go b/internal/core/algorithm/ngt/ngt.go index ba5fe7c30c..7b83895882 100644 --- a/internal/core/algorithm/ngt/ngt.go +++ b/internal/core/algorithm/ngt/ngt.go @@ -386,7 +386,6 @@ func (n *ngt) Search(vec []float32, size int, epsilon, radius float32) (result [ ebuf := n.GetErrorBuffer() results := C.ngt_create_empty_results(ebuf) - // defer C.free(unsafe.Pointer(results)) defer C.ngt_destroy_results(results) if results == nil { return nil, n.newGoError(ebuf) @@ -405,12 +404,9 @@ func (n *ngt) Search(vec []float32, size int, epsilon, radius float32) (result [ n.index, (*C.float)(&vec[0]), n.dimension, - // C.size_t(size), *(*C.size_t)(unsafe.Pointer(&size)), - // C.float(epsilon), *(*C.float)(unsafe.Pointer(&epsilon)), *(*C.float)(unsafe.Pointer(&radius)), - // C.float(radius), results, ebuf) diff --git a/internal/db/kvs/redis/redis_mock.go b/internal/db/kvs/redis/redis_mock.go index 52753ee00c..d3eda3d2a6 100644 --- a/internal/db/kvs/redis/redis_mock.go +++ b/internal/db/kvs/redis/redis_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package redis import ( diff --git a/internal/db/nosql/cassandra/cassandra_mock.go b/internal/db/nosql/cassandra/cassandra_mock.go index 39e3821162..2d8b74358a 100644 --- a/internal/db/nosql/cassandra/cassandra_mock.go +++ b/internal/db/nosql/cassandra/cassandra_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package cassandra import ( diff --git a/internal/db/storage/blob/cloudstorage/cloudstorage.go b/internal/db/storage/blob/cloudstorage/cloudstorage.go index d5b7bccb33..a850dabbcc 100644 --- a/internal/db/storage/blob/cloudstorage/cloudstorage.go +++ b/internal/db/storage/blob/cloudstorage/cloudstorage.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/cloudstorage_test.go b/internal/db/storage/blob/cloudstorage/cloudstorage_test.go index db088f9e1a..0953d046ef 100644 --- a/internal/db/storage/blob/cloudstorage/cloudstorage_test.go +++ b/internal/db/storage/blob/cloudstorage/cloudstorage_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/option.go b/internal/db/storage/blob/cloudstorage/option.go index d027431d5e..226d622f07 100644 --- a/internal/db/storage/blob/cloudstorage/option.go +++ b/internal/db/storage/blob/cloudstorage/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/option_test.go b/internal/db/storage/blob/cloudstorage/option_test.go index b8463815cd..5e51041002 100644 --- a/internal/db/storage/blob/cloudstorage/option_test.go +++ b/internal/db/storage/blob/cloudstorage/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/urlopener/option.go b/internal/db/storage/blob/cloudstorage/urlopener/option.go index 4fa4688a6a..3afeecdcc4 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/option.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package urlopener import ( diff --git a/internal/db/storage/blob/cloudstorage/urlopener/option_test.go b/internal/db/storage/blob/cloudstorage/urlopener/option_test.go index f3f799e016..3e6e685936 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/option_test.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package urlopener import ( diff --git a/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go b/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go index 0f2469b29f..3dcb8b8524 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package urlopener import ( diff --git a/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go b/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go index e4ebc84441..56023fd26c 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package urlopener import ( diff --git a/internal/db/storage/blob/s3/reader/io/io.go b/internal/db/storage/blob/s3/reader/io/io.go index 2fcc630311..7a8b4fb809 100644 --- a/internal/db/storage/blob/s3/reader/io/io.go +++ b/internal/db/storage/blob/s3/reader/io/io.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package io import ( diff --git a/internal/db/storage/blob/s3/reader/io/io_test.go b/internal/db/storage/blob/s3/reader/io/io_test.go index f1c4585871..82f59925f0 100644 --- a/internal/db/storage/blob/s3/reader/io/io_test.go +++ b/internal/db/storage/blob/s3/reader/io/io_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package io import ( diff --git a/internal/db/storage/blob/s3/sdk/s3/s3.go b/internal/db/storage/blob/s3/sdk/s3/s3.go index ec5c3a1268..b8852e66a0 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package s3 import ( diff --git a/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go b/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go index 61aa1cf504..7a2f0574d0 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package s3iface import "github.com/aws/aws-sdk-go/service/s3/s3iface" diff --git a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go index dee1ebecef..ae110f42fa 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package s3manager import ( diff --git a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go index 0a9bc6c18b..6da3e3a38f 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package s3manager import ( diff --git a/internal/db/storage/blob/s3/writer/writer_mock.go b/internal/db/storage/blob/s3/writer/writer_mock.go index a45a4e47e1..3e3d0a7a07 100644 --- a/internal/db/storage/blob/s3/writer/writer_mock.go +++ b/internal/db/storage/blob/s3/writer/writer_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package writer import ( diff --git a/internal/encoding/json/json_test.go b/internal/encoding/json/json_test.go index c1be918f23..155c2015cc 100644 --- a/internal/encoding/json/json_test.go +++ b/internal/encoding/json/json_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package json import ( diff --git a/internal/errors/circuitbreaker.go b/internal/errors/circuitbreaker.go index 727e2239df..ac0ca1e5f3 100644 --- a/internal/errors/circuitbreaker.go +++ b/internal/errors/circuitbreaker.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/circuitbreaker_test.go b/internal/errors/circuitbreaker_test.go index f1fbaa93db..01d4dac833 100644 --- a/internal/errors/circuitbreaker_test.go +++ b/internal/errors/circuitbreaker_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/compressor_test.go b/internal/errors/compressor_test.go index 4f43ef9b46..5f4a07203c 100644 --- a/internal/errors/compressor_test.go +++ b/internal/errors/compressor_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/discoverer_test.go b/internal/errors/discoverer_test.go index 608b9d30a7..c4c384a89c 100644 --- a/internal/errors/discoverer_test.go +++ b/internal/errors/discoverer_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import "testing" diff --git a/internal/errors/errors_test.go b/internal/errors/errors_test.go index a90452c3ca..94c0e11db8 100644 --- a/internal/errors/errors_test.go +++ b/internal/errors/errors_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/file_test.go b/internal/errors/file_test.go index 9a07c08a86..000c75d9ed 100644 --- a/internal/errors/file_test.go +++ b/internal/errors/file_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/grpc_test.go b/internal/errors/grpc_test.go index 81fd0e380c..4d3b3a25c5 100644 --- a/internal/errors/grpc_test.go +++ b/internal/errors/grpc_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/http_test.go b/internal/errors/http_test.go index 4d8e309f65..23cfb6bd97 100644 --- a/internal/errors/http_test.go +++ b/internal/errors/http_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/info.go b/internal/errors/info.go index fe7eddf573..85b31aad68 100644 --- a/internal/errors/info.go +++ b/internal/errors/info.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors var ( diff --git a/internal/errors/io_test.go b/internal/errors/io_test.go index b5998341e1..f2eb41f702 100644 --- a/internal/errors/io_test.go +++ b/internal/errors/io_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import "testing" diff --git a/internal/errors/net_test.go b/internal/errors/net_test.go index 8ed852d293..d8a72021e3 100644 --- a/internal/errors/net_test.go +++ b/internal/errors/net_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/observability_test.go b/internal/errors/observability_test.go index e37aa3f15d..e47672f41a 100644 --- a/internal/errors/observability_test.go +++ b/internal/errors/observability_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/option.go b/internal/errors/option.go index f143c1ee54..d10f1b3a77 100644 --- a/internal/errors/option.go +++ b/internal/errors/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors // ErrInvalidOption represents the invalid option error. diff --git a/internal/errors/option_test.go b/internal/errors/option_test.go index b7aa15f848..7ec90c465f 100644 --- a/internal/errors/option_test.go +++ b/internal/errors/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/runner_test.go b/internal/errors/runner_test.go index 444b69fe31..4e7533d617 100644 --- a/internal/errors/runner_test.go +++ b/internal/errors/runner_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/unit_test.go b/internal/errors/unit_test.go index ccc2104d29..c6460fbb0b 100644 --- a/internal/errors/unit_test.go +++ b/internal/errors/unit_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/errors/vald_test.go b/internal/errors/vald_test.go index 4b707f7ce5..70dc04b5c2 100644 --- a/internal/errors/vald_test.go +++ b/internal/errors/vald_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package errors import ( diff --git a/internal/info/info_bench_test.go b/internal/info/info_bench_test.go index c3ac08ff61..cae2d99b81 100644 --- a/internal/info/info_bench_test.go +++ b/internal/info/info_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package info import ( diff --git a/internal/info/option.go b/internal/info/option.go index 85b4cb93e4..28d45618b8 100644 --- a/internal/info/option.go +++ b/internal/info/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package info import ( diff --git a/internal/info/option_test.go b/internal/info/option_test.go index c3a292cc87..50025ef12f 100644 --- a/internal/info/option_test.go +++ b/internal/info/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package info import ( diff --git a/internal/log/format/format_test.go b/internal/log/format/format_test.go index cd7ae528d9..9878e21603 100644 --- a/internal/log/format/format_test.go +++ b/internal/log/format/format_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package format import ( diff --git a/internal/log/glg/glg_test.go b/internal/log/glg/glg_test.go index 5bc5fb6cce..dd0a93e0cc 100644 --- a/internal/log/glg/glg_test.go +++ b/internal/log/glg/glg_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package glg import ( diff --git a/internal/log/glg/option_test.go b/internal/log/glg/option_test.go index 9537b02877..511585ca38 100644 --- a/internal/log/glg/option_test.go +++ b/internal/log/glg/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package glg import ( diff --git a/internal/log/level/level_test.go b/internal/log/level/level_test.go index 435e4f1e9f..294610d8ed 100644 --- a/internal/log/level/level_test.go +++ b/internal/log/level/level_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package level import ( diff --git a/internal/log/mock/logger.go b/internal/log/mock/logger.go index 4878359096..e97a045349 100644 --- a/internal/log/mock/logger.go +++ b/internal/log/mock/logger.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package mock // Logger represents struct of each log level function. diff --git a/internal/log/mock/logger_test.go b/internal/log/mock/logger_test.go index 95fc54293e..4660095f5c 100644 --- a/internal/log/mock/logger_test.go +++ b/internal/log/mock/logger_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package mock import ( diff --git a/internal/log/mock/retry.go b/internal/log/mock/retry.go index 25b5158a65..4983642f55 100644 --- a/internal/log/mock/retry.go +++ b/internal/log/mock/retry.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package mock // Retry represents struct of mock retry structure. diff --git a/internal/log/mock/retry_test.go b/internal/log/mock/retry_test.go index ba3026f20c..74c1f4f19b 100644 --- a/internal/log/mock/retry_test.go +++ b/internal/log/mock/retry_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package mock import ( diff --git a/internal/log/nop/nop.go b/internal/log/nop/nop.go index 4e6d62c85e..1721c07c57 100644 --- a/internal/log/nop/nop.go +++ b/internal/log/nop/nop.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package nop import ( diff --git a/internal/log/nop/nop_test.go b/internal/log/nop/nop_test.go index f8a3e58875..78be199d6c 100644 --- a/internal/log/nop/nop_test.go +++ b/internal/log/nop/nop_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package nop import ( diff --git a/internal/log/option.go b/internal/log/option.go index de7566e627..92b5e76f5d 100644 --- a/internal/log/option.go +++ b/internal/log/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package log import ( diff --git a/internal/log/option_test.go b/internal/log/option_test.go index 6d6c0ae2dd..29920ce7ff 100644 --- a/internal/log/option_test.go +++ b/internal/log/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package log import ( diff --git a/internal/log/retry/option.go b/internal/log/retry/option.go index 7d59b9fc92..9716e01527 100644 --- a/internal/log/retry/option.go +++ b/internal/log/retry/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package retry type Option func(r *retry) diff --git a/internal/log/retry/option_test.go b/internal/log/retry/option_test.go index 70fda8b558..222117b75e 100644 --- a/internal/log/retry/option_test.go +++ b/internal/log/retry/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package retry import ( diff --git a/internal/log/retry/retry.go b/internal/log/retry/retry.go index 7b942a6045..e0c9406005 100644 --- a/internal/log/retry/retry.go +++ b/internal/log/retry/retry.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package retry import ( diff --git a/internal/log/retry/retry_test.go b/internal/log/retry/retry_test.go index 995fb0632f..1c8ff5253c 100644 --- a/internal/log/retry/retry_test.go +++ b/internal/log/retry/retry_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package retry import ( diff --git a/internal/log/zap/option.go b/internal/log/zap/option.go index 8c747b9819..27995f6ef7 100644 --- a/internal/log/zap/option.go +++ b/internal/log/zap/option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zap import ( diff --git a/internal/log/zap/option_test.go b/internal/log/zap/option_test.go index 1c6714bf25..149644e816 100644 --- a/internal/log/zap/option_test.go +++ b/internal/log/zap/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zap import ( diff --git a/internal/log/zap/zap.go b/internal/log/zap/zap.go index e0719439a4..847d0cb951 100644 --- a/internal/log/zap/zap.go +++ b/internal/log/zap/zap.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zap import ( diff --git a/internal/log/zap/zap_test.go b/internal/log/zap/zap_test.go index cfb2cb35a7..c8a6f41d10 100644 --- a/internal/log/zap/zap_test.go +++ b/internal/log/zap/zap_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package zap import ( diff --git a/internal/net/control/control_darwin.go b/internal/net/control/control_darwin.go index 67ce3fbfcf..5dd68f655a 100644 --- a/internal/net/control/control_darwin.go +++ b/internal/net/control/control_darwin.go @@ -1,5 +1,4 @@ //go:build darwin && !linux && !windows && !wasm && !js -// +build darwin,!linux,!windows,!wasm,!js // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/internal/net/control/control_other.go b/internal/net/control/control_other.go index 05306d5c19..86fd52126f 100644 --- a/internal/net/control/control_other.go +++ b/internal/net/control/control_other.go @@ -1,5 +1,4 @@ //go:build wasm && js && !windows && !linux && !darwin -// +build wasm,js,!windows,!linux,!darwin // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/internal/net/control/control_unix.go b/internal/net/control/control_unix.go index 39ed43ba1a..2dcbbf7486 100644 --- a/internal/net/control/control_unix.go +++ b/internal/net/control/control_unix.go @@ -1,5 +1,4 @@ //go:build linux && !windows && !wasm && !js && !darwin -// +build linux,!windows,!wasm,!js,!darwin // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/internal/net/control/control_windows.go b/internal/net/control/control_windows.go index cd20c216f3..f2d1d76425 100644 --- a/internal/net/control/control_windows.go +++ b/internal/net/control/control_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/internal/net/grpc/context.go b/internal/net/grpc/context.go index 6696519b11..96aeeb7d62 100644 --- a/internal/net/grpc/context.go +++ b/internal/net/grpc/context.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import "context" diff --git a/internal/net/grpc/context_test.go b/internal/net/grpc/context_test.go index af37a50bf1..ad95946274 100644 --- a/internal/net/grpc/context_test.go +++ b/internal/net/grpc/context_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/internal/net/grpc/interceptor/server/logging/accesslog.go b/internal/net/grpc/interceptor/server/logging/accesslog.go index f85c793344..c4b5a8ec6b 100644 --- a/internal/net/grpc/interceptor/server/logging/accesslog.go +++ b/internal/net/grpc/interceptor/server/logging/accesslog.go @@ -60,7 +60,7 @@ func AccessLogInterceptor() grpc.UnaryServerInterceptor { span := trace.FromContext(ctx) if span != nil { - traceID = span.SpanContext().TraceID.String() + traceID = span.SpanContext().TraceID().String() } start := time.Now() @@ -108,7 +108,7 @@ func AccessLogStreamInterceptor() grpc.StreamServerInterceptor { span := trace.FromContext(ss.Context()) if span != nil { - traceID = span.SpanContext().TraceID.String() + traceID = span.SpanContext().TraceID().String() } start := time.Now() diff --git a/internal/net/grpc/interceptor/server/trace/payload.go b/internal/net/grpc/interceptor/server/trace/payload.go index b0d6493d96..fa47c3d9ea 100644 --- a/internal/net/grpc/interceptor/server/trace/payload.go +++ b/internal/net/grpc/interceptor/server/trace/payload.go @@ -60,14 +60,14 @@ func TracePayloadInterceptor() grpc.UnaryServerInterceptor { } service, method := parseMethod(info.FullMethod) - span.AddAttributes( + span.SetAttributes( trace.StringAttribute(traceAttrGRPCKind, grpcKindUnary), trace.StringAttribute(traceAttrGRPCService, service), trace.StringAttribute(traceAttrGRPCMethod, method), ) if reqj := marshalJSON(req); reqj != "" { - span.AddAttributes( + span.SetAttributes( trace.StringAttribute(traceAttrGRPCRequestPayload, reqj), ) } @@ -75,7 +75,7 @@ func TracePayloadInterceptor() grpc.UnaryServerInterceptor { resp, err = handler(ctx, req) if resj := marshalJSON(resp); resj != "" { - span.AddAttributes( + span.SetAttributes( trace.StringAttribute(traceAttrGRPCResponsePayload, resj), ) } @@ -97,7 +97,7 @@ func TracePayloadStreamInterceptor() grpc.StreamServerInterceptor { } service, method := parseMethod(info.FullMethod) - span.AddAttributes( + span.SetAttributes( trace.StringAttribute(traceAttrGRPCKind, grpcKindStream), trace.StringAttribute(traceAttrGRPCService, service), trace.StringAttribute(traceAttrGRPCMethod, method), @@ -109,7 +109,7 @@ func TracePayloadStreamInterceptor() grpc.StreamServerInterceptor { err := handler(srv, tss) - span.AddAttributes( + span.SetAttributes( trace.StringAttribute(traceAttrGRPCRequestPayload, tss.request), trace.StringAttribute(traceAttrGRPCResponsePayload, tss.response), ) diff --git a/internal/net/grpc/logger/logger.go b/internal/net/grpc/logger/logger.go index 501ab7d3d8..2730df0cfc 100644 --- a/internal/net/grpc/logger/logger.go +++ b/internal/net/grpc/logger/logger.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package logger import ( diff --git a/internal/net/grpc/logger/logger_test.go b/internal/net/grpc/logger/logger_test.go index f96178fa16..30d5c90e29 100644 --- a/internal/net/grpc/logger/logger_test.go +++ b/internal/net/grpc/logger/logger_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package logger import ( diff --git a/internal/net/grpc/proto/proto_test.go b/internal/net/grpc/proto/proto_test.go index 6c6afdd0d9..13f15722a2 100644 --- a/internal/net/grpc/proto/proto_test.go +++ b/internal/net/grpc/proto/proto_test.go @@ -23,6 +23,7 @@ import ( "github.com/vdaas/vald/apis/grpc/v1/payload" "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/test/comparator" "github.com/vdaas/vald/internal/test/goleak" ) @@ -213,7 +214,10 @@ func TestClone(t *testing.T) { afterFunc func(args) } defaultCheckFunc := func(w want, got Message) error { - if !reflect.DeepEqual(got, w.want) { + diff := comparator.Diff(got, w.want, comparator.IgnoreUnexported( + payload.Object_Vector{}, + )) + if diff != "" { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } return nil diff --git a/internal/net/grpc/status/status.go b/internal/net/grpc/status/status.go index 812c3d13e7..2c74f0fc9c 100644 --- a/internal/net/grpc/status/status.go +++ b/internal/net/grpc/status/status.go @@ -211,10 +211,10 @@ func withDetails(st *Status, err error, details ...interface{}) *Status { for _, d := range v.Proto().Details { msgs = append(msgs, proto.ToMessageV1(errdetails.AnyToErrorDetail(d))) } - case *info.Detail: - msgs = append(msgs, errdetails.DebugInfoFromInfoDetail(v)) case info.Detail: msgs = append(msgs, errdetails.DebugInfoFromInfoDetail(&v)) + case *info.Detail: + msgs = append(msgs, errdetails.DebugInfoFromInfoDetail(v)) case proto.Message: msgs = append(msgs, proto.ToMessageV1(v)) case *proto.Message: diff --git a/internal/net/grpc/stream.go b/internal/net/grpc/stream.go index 6ba82ef79f..551cd65a34 100644 --- a/internal/net/grpc/stream.go +++ b/internal/net/grpc/stream.go @@ -82,7 +82,9 @@ func BidirectionalStream(ctx context.Context, stream ServerStream, } st, msg, err := status.ParseError(errs, codes.Internal, "failed to parse BidirectionalStream final gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, msg) } return err } @@ -119,7 +121,9 @@ func BidirectionalStream(ctx context.Context, stream ServerStream, errMap.Store(err.Error(), err) st, msg, err := status.ParseError(err, codes.Internal, fmt.Sprintf("failed to parse BidirectionalStream id= %020d gRPC error response", id)) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, msg) } if err != nil { log.Error(err) @@ -137,7 +141,9 @@ func BidirectionalStream(ctx context.Context, stream ServerStream, ServingData: errdetails.Serialize(res), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, msg) } return err } diff --git a/internal/net/http/client/option.go b/internal/net/http/client/option.go index 30fe9f38c0..b6cce9f108 100644 --- a/internal/net/http/client/option.go +++ b/internal/net/http/client/option.go @@ -173,7 +173,7 @@ func WithExpectContinueTimeout(dur string) Option { } } -// WithProxyConnectHeader returns the option to set the proxy connect header. +// WithProxyConnectHeader returns the option to set the proxy connect header. func WithProxyConnectHeader(header http.Header) Option { return func(tr *transport) error { if header == nil { @@ -185,7 +185,7 @@ func WithProxyConnectHeader(header http.Header) Option { } } -// WithMaxResponseHeaderBytes returns the option to set the max response header bytes. +// WithMaxResponseHeaderBytes returns the option to set the max response header bytes. func WithMaxResponseHeaderBytes(bs int64) Option { return func(tr *transport) error { tr.MaxResponseHeaderBytes = bs @@ -193,7 +193,7 @@ func WithMaxResponseHeaderBytes(bs int64) Option { } } -// WithWriteBufferSize returns the option to set the write buffer size. +// WithWriteBufferSize returns the option to set the write buffer size. func WithWriteBufferSize(bs int64) Option { return func(tr *transport) error { tr.WriteBufferSize = int(bs) @@ -201,7 +201,7 @@ func WithWriteBufferSize(bs int64) Option { } } -// WithReadBufferSize returns the option to set the read buffer size. +// WithReadBufferSize returns the option to set the read buffer size. func WithReadBufferSize(bs int64) Option { return func(tr *transport) error { tr.ReadBufferSize = int(bs) @@ -209,7 +209,7 @@ func WithReadBufferSize(bs int64) Option { } } -// WithForceAttemptHTTP2 returns the option to force attempt HTTP2 for the HTTP transport. +// WithForceAttemptHTTP2 returns the option to force attempt HTTP2 for the HTTP transport. func WithForceAttemptHTTP2(force bool) Option { return func(tr *transport) error { tr.ForceAttemptHTTP2 = force @@ -217,7 +217,7 @@ func WithForceAttemptHTTP2(force bool) Option { } } -// WithBackoffOpts returns the option to set the options to initialize backoff. +// WithBackoffOpts returns the option to set the options to initialize backoff. func WithBackoffOpts(opts ...backoff.Option) Option { return func(tr *transport) error { if len(opts) == 0 { diff --git a/internal/net/http/dump/dump_test.go b/internal/net/http/dump/dump_test.go index 1164aea46a..5939761b81 100644 --- a/internal/net/http/dump/dump_test.go +++ b/internal/net/http/dump/dump_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package dump import ( diff --git a/internal/net/http/json/json_test.go b/internal/net/http/json/json_test.go index a7a7c576bd..393955c0cb 100644 --- a/internal/net/http/json/json_test.go +++ b/internal/net/http/json/json_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package json import ( diff --git a/internal/net/http/metrics/pprof_test.go b/internal/net/http/metrics/pprof_test.go index 8f19777ff2..73d4bed7cc 100644 --- a/internal/net/http/metrics/pprof_test.go +++ b/internal/net/http/metrics/pprof_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package metrics import "testing" diff --git a/internal/net/http/middleware/option_test.go b/internal/net/http/middleware/option_test.go index b03534957e..743899e5bc 100644 --- a/internal/net/http/middleware/option_test.go +++ b/internal/net/http/middleware/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package middleware import ( diff --git a/internal/net/http/middleware/timeout_test.go b/internal/net/http/middleware/timeout_test.go index 940e8ac2f3..b047835ed3 100644 --- a/internal/net/http/middleware/timeout_test.go +++ b/internal/net/http/middleware/timeout_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package middleware import ( diff --git a/internal/net/http/rest/rest_test.go b/internal/net/http/rest/rest_test.go index 41dd74e385..ffedac9ae5 100644 --- a/internal/net/http/rest/rest_test.go +++ b/internal/net/http/rest/rest_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package rest import ( diff --git a/internal/net/http/routing/middleware_mock.go b/internal/net/http/routing/middleware_mock.go index 23eb6e4a0d..bd7cc67034 100644 --- a/internal/net/http/routing/middleware_mock.go +++ b/internal/net/http/routing/middleware_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package routing import "github.com/vdaas/vald/internal/net/http/rest" diff --git a/internal/net/http/routing/option_test.go b/internal/net/http/routing/option_test.go index 69aa63e1cb..b7e1136a7c 100644 --- a/internal/net/http/routing/option_test.go +++ b/internal/net/http/routing/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package routing import ( diff --git a/internal/net/http/routing/router_test.go b/internal/net/http/routing/router_test.go index d6dcb0e78f..bd29976c63 100644 --- a/internal/net/http/routing/router_test.go +++ b/internal/net/http/routing/router_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package routing import ( diff --git a/internal/net/http/transport/roundtrip_mock.go b/internal/net/http/transport/roundtrip_mock.go index ddccb5b46e..11d9a8fcde 100644 --- a/internal/net/http/transport/roundtrip_mock.go +++ b/internal/net/http/transport/roundtrip_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package transport import ( diff --git a/internal/observability/exporter/jaeger/jaeger.go b/internal/observability/exporter/jaeger/jaeger.go index 634a022294..cf364c5fe8 100644 --- a/internal/observability/exporter/jaeger/jaeger.go +++ b/internal/observability/exporter/jaeger/jaeger.go @@ -19,51 +19,108 @@ package jaeger import ( "context" + "net/http" + "time" - "contrib.go.opencensus.io/exporter/jaeger" + "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/observability/exporter" - "go.opencensus.io/trace" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/exporters/jaeger" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/sdk/resource" + "go.opentelemetry.io/otel/sdk/trace" + semconv "go.opentelemetry.io/otel/semconv/v1.12.0" ) -type jaegerOptions = jaeger.Options - type Jaeger interface { exporter.Exporter } -type exp struct { - exporter *jaeger.Exporter - options jaegerOptions +type export struct { + tp *trace.TracerProvider + exp *jaeger.Exporter + collectorEndpoint string + client *http.Client + collectorPassword string + collectorUserName string + agentHost string + agentPort string + agentReconnInterval time.Duration + agentMaxPacketSize int + serviceName string } -func New(opts ...JaegerOption) (j Jaeger, err error) { - jo := new(jaegerOptions) +func New(opts ...Option) (j Jaeger, err error) { + e := new(export) for _, opt := range append(jaegerDefaultOpts, opts...) { - err = opt(jo) + err = opt(e) if err != nil { return nil, err } } - return &exp{ - options: *jo, - }, nil -} - -func (e *exp) Start(ctx context.Context) (err error) { - e.exporter, err = jaeger.NewExporter(e.options) + var eop jaeger.EndpointOption + if len(e.agentHost) != 0 && len(e.agentPort) != 0 { + // TODO: we can not get trace data, so we need to fix it later. + eop = jaeger.WithAgentEndpoint( + jaeger.WithAgentHost(e.agentHost), + jaeger.WithAgentPort(e.agentPort), + jaeger.WithAttemptReconnectingInterval(e.agentReconnInterval), + jaeger.WithMaxPacketSize(e.agentMaxPacketSize)) + } else { + eop = jaeger.WithCollectorEndpoint( + jaeger.WithEndpoint(e.collectorEndpoint), + jaeger.WithHTTPClient(http.DefaultClient), + // jaeger.WithDisableAttemptReconnecting(), + jaeger.WithPassword(e.collectorPassword), + jaeger.WithUsername(e.collectorUserName)) + } + e.exp, err = jaeger.New(eop) if err != nil { - return err + return nil, err } + e.tp = trace.NewTracerProvider( + // Always be sure to batch in production. + trace.WithBatcher(e.exp), // TODO we should set batch option here. like below and get configuration from yaml + // trace.WithBatcher(e.exp, + // trace.WithBatchTimeout(time.Second*5), + // trace.WithExportTimeout(time.Minute), + // trace.WithMaxExportBatchSize(1024), + // trace.WithMaxQueueSize(256), + // // trace.WithBlocking(), + // ), + // Record information about this application in a Resource. + trace.WithResource(resource.NewWithAttributes( + semconv.SchemaURL, + semconv.ServiceNameKey.String(e.serviceName), + )), + ) + return e, nil +} - trace.RegisterExporter(e.exporter) - +func (e *export) Start(ctx context.Context) (err error) { + otel.SetTracerProvider(e.tp) + otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) return nil } -func (e *exp) Stop(ctx context.Context) { - if e.exporter != nil { - e.exporter.Flush() +func (e *export) Stop(ctx context.Context) { + var err error + if e.tp != nil { + err = e.tp.ForceFlush(ctx) + if err != nil { + log.Error(err) + } + err = e.tp.Shutdown(ctx) + if err != nil { + log.Error(err) + } + } + if e.exp != nil { + err = e.exp.Shutdown(ctx) + if err != nil { + log.Error(err) + } } } diff --git a/internal/observability/exporter/jaeger/jaeger_option.go b/internal/observability/exporter/jaeger/jaeger_option.go deleted file mode 100644 index c420ee2d2d..0000000000 --- a/internal/observability/exporter/jaeger/jaeger_option.go +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package jaeger provides a jaeger exporter. -package jaeger - -import ( - "contrib.go.opencensus.io/exporter/jaeger" - "github.com/vdaas/vald/internal/log" -) - -type JaegerOption func(*jaegerOptions) error - -var jaegerDefaultOpts = []JaegerOption{ - WithServiceName("vald"), - WithOnErrorFunc(func(err error) { - if err != nil { - log.Warnf("Error when uploading spans to Jaeger: %v", err) - } - }), -} - -func WithCollectorEndpoint(cep string) JaegerOption { - return func(jo *jaegerOptions) error { - if cep != "" { - jo.CollectorEndpoint = cep - } - return nil - } -} - -func WithAgentEndpoint(aep string) JaegerOption { - return func(jo *jaegerOptions) error { - if aep != "" { - jo.AgentEndpoint = aep - } - return nil - } -} - -func WithUsername(username string) JaegerOption { - return func(jo *jaegerOptions) error { - if username != "" { - jo.Username = username - } - return nil - } -} - -func WithPassword(password string) JaegerOption { - return func(jo *jaegerOptions) error { - if password != "" { - jo.Password = password - } - return nil - } -} - -func WithServiceName(serviceName string) JaegerOption { - return func(jo *jaegerOptions) error { - if serviceName != "" { - jo.Process = jaeger.Process{ServiceName: serviceName} - } - return nil - } -} - -func WithBufferMaxCount(cnt int) JaegerOption { - return func(jo *jaegerOptions) error { - jo.BufferMaxCount = cnt - return nil - } -} - -func WithOnErrorFunc(f func(error)) JaegerOption { - return func(jo *jaegerOptions) error { - if f != nil { - jo.OnError = f - } - return nil - } -} diff --git a/internal/observability/exporter/jaeger/jaeger_test.go b/internal/observability/exporter/jaeger/jaeger_test.go index 1426b27cba..ab1c9db899 100644 --- a/internal/observability/exporter/jaeger/jaeger_test.go +++ b/internal/observability/exporter/jaeger/jaeger_test.go @@ -19,17 +19,20 @@ package jaeger import ( "context" + "net/http" "reflect" "testing" + "time" - "contrib.go.opencensus.io/exporter/jaeger" "github.com/vdaas/vald/internal/errors" "github.com/vdaas/vald/internal/test/goleak" + "go.opentelemetry.io/otel/exporters/jaeger" + "go.opentelemetry.io/otel/sdk/trace" ) func TestNew(t *testing.T) { type args struct { - opts []JaegerOption + opts []Option } type want struct { wantJ Jaeger @@ -80,9 +83,11 @@ func TestNew(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -102,13 +107,22 @@ func TestNew(t *testing.T) { } } -func Test_exp_Start(t *testing.T) { +func Test_export_Start(t *testing.T) { type args struct { ctx context.Context } type fields struct { - exporter *jaeger.Exporter - options jaegerOptions + tp *trace.TracerProvider + exp *jaeger.Exporter + collectorEndpoint string + client *http.Client + collectorPassword string + collectorUserName string + agentHost string + agentPort string + agentReconnInterval time.Duration + agentMaxPacketSize int + serviceName string } type want struct { err error @@ -137,8 +151,17 @@ func Test_exp_Start(t *testing.T) { ctx: nil, }, fields: fields { - exporter: nil, - options: nil, + tp: nil, + exp: nil, + collectorEndpoint: "", + client: nil, + collectorPassword: "", + collectorUserName: "", + agentHost: "", + agentPort: "", + agentReconnInterval: nil, + agentMaxPacketSize: 0, + serviceName: "", }, want: want{}, checkFunc: defaultCheckFunc, @@ -154,8 +177,17 @@ func Test_exp_Start(t *testing.T) { ctx: nil, }, fields: fields { - exporter: nil, - options: nil, + tp: nil, + exp: nil, + collectorEndpoint: "", + client: nil, + collectorPassword: "", + collectorUserName: "", + agentHost: "", + agentPort: "", + agentReconnInterval: nil, + agentMaxPacketSize: 0, + serviceName: "", }, want: want{}, checkFunc: defaultCheckFunc, @@ -164,9 +196,11 @@ func Test_exp_Start(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -177,9 +211,18 @@ func Test_exp_Start(t *testing.T) { if test.checkFunc == nil { checkFunc = defaultCheckFunc } - e := &exp{ - exporter: test.fields.exporter, - options: test.fields.options, + e := &export{ + tp: test.fields.tp, + exp: test.fields.exp, + collectorEndpoint: test.fields.collectorEndpoint, + client: test.fields.client, + collectorPassword: test.fields.collectorPassword, + collectorUserName: test.fields.collectorUserName, + agentHost: test.fields.agentHost, + agentPort: test.fields.agentPort, + agentReconnInterval: test.fields.agentReconnInterval, + agentMaxPacketSize: test.fields.agentMaxPacketSize, + serviceName: test.fields.serviceName, } err := e.Start(test.args.ctx) @@ -190,13 +233,22 @@ func Test_exp_Start(t *testing.T) { } } -func Test_exp_Stop(t *testing.T) { +func Test_export_Stop(t *testing.T) { type args struct { ctx context.Context } type fields struct { - exporter *jaeger.Exporter - options jaegerOptions + tp *trace.TracerProvider + exp *jaeger.Exporter + collectorEndpoint string + client *http.Client + collectorPassword string + collectorUserName string + agentHost string + agentPort string + agentReconnInterval time.Duration + agentMaxPacketSize int + serviceName string } type want struct{} type test struct { @@ -220,8 +272,17 @@ func Test_exp_Stop(t *testing.T) { ctx: nil, }, fields: fields { - exporter: nil, - options: nil, + tp: nil, + exp: nil, + collectorEndpoint: "", + client: nil, + collectorPassword: "", + collectorUserName: "", + agentHost: "", + agentPort: "", + agentReconnInterval: nil, + agentMaxPacketSize: 0, + serviceName: "", }, want: want{}, checkFunc: defaultCheckFunc, @@ -237,8 +298,17 @@ func Test_exp_Stop(t *testing.T) { ctx: nil, }, fields: fields { - exporter: nil, - options: nil, + tp: nil, + exp: nil, + collectorEndpoint: "", + client: nil, + collectorPassword: "", + collectorUserName: "", + agentHost: "", + agentPort: "", + agentReconnInterval: nil, + agentMaxPacketSize: 0, + serviceName: "", }, want: want{}, checkFunc: defaultCheckFunc, @@ -247,9 +317,11 @@ func Test_exp_Stop(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -260,9 +332,18 @@ func Test_exp_Stop(t *testing.T) { if test.checkFunc == nil { checkFunc = defaultCheckFunc } - e := &exp{ - exporter: test.fields.exporter, - options: test.fields.options, + e := &export{ + tp: test.fields.tp, + exp: test.fields.exp, + collectorEndpoint: test.fields.collectorEndpoint, + client: test.fields.client, + collectorPassword: test.fields.collectorPassword, + collectorUserName: test.fields.collectorUserName, + agentHost: test.fields.agentHost, + agentPort: test.fields.agentPort, + agentReconnInterval: test.fields.agentReconnInterval, + agentMaxPacketSize: test.fields.agentMaxPacketSize, + serviceName: test.fields.serviceName, } e.Stop(test.args.ctx) diff --git a/internal/observability/exporter/jaeger/option.go b/internal/observability/exporter/jaeger/option.go new file mode 100644 index 0000000000..8fde27e408 --- /dev/null +++ b/internal/observability/exporter/jaeger/option.go @@ -0,0 +1,85 @@ +// +// Copyright (C) 2019-2022 vdaas.org vald team +// +// 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 +// +// https://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. +// + +// Package jaeger provides a jaeger exporter. +package jaeger + +import ( + "net" +) + +type Option func(*export) error + +var jaegerDefaultOpts = []Option{ + WithServiceName("vald"), +} + +func WithCollectorEndpoint(cep string) Option { + return func(exp *export) error { + if cep != "" { + exp.collectorEndpoint = cep + } + return nil + } +} + +func WithAgentEndpoint(aep string) Option { + return func(exp *export) error { + if aep != "" { + host, port, err := net.SplitHostPort(aep) + if err != nil { + return err + } + exp.agentHost = host + exp.agentPort = port + } + return nil + } +} + +func WithUsername(username string) Option { + return func(exp *export) error { + if username != "" { + exp.collectorUserName = username + } + return nil + } +} + +func WithPassword(password string) Option { + return func(exp *export) error { + if password != "" { + exp.collectorPassword = password + } + return nil + } +} + +func WithServiceName(serviceName string) Option { + return func(exp *export) error { + if serviceName != "" { + exp.serviceName = serviceName + } + return nil + } +} + +func WithBufferMaxCount(cnt int) Option { + return func(exp *export) error { + exp.agentMaxPacketSize = cnt + return nil + } +} diff --git a/internal/observability/exporter/jaeger/jaeger_option_test.go b/internal/observability/exporter/jaeger/option_test.go similarity index 81% rename from internal/observability/exporter/jaeger/jaeger_option_test.go rename to internal/observability/exporter/jaeger/option_test.go index 186ba0d366..1a2031a1a0 100644 --- a/internal/observability/exporter/jaeger/jaeger_option_test.go +++ b/internal/observability/exporter/jaeger/option_test.go @@ -98,9 +98,11 @@ func TestWithCollectorEndpoint(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -110,8 +112,9 @@ func TestWithCollectorEndpoint(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithCollectorEndpoint(test.args.cep) @@ -123,8 +126,9 @@ func TestWithCollectorEndpoint(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithCollectorEndpoint(test.args.cep) obj := new(T) @@ -212,9 +216,11 @@ func TestWithAgentEndpoint(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -224,8 +230,9 @@ func TestWithAgentEndpoint(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithAgentEndpoint(test.args.aep) @@ -237,8 +244,9 @@ func TestWithAgentEndpoint(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithAgentEndpoint(test.args.aep) obj := new(T) @@ -326,9 +334,11 @@ func TestWithUsername(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -338,8 +348,9 @@ func TestWithUsername(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithUsername(test.args.username) @@ -351,8 +362,9 @@ func TestWithUsername(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithUsername(test.args.username) obj := new(T) @@ -440,9 +452,11 @@ func TestWithPassword(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -452,8 +466,9 @@ func TestWithPassword(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithPassword(test.args.password) @@ -465,8 +480,9 @@ func TestWithPassword(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithPassword(test.args.password) obj := new(T) @@ -554,9 +570,11 @@ func TestWithServiceName(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -566,8 +584,9 @@ func TestWithServiceName(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithServiceName(test.args.serviceName) @@ -579,8 +598,9 @@ func TestWithServiceName(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithServiceName(test.args.serviceName) obj := new(T) @@ -668,9 +688,11 @@ func TestWithBufferMaxCount(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -680,8 +702,9 @@ func TestWithBufferMaxCount(t *testing.T) { // Uncomment this block if the option returns an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithBufferMaxCount(test.args.cnt) @@ -693,8 +716,9 @@ func TestWithBufferMaxCount(t *testing.T) { // Uncomment this block if the option do not return an error, otherwise delete it /* + checkFunc := test.checkFunc if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc + checkFunc = defaultCheckFunc } got := WithBufferMaxCount(test.args.cnt) obj := new(T) @@ -706,117 +730,3 @@ func TestWithBufferMaxCount(t *testing.T) { }) } } - -func TestWithOnErrorFunc(t *testing.T) { - // Change interface type to the type of object you are testing - type T = interface{} - type args struct { - f func(error) - } - type want struct { - obj *T - // Uncomment this line if the option returns an error, otherwise delete it - // err error - } - type test struct { - name string - args args - want want - // Use the first line if the option returns an error. otherwise use the second line - // checkFunc func(want, *T, error) error - // checkFunc func(want, *T) error - beforeFunc func(args) - afterFunc func(args) - } - - // Uncomment this block if the option returns an error, otherwise delete it - /* - defaultCheckFunc := func(w want, obj *T, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(obj, w.obj) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) - } - return nil - } - */ - - // Uncomment this block if the option do not returns an error, otherwise delete it - /* - defaultCheckFunc := func(w want, obj *T) error { - if !reflect.DeepEqual(obj, w.obj) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) - } - return nil - } - */ - - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - f: nil, - }, - want: want { - obj: new(T), - }, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - f: nil, - }, - want: want { - obj: new(T), - }, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - - // Uncomment this block if the option returns an error, otherwise delete it - /* - if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc - } - - got := WithOnErrorFunc(test.args.f) - obj := new(T) - if err := checkFunc(test.want, obj, got(obj)); err != nil { - tt.Errorf("error = %v", err) - } - */ - - // Uncomment this block if the option do not return an error, otherwise delete it - /* - if test.checkFunc == nil { - test.checkFunc = defaultCheckFunc - } - got := WithOnErrorFunc(test.args.f) - obj := new(T) - got(obj) - if err := checkFunc(test.want, obj); err != nil { - tt.Errorf("error = %v", err) - } - */ - }) - } -} diff --git a/internal/observability/metrics/backoff/backoff.go b/internal/observability/metrics/backoff/backoff.go index 52b5f7851b..fd7ff72b49 100644 --- a/internal/observability/metrics/backoff/backoff.go +++ b/internal/observability/metrics/backoff/backoff.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package backoff import ( diff --git a/internal/observability/metrics/backoff/backoff_test.go b/internal/observability/metrics/backoff/backoff_test.go index e7d9f4208e..055ec28390 100644 --- a/internal/observability/metrics/backoff/backoff_test.go +++ b/internal/observability/metrics/backoff/backoff_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package backoff import ( diff --git a/internal/observability/metrics/circuitbreaker/circuitbreaker.go b/internal/observability/metrics/circuitbreaker/circuitbreaker.go index 3d28da3f11..50efb47a4f 100644 --- a/internal/observability/metrics/circuitbreaker/circuitbreaker.go +++ b/internal/observability/metrics/circuitbreaker/circuitbreaker.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go b/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go index 20d25935e8..5ef506bded 100644 --- a/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go +++ b/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package circuitbreaker import ( diff --git a/internal/observability/metrics/db/kvs/redis/redis.go b/internal/observability/metrics/db/kvs/redis/redis.go deleted file mode 100644 index 15fac7d4ec..0000000000 --- a/internal/observability/metrics/db/kvs/redis/redis.go +++ /dev/null @@ -1,257 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package redis provides redis metrics functions -package redis - -import ( - "context" - "fmt" - "strconv" - "sync" - "time" - - "github.com/vdaas/vald/internal/db/kvs/redis" - "github.com/vdaas/vald/internal/errors" - "github.com/vdaas/vald/internal/observability/metrics" - "github.com/vdaas/vald/internal/observability/trace" -) - -type redisMetrics struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - - cmdNameKey metrics.Key - numCmdKey metrics.Key - - mu sync.Mutex - ms []metrics.MeasurementWithTags -} - -type MetricsHook interface { - metrics.Metric - redis.Hook -} - -type ( - startTimeKey struct{} - pipelineStartTimeKey struct{} -) - -func New() (o MetricsHook, err error) { - rms := new(redisMetrics) - - rms.queryTotal = *metrics.Int64( - metrics.ValdOrg+"/db/kvs/redis/completed_query_total", - "cumulative count of completed queries", - metrics.UnitDimensionless, - ) - - rms.queryLatency = *metrics.Float64( - metrics.ValdOrg+"/db/kvs/redis/query_latency", - "query latency", - metrics.UnitMilliseconds, - ) - - rms.pipelineTotal = *metrics.Int64( - metrics.ValdOrg+"/db/kvs/redis/completed_pipeline_total", - "cumulative count of completed pipeline", - metrics.UnitDimensionless, - ) - - rms.pipelineLatency = *metrics.Float64( - metrics.ValdOrg+"/db/kvs/redis/pipeline_latency", - "pipeline latency", - metrics.UnitMilliseconds, - ) - - rms.cmdNameKey, err = metrics.NewKey("redis_cmd_name") - if err != nil { - return nil, err - } - - rms.numCmdKey, err = metrics.NewKey("redis_num_cmd") - if err != nil { - return nil, err - } - - rms.ms = make([]metrics.MeasurementWithTags, 0) - - return rms, nil -} - -func (rm *redisMetrics) Measurement(ctx context.Context) ([]metrics.Measurement, error) { - return []metrics.Measurement{}, nil -} - -func (rm *redisMetrics) MeasurementWithTags(ctx context.Context) ([]metrics.MeasurementWithTags, error) { - rm.mu.Lock() - defer func() { - rm.ms = make([]metrics.MeasurementWithTags, 0) - rm.mu.Unlock() - }() - - return rm.ms, nil -} - -func (rm *redisMetrics) View() []*metrics.View { - queryKeys := []metrics.Key{ - rm.cmdNameKey, - } - - pipelineKeys := []metrics.Key{ - rm.numCmdKey, - } - - return []*metrics.View{ - { - Name: "db_kvs_redis_completed_query_total", - Description: rm.queryTotal.Description(), - TagKeys: queryKeys, - Measure: &rm.queryTotal, - Aggregation: metrics.Count(), - }, - { - Name: "db_kvs_redis_query_latency", - Description: rm.queryLatency.Description(), - TagKeys: queryKeys, - Measure: &rm.queryLatency, - Aggregation: metrics.DefaultMillisecondsDistribution, - }, - { - Name: "db_kvs_redis_completed_pipeline_total", - Description: rm.pipelineTotal.Description(), - TagKeys: pipelineKeys, - Measure: &rm.pipelineTotal, - Aggregation: metrics.Count(), - }, - { - Name: "db_kvs_redis_pipeline_latency", - Description: rm.pipelineLatency.Description(), - TagKeys: pipelineKeys, - Measure: &rm.pipelineLatency, - Aggregation: metrics.DefaultMillisecondsDistribution, - }, - } -} - -func (rm *redisMetrics) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error) { - ctx, span := trace.StartSpan(ctx, "vald/internal/db/kvs/redis") - if span != nil { - span.AddAttributes( - trace.StringAttribute("cmd", cmd.Name()), - ) - } - - return context.WithValue(ctx, startTimeKey{}, time.Now()), nil -} - -func (rm *redisMetrics) AfterProcess(ctx context.Context, cmd redis.Cmder) error { - span := trace.FromContext(ctx) - if span != nil { - if err := cmd.Err(); err != nil { - span.SetStatus(trace.StatusCodeUnknown(err.Error())) - } - - span.End() - } - - startTime, _ := ctx.Value(startTimeKey{}).(time.Time) - latencyMillis := float64(time.Since(startTime)) / float64(time.Millisecond) - - tags := map[metrics.Key]string{ - rm.cmdNameKey: cmd.Name(), - } - - rm.mu.Lock() - defer rm.mu.Unlock() - - rm.ms = append( - rm.ms, - metrics.MeasurementWithTags{ - Measurement: rm.queryTotal.M(1), - Tags: tags, - }, - metrics.MeasurementWithTags{ - Measurement: rm.queryLatency.M(latencyMillis), - Tags: tags, - }, - ) - - return nil -} - -func (rm *redisMetrics) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error) { - cmdStrs := make([]string, 0, len(cmds)) - for _, cmd := range cmds { - cmdStrs = append(cmdStrs, cmd.Name()) - } - - ctx, span := trace.StartSpan(ctx, "vald/internal/db/kvs/redis/pipeline") - if span != nil { - span.AddAttributes( - trace.Int64Attribute("num_cmd", int64(len(cmds))), - trace.StringAttribute("cmds", fmt.Sprintf("%v", cmdStrs)), - ) - } - - return context.WithValue(ctx, pipelineStartTimeKey{}, time.Now()), nil -} - -func (rm *redisMetrics) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error { - span := trace.FromContext(ctx) - if span != nil { - var errs error - for _, cmd := range cmds { - if err := cmd.Err(); err != nil { - errs = errors.Wrap(errs, err.Error()) - } - } - - if errs != nil { - span.SetStatus(trace.StatusCodeUnknown(errs.Error())) - } - - span.End() - } - - startTime, _ := ctx.Value(pipelineStartTimeKey{}).(time.Time) - latencyMillis := float64(time.Since(startTime)) / float64(time.Millisecond) - - tags := map[metrics.Key]string{ - rm.numCmdKey: strconv.Itoa(len(cmds)), - } - - rm.mu.Lock() - defer rm.mu.Unlock() - - rm.ms = append( - rm.ms, - metrics.MeasurementWithTags{ - Measurement: rm.pipelineTotal.M(1), - Tags: tags, - }, - metrics.MeasurementWithTags{ - Measurement: rm.pipelineLatency.M(latencyMillis), - Tags: tags, - }, - ) - - return nil -} diff --git a/internal/observability/metrics/db/kvs/redis/redis_test.go b/internal/observability/metrics/db/kvs/redis/redis_test.go deleted file mode 100644 index b9dd6906fc..0000000000 --- a/internal/observability/metrics/db/kvs/redis/redis_test.go +++ /dev/null @@ -1,913 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package redis provides redis metrics functions -package redis - -import ( - "context" - "reflect" - "sync" - "testing" - - "github.com/vdaas/vald/internal/db/kvs/redis" - "github.com/vdaas/vald/internal/errors" - "github.com/vdaas/vald/internal/observability/metrics" - "github.com/vdaas/vald/internal/test/goleak" -) - -func TestNew(t *testing.T) { - t.Parallel() - type want struct { - wantO MetricsHook - err error - } - type test struct { - name string - want want - checkFunc func(want, MetricsHook, error) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, gotO MetricsHook, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(gotO, w.wantO) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotO, w.wantO) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - - gotO, err := New() - if err := checkFunc(test.want, gotO, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_Measurement(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []metrics.Measurement - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.Measurement, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.Measurement, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := rm.Measurement(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_MeasurementWithTags(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []metrics.MeasurementWithTags - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.MeasurementWithTags, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.MeasurementWithTags, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := rm.MeasurementWithTags(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_View(t *testing.T) { - t.Parallel() - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []*metrics.View - } - type test struct { - name string - fields fields - want want - checkFunc func(want, []*metrics.View) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, got []*metrics.View) error { - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got := rm.View() - if err := checkFunc(test.want, got); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_BeforeProcess(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - cmd redis.Cmder - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want context.Context - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, context.Context, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got context.Context, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - cmd: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - cmd: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := rm.BeforeProcess(test.args.ctx, test.args.cmd) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_AfterProcess(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - cmd redis.Cmder - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - cmd: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - cmd: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - err := rm.AfterProcess(test.args.ctx, test.args.cmd) - if err := checkFunc(test.want, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_BeforeProcessPipeline(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - cmds []redis.Cmder - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want context.Context - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, context.Context, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got context.Context, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - cmds: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - cmds: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := rm.BeforeProcessPipeline(test.args.ctx, test.args.cmds) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_redisMetrics_AfterProcessPipeline(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - cmds []redis.Cmder - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - pipelineTotal metrics.Int64Measure - pipelineLatency metrics.Float64Measure - cmdNameKey metrics.Key - numCmdKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - cmds: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - cmds: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - pipelineTotal: nil, - pipelineLatency: nil, - cmdNameKey: nil, - numCmdKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - rm := &redisMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - pipelineTotal: test.fields.pipelineTotal, - pipelineLatency: test.fields.pipelineLatency, - cmdNameKey: test.fields.cmdNameKey, - numCmdKey: test.fields.numCmdKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - err := rm.AfterProcessPipeline(test.args.ctx, test.args.cmds) - if err := checkFunc(test.want, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} diff --git a/internal/observability/metrics/db/nosql/cassandra/cassandra.go b/internal/observability/metrics/db/nosql/cassandra/cassandra.go deleted file mode 100644 index 5d38f26db8..0000000000 --- a/internal/observability/metrics/db/nosql/cassandra/cassandra.go +++ /dev/null @@ -1,193 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package cassandra provides cassandra metrics functions -package cassandra - -import ( - "context" - "sync" - "time" - - "github.com/vdaas/vald/internal/db/nosql/cassandra" - "github.com/vdaas/vald/internal/observability/metrics" -) - -type cassandraMetrics struct { - queryTotal metrics.Int64Measure - queryAttemptsTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - - keyspaceKey metrics.Key - clusterNameKey metrics.Key - dataCenterKey metrics.Key - hostIDKey metrics.Key - hostPortKey metrics.Key - rackKey metrics.Key - versionKey metrics.Key - - mu sync.Mutex - ms []metrics.MeasurementWithTags -} - -type Observer interface { - metrics.Metric - cassandra.QueryObserver -} - -func New() (o Observer, err error) { - cms := new(cassandraMetrics) - - cms.queryTotal = *metrics.Int64( - metrics.ValdOrg+"/db/nosql/cassandra/completed_query_total", - "cumulative count of completed queries", - metrics.UnitDimensionless, - ) - - cms.queryAttemptsTotal = *metrics.Int64( - metrics.ValdOrg+"/db/nosql/cassandra/completed_query_attempts_total", - "cumulative count of query attempts (number of retry or fetching next page)", - metrics.UnitDimensionless, - ) - - cms.queryLatency = *metrics.Float64( - metrics.ValdOrg+"/db/nosql/cassandra/query_latency", - "query latency", - metrics.UnitMilliseconds, - ) - - cms.keyspaceKey, err = metrics.NewKey("cassandra_keyspace") - if err != nil { - return nil, err - } - - cms.clusterNameKey, err = metrics.NewKey("cassandra_cluster_name") - if err != nil { - return nil, err - } - - cms.dataCenterKey, err = metrics.NewKey("cassandra_data_center") - if err != nil { - return nil, err - } - - cms.hostIDKey, err = metrics.NewKey("cassandra_host_id") - if err != nil { - return nil, err - } - - cms.hostPortKey, err = metrics.NewKey("cassandra_host_port") - if err != nil { - return nil, err - } - - cms.rackKey, err = metrics.NewKey("cassandra_rack") - if err != nil { - return nil, err - } - - cms.versionKey, err = metrics.NewKey("cassandra_version") - if err != nil { - return nil, err - } - - cms.ms = make([]metrics.MeasurementWithTags, 0) - - return cms, nil -} - -func (cm *cassandraMetrics) Measurement(ctx context.Context) ([]metrics.Measurement, error) { - return []metrics.Measurement{}, nil -} - -func (cm *cassandraMetrics) MeasurementWithTags(ctx context.Context) ([]metrics.MeasurementWithTags, error) { - cm.mu.Lock() - defer func() { - cm.ms = make([]metrics.MeasurementWithTags, 0) - cm.mu.Unlock() - }() - - return cm.ms, nil -} - -func (cm *cassandraMetrics) View() []*metrics.View { - keys := []metrics.Key{ - cm.keyspaceKey, - cm.clusterNameKey, - cm.dataCenterKey, - cm.hostIDKey, - cm.hostPortKey, - cm.rackKey, - cm.versionKey, - } - - return []*metrics.View{ - { - Name: "db_nosql_cassandra_completed_query_total", - Description: cm.queryTotal.Description(), - TagKeys: keys, - Measure: &cm.queryTotal, - Aggregation: metrics.Count(), - }, - { - Name: "db_nosql_cassandra_query_attempts_total", - Description: cm.queryAttemptsTotal.Description(), - TagKeys: keys, - Measure: &cm.queryAttemptsTotal, - Aggregation: metrics.Count(), - }, - { - Name: "db_nosql_cassandra_query_latency", - Description: cm.queryLatency.Description(), - TagKeys: keys, - Measure: &cm.queryLatency, - Aggregation: metrics.DefaultMillisecondsDistribution, - }, - } -} - -// ObserveQuery updates the member variables by passed ObservedQuery instance. -func (cm *cassandraMetrics) ObserveQuery(ctx context.Context, q cassandra.ObservedQuery) { - latencyMillis := float64(q.End.Sub(q.Start)) / float64(time.Millisecond) - tags := map[metrics.Key]string{ - cm.keyspaceKey: q.Keyspace, - cm.clusterNameKey: q.Host.ClusterName(), - cm.dataCenterKey: q.Host.DataCenter(), - cm.hostIDKey: q.Host.HostID(), - cm.hostPortKey: q.Host.HostnameAndPort(), - cm.rackKey: q.Host.Rack(), - cm.versionKey: q.Host.Version().String(), - } - - cm.mu.Lock() - defer cm.mu.Unlock() - - cm.ms = append( - cm.ms, - metrics.MeasurementWithTags{ - Measurement: cm.queryTotal.M(1), - Tags: tags, - }, - metrics.MeasurementWithTags{ - Measurement: cm.queryAttemptsTotal.M(1 + int64(q.Attempt)), - Tags: tags, - }, - metrics.MeasurementWithTags{ - Measurement: cm.queryLatency.M(latencyMillis), - Tags: tags, - }, - ) -} diff --git a/internal/observability/metrics/db/nosql/cassandra/cassandra_test.go b/internal/observability/metrics/db/nosql/cassandra/cassandra_test.go deleted file mode 100644 index 9345a8bdee..0000000000 --- a/internal/observability/metrics/db/nosql/cassandra/cassandra_test.go +++ /dev/null @@ -1,613 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package cassandra provides cassandra metrics functions -package cassandra - -import ( - "context" - "reflect" - "sync" - "testing" - - "github.com/vdaas/vald/internal/db/nosql/cassandra" - "github.com/vdaas/vald/internal/errors" - "github.com/vdaas/vald/internal/observability/metrics" - "github.com/vdaas/vald/internal/test/goleak" -) - -func TestNew(t *testing.T) { - t.Parallel() - type want struct { - wantO Observer - err error - } - type test struct { - name string - want want - checkFunc func(want, Observer, error) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, gotO Observer, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(gotO, w.wantO) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotO, w.wantO) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - - gotO, err := New() - if err := checkFunc(test.want, gotO, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_cassandraMetrics_Measurement(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryAttemptsTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - keyspaceKey metrics.Key - clusterNameKey metrics.Key - dataCenterKey metrics.Key - hostIDKey metrics.Key - hostPortKey metrics.Key - rackKey metrics.Key - versionKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []metrics.Measurement - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.Measurement, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.Measurement, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - cm := &cassandraMetrics{ - queryTotal: test.fields.queryTotal, - queryAttemptsTotal: test.fields.queryAttemptsTotal, - queryLatency: test.fields.queryLatency, - keyspaceKey: test.fields.keyspaceKey, - clusterNameKey: test.fields.clusterNameKey, - dataCenterKey: test.fields.dataCenterKey, - hostIDKey: test.fields.hostIDKey, - hostPortKey: test.fields.hostPortKey, - rackKey: test.fields.rackKey, - versionKey: test.fields.versionKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := cm.Measurement(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_cassandraMetrics_MeasurementWithTags(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryAttemptsTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - keyspaceKey metrics.Key - clusterNameKey metrics.Key - dataCenterKey metrics.Key - hostIDKey metrics.Key - hostPortKey metrics.Key - rackKey metrics.Key - versionKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []metrics.MeasurementWithTags - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.MeasurementWithTags, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.MeasurementWithTags, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - cm := &cassandraMetrics{ - queryTotal: test.fields.queryTotal, - queryAttemptsTotal: test.fields.queryAttemptsTotal, - queryLatency: test.fields.queryLatency, - keyspaceKey: test.fields.keyspaceKey, - clusterNameKey: test.fields.clusterNameKey, - dataCenterKey: test.fields.dataCenterKey, - hostIDKey: test.fields.hostIDKey, - hostPortKey: test.fields.hostPortKey, - rackKey: test.fields.rackKey, - versionKey: test.fields.versionKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got, err := cm.MeasurementWithTags(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_cassandraMetrics_View(t *testing.T) { - t.Parallel() - type fields struct { - queryTotal metrics.Int64Measure - queryAttemptsTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - keyspaceKey metrics.Key - clusterNameKey metrics.Key - dataCenterKey metrics.Key - hostIDKey metrics.Key - hostPortKey metrics.Key - rackKey metrics.Key - versionKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct { - want []*metrics.View - } - type test struct { - name string - fields fields - want want - checkFunc func(want, []*metrics.View) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, got []*metrics.View) error { - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - cm := &cassandraMetrics{ - queryTotal: test.fields.queryTotal, - queryAttemptsTotal: test.fields.queryAttemptsTotal, - queryLatency: test.fields.queryLatency, - keyspaceKey: test.fields.keyspaceKey, - clusterNameKey: test.fields.clusterNameKey, - dataCenterKey: test.fields.dataCenterKey, - hostIDKey: test.fields.hostIDKey, - hostPortKey: test.fields.hostPortKey, - rackKey: test.fields.rackKey, - versionKey: test.fields.versionKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - got := cm.View() - if err := checkFunc(test.want, got); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_cassandraMetrics_ObserveQuery(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - q cassandra.ObservedQuery - } - type fields struct { - queryTotal metrics.Int64Measure - queryAttemptsTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - keyspaceKey metrics.Key - clusterNameKey metrics.Key - dataCenterKey metrics.Key - hostIDKey metrics.Key - hostPortKey metrics.Key - rackKey metrics.Key - versionKey metrics.Key - mu sync.Mutex - ms []metrics.MeasurementWithTags - } - type want struct{} - type test struct { - name string - args args - fields fields - want want - checkFunc func(want) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want) error { - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - q: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - q: nil, - }, - fields: fields { - queryTotal: nil, - queryAttemptsTotal: nil, - queryLatency: nil, - keyspaceKey: nil, - clusterNameKey: nil, - dataCenterKey: nil, - hostIDKey: nil, - hostPortKey: nil, - rackKey: nil, - versionKey: nil, - mu: sync.Mutex{}, - ms: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - cm := &cassandraMetrics{ - queryTotal: test.fields.queryTotal, - queryAttemptsTotal: test.fields.queryAttemptsTotal, - queryLatency: test.fields.queryLatency, - keyspaceKey: test.fields.keyspaceKey, - clusterNameKey: test.fields.clusterNameKey, - dataCenterKey: test.fields.dataCenterKey, - hostIDKey: test.fields.hostIDKey, - hostPortKey: test.fields.hostPortKey, - rackKey: test.fields.rackKey, - versionKey: test.fields.versionKey, - mu: test.fields.mu, - ms: test.fields.ms, - } - - cm.ObserveQuery(test.args.ctx, test.args.q) - if err := checkFunc(test.want); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} diff --git a/internal/observability/metrics/db/rdb/mysql/mysql.go b/internal/observability/metrics/db/rdb/mysql/mysql.go deleted file mode 100644 index c4ab8e4283..0000000000 --- a/internal/observability/metrics/db/rdb/mysql/mysql.go +++ /dev/null @@ -1,136 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package mysql provides mysql metrics functions -package mysql - -import ( - "context" - "sync" - "time" - - "github.com/vdaas/vald/internal/db/rdb/mysql" - "github.com/vdaas/vald/internal/observability/metrics" - "github.com/vdaas/vald/internal/observability/trace" -) - -type mysqlMetrics struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - - mu sync.Mutex - ms []metrics.Measurement - - mysql.NullEventReceiver -} - -type EventReceiver interface { - metrics.Metric - mysql.EventReceiver - mysql.TracingEventReceiver -} - -type startTimeKey struct{} - -func New() (e EventReceiver, err error) { - ms := new(mysqlMetrics) - - ms.queryTotal = *metrics.Int64( - metrics.ValdOrg+"/db/rdb/mysql/completed_query_total", - "cumulative count of completed queries", - metrics.UnitDimensionless, - ) - - ms.queryLatency = *metrics.Float64( - metrics.ValdOrg+"/db/rdb/mysql/query_latency", - "query latency", - metrics.UnitMilliseconds, - ) - - ms.ms = make([]metrics.Measurement, 0) - - return ms, nil -} - -func (mm *mysqlMetrics) Measurement(ctx context.Context) ([]metrics.Measurement, error) { - mm.mu.Lock() - defer func() { - mm.ms = make([]metrics.Measurement, 0) - mm.mu.Unlock() - }() - - return mm.ms, nil -} - -func (mm *mysqlMetrics) MeasurementWithTags(ctx context.Context) ([]metrics.MeasurementWithTags, error) { - return []metrics.MeasurementWithTags{}, nil -} - -func (mm *mysqlMetrics) View() []*metrics.View { - return []*metrics.View{ - { - Name: "db_rdb_mysql_completed_query_total", - Description: mm.queryTotal.Description(), - Measure: &mm.queryTotal, - Aggregation: metrics.Count(), - }, - { - Name: "db_rdb_mysql_query_latency", - Description: mm.queryLatency.Description(), - Measure: &mm.queryLatency, - Aggregation: metrics.DefaultMillisecondsDistribution, - }, - } -} - -func (mm *mysqlMetrics) SpanStart(ctx context.Context, eventName, query string) context.Context { - ctx, span := trace.StartSpan(ctx, "vald/internal/db/rdb/mysql") - if span != nil { - span.AddAttributes( - trace.StringAttribute("event_name", eventName), - trace.StringAttribute("query", query), - ) - } - - return context.WithValue(ctx, startTimeKey{}, time.Now()) -} - -func (mm *mysqlMetrics) SpanError(ctx context.Context, err error) { - span := trace.FromContext(ctx) - if span != nil { - span.SetStatus(trace.StatusCodeUnknown(err.Error())) - span.End() - } -} - -func (mm *mysqlMetrics) SpanFinish(ctx context.Context) { - span := trace.FromContext(ctx) - if span != nil { - span.End() - } - - startTime, _ := ctx.Value(startTimeKey{}).(time.Time) - latencyMillis := float64(time.Since(startTime)) / float64(time.Millisecond) - - mm.mu.Lock() - defer mm.mu.Unlock() - - mm.ms = append( - mm.ms, - mm.queryTotal.M(1), - mm.queryLatency.M(latencyMillis), - ) -} diff --git a/internal/observability/metrics/db/rdb/mysql/mysql_test.go b/internal/observability/metrics/db/rdb/mysql/mysql_test.go deleted file mode 100644 index 3aeeab1e49..0000000000 --- a/internal/observability/metrics/db/rdb/mysql/mysql_test.go +++ /dev/null @@ -1,706 +0,0 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team -// -// 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 -// -// https://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. -// - -// Package mysql provides mysql metrics functions -package mysql - -import ( - "context" - "reflect" - "sync" - "testing" - - "github.com/vdaas/vald/internal/db/rdb/mysql" - "github.com/vdaas/vald/internal/errors" - "github.com/vdaas/vald/internal/observability/metrics" - "github.com/vdaas/vald/internal/test/goleak" -) - -func TestNew(t *testing.T) { - t.Parallel() - type want struct { - wantE EventReceiver - err error - } - type test struct { - name string - want want - checkFunc func(want, EventReceiver, error) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, gotE EventReceiver, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(gotE, w.wantE) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotE, w.wantE) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - - gotE, err := New() - if err := checkFunc(test.want, gotE, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_Measurement(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct { - want []metrics.Measurement - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.Measurement, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.Measurement, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - got, err := mm.Measurement(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_MeasurementWithTags(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct { - want []metrics.MeasurementWithTags - err error - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, []metrics.MeasurementWithTags, error) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got []metrics.MeasurementWithTags, err error) error { - if !errors.Is(err, w.err) { - return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) - } - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - got, err := mm.MeasurementWithTags(test.args.ctx) - if err := checkFunc(test.want, got, err); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_View(t *testing.T) { - t.Parallel() - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct { - want []*metrics.View - } - type test struct { - name string - fields fields - want want - checkFunc func(want, []*metrics.View) error - beforeFunc func() - afterFunc func() - } - defaultCheckFunc := func(w want, got []*metrics.View) error { - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc() - } - if test.afterFunc != nil { - defer test.afterFunc() - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - got := mm.View() - if err := checkFunc(test.want, got); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_SpanStart(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - eventName string - query string - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct { - want context.Context - } - type test struct { - name string - args args - fields fields - want want - checkFunc func(want, context.Context) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want, got context.Context) error { - if !reflect.DeepEqual(got, w.want) { - return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) - } - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - eventName: "", - query: "", - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - eventName: "", - query: "", - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - got := mm.SpanStart(test.args.ctx, test.args.eventName, test.args.query) - if err := checkFunc(test.want, got); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_SpanError(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - err error - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct{} - type test struct { - name string - args args - fields fields - want want - checkFunc func(want) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want) error { - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - err: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - err: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - mm.SpanError(test.args.ctx, test.args.err) - if err := checkFunc(test.want); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} - -func Test_mysqlMetrics_SpanFinish(t *testing.T) { - t.Parallel() - type args struct { - ctx context.Context - } - type fields struct { - queryTotal metrics.Int64Measure - queryLatency metrics.Float64Measure - mu sync.Mutex - ms []metrics.Measurement - NullEventReceiver mysql.NullEventReceiver - } - type want struct{} - type test struct { - name string - args args - fields fields - want want - checkFunc func(want) error - beforeFunc func(args) - afterFunc func(args) - } - defaultCheckFunc := func(w want) error { - return nil - } - tests := []test{ - // TODO test cases - /* - { - name: "test_case_1", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - }, - */ - - // TODO test cases - /* - func() test { - return test { - name: "test_case_2", - args: args { - ctx: nil, - }, - fields: fields { - queryTotal: nil, - queryLatency: nil, - mu: sync.Mutex{}, - ms: nil, - NullEventReceiver: nil, - }, - want: want{}, - checkFunc: defaultCheckFunc, - } - }(), - */ - } - - for _, test := range tests { - t.Run(test.name, func(tt *testing.T) { - tt.Parallel() - defer goleak.VerifyNone(tt) - if test.beforeFunc != nil { - test.beforeFunc(test.args) - } - if test.afterFunc != nil { - defer test.afterFunc(test.args) - } - checkFunc := test.checkFunc - if test.checkFunc == nil { - checkFunc = defaultCheckFunc - } - mm := &mysqlMetrics{ - queryTotal: test.fields.queryTotal, - queryLatency: test.fields.queryLatency, - mu: test.fields.mu, - ms: test.fields.ms, - NullEventReceiver: test.fields.NullEventReceiver, - } - - mm.SpanFinish(test.args.ctx) - if err := checkFunc(test.want); err != nil { - tt.Errorf("error = %v", err) - } - }) - } -} diff --git a/internal/observability/trace/status.go b/internal/observability/trace/status.go index 89f9165db6..2e304292ae 100644 --- a/internal/observability/trace/status.go +++ b/internal/observability/trace/status.go @@ -19,12 +19,18 @@ package trace import ( "github.com/vdaas/vald/internal/net/grpc/codes" - "go.opencensus.io/trace" + "go.opentelemetry.io/otel/attribute" + ocodes "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.12.0" ) -type Status = trace.Status +const ( + grpcMsgAttributeKey = attribute.Key("rpc.grpc.message") + StatusOK = ocodes.Ok + StatusError = ocodes.Error +) -func FromGRPCStatus(code codes.Code, msg string) Status { +func FromGRPCStatus(code codes.Code, msg string) []attribute.KeyValue { switch code { case codes.OK: return StatusCodeOK(msg) @@ -62,121 +68,121 @@ func FromGRPCStatus(code codes.Code, msg string) Status { return StatusCodeUnknown(msg) } -func StatusCodeOK(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeOK, - Message: msg, +func StatusCodeOK(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeOk, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeCancelled(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeCancelled, - Message: msg, +func StatusCodeCancelled(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeCancelled, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeUnknown(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeUnknown, - Message: msg, +func StatusCodeUnknown(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeUnknown, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeInvalidArgument(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeInvalidArgument, - Message: msg, +func StatusCodeInvalidArgument(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeInvalidArgument, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeDeadlineExceeded(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeDeadlineExceeded, - Message: msg, +func StatusCodeDeadlineExceeded(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeDeadlineExceeded, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeNotFound(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeNotFound, - Message: msg, +func StatusCodeNotFound(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeNotFound, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeAlreadyExists(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeAlreadyExists, - Message: msg, +func StatusCodeAlreadyExists(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeAlreadyExists, + grpcMsgAttributeKey.String(msg), } } -func StatusCodePermissionDenied(msg string) Status { - return trace.Status{ - Code: trace.StatusCodePermissionDenied, - Message: msg, +func StatusCodePermissionDenied(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodePermissionDenied, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeResourceExhausted(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeResourceExhausted, - Message: msg, +func StatusCodeResourceExhausted(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeResourceExhausted, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeFailedPrecondition(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeFailedPrecondition, - Message: msg, +func StatusCodeFailedPrecondition(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeFailedPrecondition, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeAborted(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeAborted, - Message: msg, +func StatusCodeAborted(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeAborted, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeOutOfRange(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeOutOfRange, - Message: msg, +func StatusCodeOutOfRange(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeOutOfRange, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeUnimplemented(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeUnimplemented, - Message: msg, +func StatusCodeUnimplemented(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeUnimplemented, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeInternal(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeInternal, - Message: msg, +func StatusCodeInternal(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeInternal, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeUnavailable(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeUnavailable, - Message: msg, +func StatusCodeUnavailable(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeUnavailable, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeDataLoss(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeDataLoss, - Message: msg, +func StatusCodeDataLoss(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeDataLoss, + grpcMsgAttributeKey.String(msg), } } -func StatusCodeUnauthenticated(msg string) Status { - return trace.Status{ - Code: trace.StatusCodeUnauthenticated, - Message: msg, +func StatusCodeUnauthenticated(msg string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.RPCGRPCStatusCodeUnauthenticated, + grpcMsgAttributeKey.String(msg), } } diff --git a/internal/observability/trace/status_test.go b/internal/observability/trace/status_test.go index a0ceea224f..eb57c9356d 100644 --- a/internal/observability/trace/status_test.go +++ b/internal/observability/trace/status_test.go @@ -24,25 +24,26 @@ import ( "github.com/vdaas/vald/internal/errors" "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/test/goleak" - "go.opencensus.io/trace" + "go.opentelemetry.io/otel/attribute" ) -func TestStatusCodeOK(t *testing.T) { +func TestFromGRPCStatus(t *testing.T) { type args struct { - msg string + code codes.Code + msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -54,6 +55,7 @@ func TestStatusCodeOK(t *testing.T) { { name: "test_case_1", args: args { + code: nil, msg: "", }, want: want{}, @@ -67,6 +69,7 @@ func TestStatusCodeOK(t *testing.T) { return test { name: "test_case_2", args: args { + code: nil, msg: "", }, want: want{}, @@ -76,8 +79,11 @@ func TestStatusCodeOK(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -89,7 +95,7 @@ func TestStatusCodeOK(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeOK(test.args.msg) + got := FromGRPCStatus(test.args.code, test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -97,22 +103,22 @@ func TestStatusCodeOK(t *testing.T) { } } -func TestStatusCodeCancelled(t *testing.T) { +func TestStatusCodeOK(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -146,8 +152,11 @@ func TestStatusCodeCancelled(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -159,7 +168,7 @@ func TestStatusCodeCancelled(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeCancelled(test.args.msg) + got := StatusCodeOK(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -167,22 +176,22 @@ func TestStatusCodeCancelled(t *testing.T) { } } -func TestStatusCodeUnknown(t *testing.T) { +func TestStatusCodeCancelled(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -216,8 +225,11 @@ func TestStatusCodeUnknown(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -229,7 +241,7 @@ func TestStatusCodeUnknown(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeUnknown(test.args.msg) + got := StatusCodeCancelled(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -237,22 +249,22 @@ func TestStatusCodeUnknown(t *testing.T) { } } -func TestStatusCodeInvalidArgument(t *testing.T) { +func TestStatusCodeUnknown(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -286,8 +298,11 @@ func TestStatusCodeInvalidArgument(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -299,7 +314,7 @@ func TestStatusCodeInvalidArgument(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeInvalidArgument(test.args.msg) + got := StatusCodeUnknown(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -307,22 +322,22 @@ func TestStatusCodeInvalidArgument(t *testing.T) { } } -func TestStatusCodeDeadlineExceeded(t *testing.T) { +func TestStatusCodeInvalidArgument(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -356,8 +371,11 @@ func TestStatusCodeDeadlineExceeded(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -369,7 +387,7 @@ func TestStatusCodeDeadlineExceeded(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeDeadlineExceeded(test.args.msg) + got := StatusCodeInvalidArgument(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -377,22 +395,22 @@ func TestStatusCodeDeadlineExceeded(t *testing.T) { } } -func TestStatusCodeNotFound(t *testing.T) { +func TestStatusCodeDeadlineExceeded(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -426,8 +444,11 @@ func TestStatusCodeNotFound(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -439,7 +460,7 @@ func TestStatusCodeNotFound(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeNotFound(test.args.msg) + got := StatusCodeDeadlineExceeded(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -447,22 +468,22 @@ func TestStatusCodeNotFound(t *testing.T) { } } -func TestStatusCodeAlreadyExists(t *testing.T) { +func TestStatusCodeNotFound(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -496,8 +517,11 @@ func TestStatusCodeAlreadyExists(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -509,7 +533,7 @@ func TestStatusCodeAlreadyExists(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeAlreadyExists(test.args.msg) + got := StatusCodeNotFound(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -517,22 +541,22 @@ func TestStatusCodeAlreadyExists(t *testing.T) { } } -func TestStatusCodePermissionDenied(t *testing.T) { +func TestStatusCodeAlreadyExists(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -566,8 +590,11 @@ func TestStatusCodePermissionDenied(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -579,7 +606,7 @@ func TestStatusCodePermissionDenied(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodePermissionDenied(test.args.msg) + got := StatusCodeAlreadyExists(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -587,22 +614,22 @@ func TestStatusCodePermissionDenied(t *testing.T) { } } -func TestStatusCodeResourceExhausted(t *testing.T) { +func TestStatusCodePermissionDenied(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -636,8 +663,11 @@ func TestStatusCodeResourceExhausted(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -649,7 +679,7 @@ func TestStatusCodeResourceExhausted(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeResourceExhausted(test.args.msg) + got := StatusCodePermissionDenied(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -657,22 +687,22 @@ func TestStatusCodeResourceExhausted(t *testing.T) { } } -func TestStatusCodeFailedPrecondition(t *testing.T) { +func TestStatusCodeResourceExhausted(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -706,8 +736,11 @@ func TestStatusCodeFailedPrecondition(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -719,7 +752,7 @@ func TestStatusCodeFailedPrecondition(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeFailedPrecondition(test.args.msg) + got := StatusCodeResourceExhausted(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -727,22 +760,22 @@ func TestStatusCodeFailedPrecondition(t *testing.T) { } } -func TestStatusCodeAborted(t *testing.T) { +func TestStatusCodeFailedPrecondition(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -776,8 +809,11 @@ func TestStatusCodeAborted(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -789,7 +825,7 @@ func TestStatusCodeAborted(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeAborted(test.args.msg) + got := StatusCodeFailedPrecondition(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -797,22 +833,22 @@ func TestStatusCodeAborted(t *testing.T) { } } -func TestStatusCodeOutOfRange(t *testing.T) { +func TestStatusCodeAborted(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -846,8 +882,11 @@ func TestStatusCodeOutOfRange(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -859,7 +898,7 @@ func TestStatusCodeOutOfRange(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeOutOfRange(test.args.msg) + got := StatusCodeAborted(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -867,22 +906,22 @@ func TestStatusCodeOutOfRange(t *testing.T) { } } -func TestStatusCodeUnimplemented(t *testing.T) { +func TestStatusCodeOutOfRange(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -916,8 +955,11 @@ func TestStatusCodeUnimplemented(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -929,7 +971,7 @@ func TestStatusCodeUnimplemented(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeUnimplemented(test.args.msg) + got := StatusCodeOutOfRange(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -937,22 +979,22 @@ func TestStatusCodeUnimplemented(t *testing.T) { } } -func TestStatusCodeInternal(t *testing.T) { +func TestStatusCodeUnimplemented(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -986,8 +1028,11 @@ func TestStatusCodeInternal(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -999,7 +1044,7 @@ func TestStatusCodeInternal(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeInternal(test.args.msg) + got := StatusCodeUnimplemented(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -1007,22 +1052,22 @@ func TestStatusCodeInternal(t *testing.T) { } } -func TestStatusCodeUnavailable(t *testing.T) { +func TestStatusCodeInternal(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -1056,8 +1101,11 @@ func TestStatusCodeUnavailable(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -1069,7 +1117,7 @@ func TestStatusCodeUnavailable(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeUnavailable(test.args.msg) + got := StatusCodeInternal(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -1077,22 +1125,22 @@ func TestStatusCodeUnavailable(t *testing.T) { } } -func TestStatusCodeDataLoss(t *testing.T) { +func TestStatusCodeUnavailable(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -1126,8 +1174,11 @@ func TestStatusCodeDataLoss(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -1139,7 +1190,7 @@ func TestStatusCodeDataLoss(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeDataLoss(test.args.msg) + got := StatusCodeUnavailable(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -1147,22 +1198,22 @@ func TestStatusCodeDataLoss(t *testing.T) { } } -func TestStatusCodeUnauthenticated(t *testing.T) { +func TestStatusCodeDataLoss(t *testing.T) { type args struct { msg string } type want struct { - want trace.Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, trace.Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got trace.Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -1196,8 +1247,11 @@ func TestStatusCodeUnauthenticated(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -1209,7 +1263,7 @@ func TestStatusCodeUnauthenticated(t *testing.T) { checkFunc = defaultCheckFunc } - got := StatusCodeUnauthenticated(test.args.msg) + got := StatusCodeDataLoss(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } @@ -1217,23 +1271,22 @@ func TestStatusCodeUnauthenticated(t *testing.T) { } } -func TestFromGRPCStatus(t *testing.T) { +func TestStatusCodeUnauthenticated(t *testing.T) { type args struct { - code codes.Code - msg string + msg string } type want struct { - want Status + want []attribute.KeyValue } type test struct { name string args args want want - checkFunc func(want, Status) error + checkFunc func(want, []attribute.KeyValue) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got Status) error { + defaultCheckFunc := func(w want, got []attribute.KeyValue) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -1245,7 +1298,6 @@ func TestFromGRPCStatus(t *testing.T) { { name: "test_case_1", args: args { - code: nil, msg: "", }, want: want{}, @@ -1259,7 +1311,6 @@ func TestFromGRPCStatus(t *testing.T) { return test { name: "test_case_2", args: args { - code: nil, msg: "", }, want: want{}, @@ -1285,7 +1336,7 @@ func TestFromGRPCStatus(t *testing.T) { checkFunc = defaultCheckFunc } - got := FromGRPCStatus(test.args.code, test.args.msg) + got := StatusCodeUnauthenticated(test.args.msg) if err := checkFunc(test.want, got); err != nil { tt.Errorf("error = %v", err) } diff --git a/internal/observability/trace/trace.go b/internal/observability/trace/trace.go index 527f052e30..f92a1e8d95 100644 --- a/internal/observability/trace/trace.go +++ b/internal/observability/trace/trace.go @@ -20,18 +20,28 @@ package trace import ( "context" - "go.opencensus.io/trace" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" ) var ( enabled bool - BoolAttribute = trace.BoolAttribute - Float64Attribute = trace.Float64Attribute - Int64Attribute = trace.Int64Attribute - StringAttribute = trace.StringAttribute + BoolAttribute = func(key string, val bool) attribute.KeyValue { + return attribute.Key(key).Bool(val) + } + Float64Attribute = func(key string, val float64) attribute.KeyValue { + return attribute.Key(key).Float64(val) + } + Int64Attribute = func(key string, val int64) attribute.KeyValue { + return attribute.Key(key).Int64(val) + } + StringAttribute = func(key, val string) attribute.KeyValue { + return attribute.Key(key).String(val) + } - FromContext = trace.FromContext + FromContext = trace.SpanFromContext ) type Span = trace.Span @@ -44,12 +54,12 @@ type tracer struct { samplingRate float64 } -func StartSpan(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, *Span) { +func StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, Span) { if !enabled { return ctx, nil } - return trace.StartSpan(ctx, name, opts...) + return otel.Tracer("component-main").Start(ctx, name, opts...) } func New(opts ...TraceOption) Tracer { @@ -61,13 +71,16 @@ func New(opts ...TraceOption) Tracer { enabled = true + tr := otel.Tracer("component-main") + + _ = tr return t } func (t *tracer) Start(ctx context.Context) { - trace.ApplyConfig( - trace.Config{ - DefaultSampler: trace.ProbabilitySampler(t.samplingRate), - }, - ) + // trace.ApplyConfig( + // trace.Config{ + // DefaultSampler: trace.ProbabilitySampler(t.samplingRate), + // }, + // ) } diff --git a/internal/observability/trace/trace_test.go b/internal/observability/trace/trace_test.go index a405839228..5e0f28acfb 100644 --- a/internal/observability/trace/trace_test.go +++ b/internal/observability/trace/trace_test.go @@ -23,28 +23,29 @@ import ( "testing" "github.com/vdaas/vald/internal/errors" - "go.opencensus.io/trace" + "github.com/vdaas/vald/internal/test/goleak" + "go.opentelemetry.io/otel/trace" ) func TestStartSpan(t *testing.T) { type args struct { ctx context.Context name string - opts []trace.StartOption + opts []trace.SpanStartOption } type want struct { want context.Context - want1 *Span + want1 Span } type test struct { name string args args want want - checkFunc func(want, context.Context, *Span) error + checkFunc func(want, context.Context, Span) error beforeFunc func(args) afterFunc func(args) } - defaultCheckFunc := func(w want, got context.Context, got1 *Span) error { + defaultCheckFunc := func(w want, got context.Context, got1 Span) error { if !reflect.DeepEqual(got, w.want) { return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) } @@ -85,8 +86,11 @@ func TestStartSpan(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -155,8 +159,11 @@ func TestNew(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -230,8 +237,11 @@ func Test_tracer_Start(t *testing.T) { */ } - for _, test := range tests { + for _, tc := range tests { + test := tc t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) if test.beforeFunc != nil { test.beforeFunc(test.args) } @@ -242,11 +252,11 @@ func Test_tracer_Start(t *testing.T) { if test.checkFunc == nil { checkFunc = defaultCheckFunc } - t := &tracer{ + tr := &tracer{ samplingRate: test.fields.samplingRate, } - t.Start(test.args.ctx) + tr.Start(test.args.ctx) if err := checkFunc(test.want); err != nil { tt.Errorf("error = %v", err) } diff --git a/internal/rand/rand_bench_test.go b/internal/rand/rand_bench_test.go index 6fae2cb172..91715129ab 100644 --- a/internal/rand/rand_bench_test.go +++ b/internal/rand/rand_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package rand import ( diff --git a/internal/rand/rand_test.go b/internal/rand/rand_test.go index 1be0b9a4c1..bfbf556cf9 100644 --- a/internal/rand/rand_test.go +++ b/internal/rand/rand_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package rand import ( diff --git a/internal/runner/runner_mock.go b/internal/runner/runner_mock.go index c502224aa4..79cca60e2f 100644 --- a/internal/runner/runner_mock.go +++ b/internal/runner/runner_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package runner import "context" diff --git a/internal/runner/runner_race_test.go b/internal/runner/runner_race_test.go index 30a52a4671..c73587c899 100644 --- a/internal/runner/runner_race_test.go +++ b/internal/runner/runner_race_test.go @@ -1,21 +1,18 @@ //go:build !race -// +build !race -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package runner import ( diff --git a/internal/safety/safety_bench_test.go b/internal/safety/safety_bench_test.go index 1e7f22636f..543b4af323 100644 --- a/internal/safety/safety_bench_test.go +++ b/internal/safety/safety_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package safety import ( diff --git a/internal/safety/safety_test.go b/internal/safety/safety_test.go index ddb7688062..fbafe11967 100644 --- a/internal/safety/safety_test.go +++ b/internal/safety/safety_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package safety import ( diff --git a/internal/servers/option_test.go b/internal/servers/option_test.go index 87c95cfb9c..9aacc5d73f 100644 --- a/internal/servers/option_test.go +++ b/internal/servers/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package servers import ( diff --git a/internal/servers/server/option_test.go b/internal/servers/server/option_test.go index e3a8432184..f358d4d2d4 100644 --- a/internal/servers/server/option_test.go +++ b/internal/servers/server/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package server import ( diff --git a/internal/servers/server/server_test.go b/internal/servers/server/server_test.go index 76ead14f03..cc645fd788 100644 --- a/internal/servers/server/server_test.go +++ b/internal/servers/server/server_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package server import ( diff --git a/internal/servers/servers_mock.go b/internal/servers/servers_mock.go index 8999cb9423..b513729dd9 100644 --- a/internal/servers/servers_mock.go +++ b/internal/servers/servers_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package servers import ( diff --git a/internal/servers/servers_test.go b/internal/servers/servers_test.go index 47a4cd413d..8de7e7270a 100644 --- a/internal/servers/servers_test.go +++ b/internal/servers/servers_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package servers import ( diff --git a/internal/servers/starter/option_test.go b/internal/servers/starter/option_test.go index adef200658..a47bcd19c7 100644 --- a/internal/servers/starter/option_test.go +++ b/internal/servers/starter/option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package starter import ( diff --git a/internal/servers/starter/starter_test.go b/internal/servers/starter/starter_test.go index ab84fbf4bb..4d222144b8 100644 --- a/internal/servers/starter/starter_test.go +++ b/internal/servers/starter/starter_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package starter import ( diff --git a/internal/singleflight/singleflight_test.go b/internal/singleflight/singleflight_test.go index b5b8c9e571..a3fa3a7ba3 100644 --- a/internal/singleflight/singleflight_test.go +++ b/internal/singleflight/singleflight_test.go @@ -1,5 +1,4 @@ //go:build !race -// +build !race // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/internal/strings/strings.go b/internal/strings/strings.go index 910750c66d..46a48b3c71 100644 --- a/internal/strings/strings.go +++ b/internal/strings/strings.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package strings import ( diff --git a/internal/strings/strings_test.go b/internal/strings/strings_test.go index 24d9085309..9b94fb83f6 100644 --- a/internal/strings/strings_test.go +++ b/internal/strings/strings_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package strings import ( diff --git a/internal/test/comparator/comparators.go b/internal/test/comparator/comparators.go index 245bf99764..8072df160e 100644 --- a/internal/test/comparator/comparators.go +++ b/internal/test/comparator/comparators.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package comparator import ( diff --git a/internal/test/comparator/standard.go b/internal/test/comparator/standard.go index 182b11cf6d..e05acfde27 100644 --- a/internal/test/comparator/standard.go +++ b/internal/test/comparator/standard.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package comparator import ( diff --git a/internal/test/data/backup/100index/grp b/internal/test/data/backup/100index/grp index 7fd2428b68b9d5af35f90d7cd085653d8f16f988..ce58bc9f84b9623e708de4eb8427a57d9f9a160f 100644 GIT binary patch literal 12 KcmZQzKmY&$3;+QD literal 29355 zcmds=hkuS|^#2oC5}6W22oVY4A!ZN~BJSJXd)3y`rRYF)x3tyLsVJqiiW;T0t7_C} zZMFB_R7-0F-}C<5-~7J+!>_MbUdR0;eV*$&=X1t&#`O&J^Zu*sOSONrvY#CtZ#e^u zE`fPjlW#TEn{@<;s`g{=+kqe+y+Mf{wYerj!TPiQ|!6Z`!Q|>qyGB~OE~`(igkVV zoU|!c!nxKx-mPuVS&fSe1ZO`i?l!mQw^tN*vy6WBdug}7(IY=43mh*UDlhOg3aH?g zve%cz_ynSV2KWTVgfVpl#)LarE`a`ia07v*_K;kGs#;hhH``wCHolQSojJXgz`7;7 zwZJ}aP$$>leh)|h#p>Ig1-_Y17lER{7rh0xg$b{@J{W;e>kR!=!us~PA0_NzU$1lk z$C@#_1%`VwZ%K%?mfsdwS}(dMVRSf~C*e;m_CVmdR>)7xYL?;W0-m2n`nw46mtO;g zT!e*i8|@1bqL;tx3291fq=a@eeq#Nz{ z#ivd?=<%rz=HW`zLLvLR-M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Zc0GTieD_T&qxhYAM#)U`Ufj2XAE99bKS2o%|G*t;V3`_0gi-FFOft%# z6for8`)H$FTnEg^TA?Fc=Y;{`E?)(VC>ZA(-h|6I`4H-fsYV$BKvB}yY}fha_@BF_ zp!Bb^D7stN1Xmb#HM(`%Nr%Ogre~2{B!{8k*pH#$R_SvoCM6^kjCbjWMGk48<;}zludA@IGZ4019Ku)dG|2V1jZ)#x(_(bMQ|*Z zi;H0jwFx$J=xU%Miiv4KvOa~%+VLCwuy`(w>|!*3k@O9*8A@Dig6mJ&6r5($ObD=s=Sa4)<&d>VILK@w93)VJQ}kuPVX_c#ka8y+C2s_$NRuWR%^!v4 zcnIg|6NO`>P~aHfpaZ9<`@nH3gm9Sqw8|T0J_e4_p^SS+QBX(@>R2HT9a<#X#ziY_ zjB==`Xq4#&w41oQx>36Csu`svk@%f^M#c+~Bs~I&;Fv@K=^^H=|Q}L*uJ@o1Gy%d2qX0(b6N>~IrR}_F- zFHs!6u!;}ERIw<&`VFyAdVn)bP$5>nGy@Yvpj6Z-*UZ7u^;X$Kyu{aVoTL|k%luC%N0Isg5za>qrc=@wt(HU7`|W66P4lrilu* z$Ygt9NExi;ck9!7hZu>A;UvZ#Y;ngM7$Ru|Cz;&>4s>sUb>?1c7^Sa}#d1{%m?q^8 zoH#xK7ry8QU7)vzO~Wxb{H=A07B|X`Q%H_4qthZg*#jYCh*7>+rmj&sJkU}u#cySl z6b4$zHyL0`_*%tiqugao=*Sg~Nk*C7#~N?}bDB|Run-@oZWNW1101EG8Dx~NM#8Gl Z)KJGLJwsRzd_7i&9^ipS|Nr^#e*hwkZ;Su{ diff --git a/internal/test/data/backup/100index/metadata.json b/internal/test/data/backup/100index/metadata.json deleted file mode 100644 index 45ec535cc9..0000000000 --- a/internal/test/data/backup/100index/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"is_invalid":false,"ngt":{"index_count":100}} diff --git a/internal/test/data/backup/100index/ngt-meta.kvsdb b/internal/test/data/backup/100index/ngt-meta.kvsdb deleted file mode 100644 index b6092c6b3156246589ff216b116bef287a508378..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2222 zcmZwI$9B_T6a-*9gb*Nv7JBa;Mv`q=w9tF+9W2=%-9ODvZ13SYcveF8cXo5WGut^c zz508+I=1?!Qk|+!R4V@_|E}fsOx*7#c`p=sk`|c(k=6L#Ysk65s};QOHN@EO)fRb0 zXv&vDM>y&=)UaD=zu4L4tdOLNU+zd zHThgF9}^>Bs9e^P$iVZwqbViPzA?v{3Mn&=lLeT7+*x=TQ?H(DWLB!$Lb4^J;C}^BNNF5t?$V o*R@ywA#{L~UdthJuc65;UTv9YyoMGwd9@*q3vKYV&_2%p2N)KX5&!@I diff --git a/internal/test/data/backup/100index/obj b/internal/test/data/backup/100index/obj index c2af6b53951289c5924ec609c92d26c579580b67..1b1cb4d44c57c2d7a5122870fa6ac3e62ff7e94e 100644 GIT binary patch literal 8 KcmZQzfB*mh2mk>9 literal 313709 zcmeF)3y5CT)i?0bMvd0XXw_PcHfpp{qsDvGsK*#JYSh?9jT$v-tkFh|Hr7dda>f7An2wS#W$l7WGjgI@-VgZC~T7#M2QYdLh$ zj`qFgs;bkYir&L785sCyIA#TStKik(lVD9yq#wS4s-xwt==)bgXVEQvBjs0REOYAm z;i_5NeZGuSii<78GgQ^sA>nm-> z(scQA%C`kC24hm~7}H4d!=8if(#&r!+>yb3PWYZK`gT-}<@QV67wRUdZ#Hk*F*og> z2|ft^9^4l_PXzk}o9ps32Mps#dJ zK$kYkaMGzx85k>@N*nDK1Xl#|C4RSt&wO2(vK0YeE)EV2v^yoBLySuKi(Yl?XDhwR z`3|piQBZvQa`Z2({rOz@*uyq_HwT`z*AE|`%9j)$UFXW=p~ zdf8}vbkJ4C?wJm}%8iX~Q0}>m&9k|~+mvU+cX!J8hz@haPVMNIDhIyeyYeh89G50f zzcPLBsuR1U?4S0y%7d3b<*UMw{F>D{CsI0 zC}V4h75&wD2LAS3;K8uxfvmpW(2Z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cWvD|~(*XBkJlXZ(0>PCr@l z3I5Ay7wT``U`;2n`_xA_TeyAGIcO;NJo0UE@dk(bte7|+9g7U|qSLhqti(Q%Z5Zf!GJqxf^ta&uV(>h4km3Otb_QBjr*Zs-YZdZ30R~ znj0TxE5Gu}Hyb7Tb_|??TF_9`-^e$C+}cMGszAyai?mjZMvA35@+qfcYD_*!wQ5gp zj^?GHG9=r*-*e>CeJ#aTg>;sAXcE%AG^7}MqoU4BaW$s>Yp;qczs^p1#repc?E&Ja z`{%iXeAX$LJdgYgz9!N6w|E>&nsIwU9F0*d@jD$ z$##C-kJ?rCSclz;?njMCG4w6yJ|%q{dhep7dgRv`Iw`;I$@Mj^HTuq+J&8 zFiuzbU6%L@#WJR<<*$puA2M()NfolKF!g%_Tui%#nYJc%ct177g2jHMT#Mxr0?9_ zjlPrce6sc3YA>o^XQ}T%KJC@L6|L8p`jXCDefM77-RiAJBK@8x!da-lc|O5Le0sOK zhgQ_?s{`uYZa`h=A+#Q?L-Nah(3j?Pq8_Ak()-swRrjrJ9b@_*@;W;0>t(3lqWwOP g_}l|^=e=l)uT8KEb)YJghva)6>3`Vm_FtXAA8CHLGynhq diff --git a/internal/test/data/request/insert.go b/internal/test/data/request/insert.go index 407865b03e..8cc08a2898 100644 --- a/internal/test/data/request/insert.go +++ b/internal/test/data/request/insert.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/request/insert_test.go b/internal/test/data/request/insert_test.go index 52342705c6..d1039974aa 100644 --- a/internal/test/data/request/insert_test.go +++ b/internal/test/data/request/insert_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/request/object.go b/internal/test/data/request/object.go index e706e5883f..254a4ff302 100644 --- a/internal/test/data/request/object.go +++ b/internal/test/data/request/object.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/request/object_test.go b/internal/test/data/request/object_test.go index 4f717950f0..cba34d0d62 100644 --- a/internal/test/data/request/object_test.go +++ b/internal/test/data/request/object_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/request/remove.go b/internal/test/data/request/remove.go index e9f4fbe892..bb25817dca 100644 --- a/internal/test/data/request/remove.go +++ b/internal/test/data/request/remove.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/request/remove_test.go b/internal/test/data/request/remove_test.go index 0e05494975..fd56375cc3 100644 --- a/internal/test/data/request/remove_test.go +++ b/internal/test/data/request/remove_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package request import ( diff --git a/internal/test/data/vector/gen.go b/internal/test/data/vector/gen.go index 5401782610..723657181c 100644 --- a/internal/test/data/vector/gen.go +++ b/internal/test/data/vector/gen.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vector import ( diff --git a/internal/test/data/vector/gen_test.go b/internal/test/data/vector/gen_test.go index 5749678387..31de19ea34 100644 --- a/internal/test/data/vector/gen_test.go +++ b/internal/test/data/vector/gen_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vector import ( diff --git a/internal/test/goleak/goleak.go b/internal/test/goleak/goleak.go index 539718f812..dec73c55a3 100644 --- a/internal/test/goleak/goleak.go +++ b/internal/test/goleak/goleak.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package goleak import "go.uber.org/goleak" diff --git a/internal/test/goleak/goleak_test.go b/internal/test/goleak/goleak_test.go index 6a9f7ccf6c..21aac8be3f 100644 --- a/internal/test/goleak/goleak_test.go +++ b/internal/test/goleak/goleak_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package goleak import ( diff --git a/internal/test/mock/server_stream.go b/internal/test/mock/server_stream.go index 244e76ce93..3fef50d24a 100644 --- a/internal/test/mock/server_stream.go +++ b/internal/test/mock/server_stream.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package mock import ( diff --git a/internal/test/testdata.go b/internal/test/testdata.go index d7aa32d932..7542c39925 100644 --- a/internal/test/testdata.go +++ b/internal/test/testdata.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package test import ( diff --git a/internal/test/testdata_test.go b/internal/test/testdata_test.go index 4fb012e700..9e38085d19 100644 --- a/internal/test/testdata_test.go +++ b/internal/test/testdata_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package test import ( diff --git a/internal/timeutil/location/loc.go b/internal/timeutil/location/loc.go index effbd96131..ce4e40c811 100644 --- a/internal/timeutil/location/loc.go +++ b/internal/timeutil/location/loc.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/internal/timeutil/location/loc_bench_test.go b/internal/timeutil/location/loc_bench_test.go index 469b9dd9c4..41da357f24 100644 --- a/internal/timeutil/location/loc_bench_test.go +++ b/internal/timeutil/location/loc_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/internal/timeutil/location/loc_test.go b/internal/timeutil/location/loc_test.go index 4becb09811..e77541c2a1 100644 --- a/internal/timeutil/location/loc_test.go +++ b/internal/timeutil/location/loc_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/internal/timeutil/location/set.go b/internal/timeutil/location/set.go index 81f9daa197..b2d0216616 100644 --- a/internal/timeutil/location/set.go +++ b/internal/timeutil/location/set.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/internal/timeutil/location/set_test.go b/internal/timeutil/location/set_test.go index 82945e1ac8..ca4f3204a6 100644 --- a/internal/timeutil/location/set_test.go +++ b/internal/timeutil/location/set_test.go @@ -1,21 +1,18 @@ //go:build !race -// +build !race -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/internal/timeutil/time_bench_test.go b/internal/timeutil/time_bench_test.go index dfd02289ad..9816a44ef5 100644 --- a/internal/timeutil/time_bench_test.go +++ b/internal/timeutil/time_bench_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package timeutil import ( diff --git a/internal/version/version_test.go b/internal/version/version_test.go index 9eff89f70b..01d1fcce11 100644 --- a/internal/version/version_test.go +++ b/internal/version/version_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package version import ( diff --git a/internal/worker/queue_mock.go b/internal/worker/queue_mock.go index 9d438d9069..dca4bedb7a 100644 --- a/internal/worker/queue_mock.go +++ b/internal/worker/queue_mock.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package worker import "context" diff --git a/internal/worker/worker.go b/internal/worker/worker.go index b722bd863e..7c4a9a003b 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -232,7 +232,9 @@ func (w *worker) Dispatch(ctx context.Context, f JobFunc) error { if !w.IsRunning() { err := errors.ErrWorkerIsNotRunning(w.Name()) if span != nil { - span.SetStatus(trace.StatusCodeUnavailable(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return err diff --git a/k8s/agent/configmap.yaml b/k8s/agent/configmap.yaml index 2944820440..18bbdaad92 100644 --- a/k8s/agent/configmap.yaml +++ b/k8s/agent/configmap.yaml @@ -194,47 +194,7 @@ data: username: "" password: "" service_name: "vald-agent-ngt" - buffer_max_count: 10 - stackdriver: - project_id: "" - client: - api_key: "" - audiences: [] - authentication_enabled: true - credentials_file: "" - credentials_json: "" - endpoint: "" - quota_project: "" - request_reason: "" - scopes: [] - telemetry_enabled: true - user_agent: "" - exporter: - bundle_count_threshold: 0 - bundle_delay_threshold: "0" - location: "" - metric_prefix: vald.vdaas.org - monitoring_enabled: false - number_of_workers: 1 - reporting_interval: 1m - skip_cmd: false - timeout: 5s - trace_spans_buffer_max_bytes: 0 - tracing_enabled: false - profiler: - enabled: false - service: "vald-agent-ngt" - service_version: "" - debug_logging: false - mutex_profiling: true - cpu_profiling: true - alloc_profiling: true - heap_profiling: true - goroutine_profiling: true - alloc_force_gc: false - api_addr: "" - instance: "" - zone: "" + buffer_max_count: 65000 ngt: auto_create_index_pool_size: 10000 auto_index_check_duration: 30m diff --git a/k8s/discoverer/configmap.yaml b/k8s/discoverer/configmap.yaml index 361c5807fb..3ba7597a25 100644 --- a/k8s/discoverer/configmap.yaml +++ b/k8s/discoverer/configmap.yaml @@ -194,47 +194,7 @@ data: username: "" password: "" service_name: "vald-discoverer" - buffer_max_count: 10 - stackdriver: - project_id: "" - client: - api_key: "" - audiences: [] - authentication_enabled: true - credentials_file: "" - credentials_json: "" - endpoint: "" - quota_project: "" - request_reason: "" - scopes: [] - telemetry_enabled: true - user_agent: "" - exporter: - bundle_count_threshold: 0 - bundle_delay_threshold: "0" - location: "" - metric_prefix: vald.vdaas.org - monitoring_enabled: false - number_of_workers: 1 - reporting_interval: 1m - skip_cmd: false - timeout: 5s - trace_spans_buffer_max_bytes: 0 - tracing_enabled: false - profiler: - enabled: false - service: "vald-discoverer" - service_version: "" - debug_logging: false - mutex_profiling: true - cpu_profiling: true - alloc_profiling: true - heap_profiling: true - goroutine_profiling: true - alloc_force_gc: false - api_addr: "" - instance: "" - zone: "" + buffer_max_count: 65000 discoverer: name: "" namespace: "_MY_POD_NAMESPACE_" diff --git a/k8s/discoverer/deployment.yaml b/k8s/discoverer/deployment.yaml index e41edc7fc5..9d3aaf1c7c 100644 --- a/k8s/discoverer/deployment.yaml +++ b/k8s/discoverer/deployment.yaml @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: discoverer annotations: - checksum/configmap: be80ab6b24aed623fa3aea7d236893ee4bff1995f5f230b74dfe3a718fad4746 + checksum/configmap: f7e76def4fcbf79957603ba081e3fe0d2439e6ec419339522edbc8426861e01b profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-discoverer diff --git a/k8s/gateway/lb/configmap.yaml b/k8s/gateway/lb/configmap.yaml index c4648c9a58..ef50060c5f 100644 --- a/k8s/gateway/lb/configmap.yaml +++ b/k8s/gateway/lb/configmap.yaml @@ -194,47 +194,7 @@ data: username: "" password: "" service_name: "vald-lb-gateway" - buffer_max_count: 10 - stackdriver: - project_id: "" - client: - api_key: "" - audiences: [] - authentication_enabled: true - credentials_file: "" - credentials_json: "" - endpoint: "" - quota_project: "" - request_reason: "" - scopes: [] - telemetry_enabled: true - user_agent: "" - exporter: - bundle_count_threshold: 0 - bundle_delay_threshold: "0" - location: "" - metric_prefix: vald.vdaas.org - monitoring_enabled: false - number_of_workers: 1 - reporting_interval: 1m - skip_cmd: false - timeout: 5s - trace_spans_buffer_max_bytes: 0 - tracing_enabled: false - profiler: - enabled: false - service: "vald-lb-gateway" - service_version: "" - debug_logging: false - mutex_profiling: true - cpu_profiling: true - alloc_profiling: true - heap_profiling: true - goroutine_profiling: true - alloc_force_gc: false - api_addr: "" - instance: "" - zone: "" + buffer_max_count: 65000 gateway: agent_port: 8081 agent_name: "vald-agent-ngt" @@ -262,6 +222,12 @@ data: jitter_limit: 100ms maximum_duration: 5s retry_count: 100 + circuit_breaker: + closed_error_rate: 0.7 + closed_refresh_timeout: 10s + half_open_error_rate: 0.5 + min_samples: 1000 + open_timeout: 1s call_option: max_recv_msg_size: 0 max_retry_rpc_buffer_size: 0 @@ -333,6 +299,12 @@ data: jitter_limit: 100ms maximum_duration: 5s retry_count: 100 + circuit_breaker: + closed_error_rate: 0.7 + closed_refresh_timeout: 10s + half_open_error_rate: 0.5 + min_samples: 1000 + open_timeout: 1s call_option: max_recv_msg_size: 0 max_retry_rpc_buffer_size: 0 diff --git a/k8s/gateway/lb/deployment.yaml b/k8s/gateway/lb/deployment.yaml index 69980dccbf..ea2e03d6d5 100644 --- a/k8s/gateway/lb/deployment.yaml +++ b/k8s/gateway/lb/deployment.yaml @@ -46,7 +46,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: gateway-lb annotations: - checksum/configmap: 745bc06d519aa0a335b9abb3f1727e059869a7a534c0f11b3a1ba3042611ced2 + checksum/configmap: edbecc7b0f109437b494661c57392d7f9e216ded79a5a2be1c4558318b7f48d7 profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-lb-gateway diff --git a/k8s/manager/index/configmap.yaml b/k8s/manager/index/configmap.yaml index 1c387904c5..ba917ea086 100644 --- a/k8s/manager/index/configmap.yaml +++ b/k8s/manager/index/configmap.yaml @@ -194,47 +194,7 @@ data: username: "" password: "" service_name: "vald-manager-index" - buffer_max_count: 10 - stackdriver: - project_id: "" - client: - api_key: "" - audiences: [] - authentication_enabled: true - credentials_file: "" - credentials_json: "" - endpoint: "" - quota_project: "" - request_reason: "" - scopes: [] - telemetry_enabled: true - user_agent: "" - exporter: - bundle_count_threshold: 0 - bundle_delay_threshold: "0" - location: "" - metric_prefix: vald.vdaas.org - monitoring_enabled: false - number_of_workers: 1 - reporting_interval: 1m - skip_cmd: false - timeout: 5s - trace_spans_buffer_max_bytes: 0 - tracing_enabled: false - profiler: - enabled: false - service: "vald-manager-index" - service_version: "" - debug_logging: false - mutex_profiling: true - cpu_profiling: true - alloc_profiling: true - heap_profiling: true - goroutine_profiling: true - alloc_force_gc: false - api_addr: "" - instance: "" - zone: "" + buffer_max_count: 65000 indexer: agent_port: 8081 agent_name: "vald-agent-ngt" @@ -261,6 +221,12 @@ data: jitter_limit: 100ms maximum_duration: 5s retry_count: 100 + circuit_breaker: + closed_error_rate: 0.7 + closed_refresh_timeout: 10s + half_open_error_rate: 0.5 + min_samples: 1000 + open_timeout: 1s call_option: max_recv_msg_size: 0 max_retry_rpc_buffer_size: 0 @@ -332,6 +298,12 @@ data: jitter_limit: 100ms maximum_duration: 5s retry_count: 100 + circuit_breaker: + closed_error_rate: 0.7 + closed_refresh_timeout: 10s + half_open_error_rate: 0.5 + min_samples: 1000 + open_timeout: 1s call_option: max_recv_msg_size: 0 max_retry_rpc_buffer_size: 0 diff --git a/k8s/manager/index/deployment.yaml b/k8s/manager/index/deployment.yaml index 0d8d61b1fc..9fcb3dcc86 100644 --- a/k8s/manager/index/deployment.yaml +++ b/k8s/manager/index/deployment.yaml @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: manager-index annotations: - checksum/configmap: e4187e08b9d666048619fd4d3e472ad46950adc7888c1ab1eb255fbaf20d3c15 + checksum/configmap: 9271191d89eccf2100e15ce026e6318a5a2254900a1dad5cb7f21442a240af3d profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-manager-index diff --git a/k8s/operator/helm/crds/valdrelease.yaml b/k8s/operator/helm/crds/valdrelease.yaml index 7afcf1ef0f..fad7008481 100644 --- a/k8s/operator/helm/crds/valdrelease.yaml +++ b/k8s/operator/helm/crds/valdrelease.yaml @@ -344,94 +344,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -1416,94 +1328,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -2176,6 +2000,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -2393,94 +2230,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -3368,94 +3117,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -4217,6 +3878,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -4381,6 +4055,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -4540,6 +4227,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -4831,94 +4531,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -5672,6 +5284,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -5828,6 +5453,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -6108,94 +5746,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: @@ -6980,6 +6530,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -7136,6 +6699,19 @@ spec: call_option: type: object x-kubernetes-preserve-unknown-fields: true + circuit_breaker: + type: object + properties: + closed_error_rate: + type: number + closed_refresh_timeout: + type: string + half_open_error_rate: + type: number + min_samples: + type: integer + open_timeout: + type: string connection_pool: type: object properties: @@ -7371,94 +6947,6 @@ spec: type: string namespace: type: string - stackdriver: - type: object - properties: - client: - type: object - properties: - api_key: - type: string - audiences: - type: array - items: - type: string - authentication_enabled: - type: boolean - credentials_file: - type: string - credentials_json: - type: string - endpoint: - type: string - quota_project: - type: string - request_reason: - type: string - scopes: - type: array - items: - type: string - telemetry_enabled: - type: boolean - user_agent: - type: string - exporter: - type: object - properties: - bundle_count_threshold: - type: integer - bundle_delay_threshold: - type: string - location: - type: string - metric_prefix: - type: string - monitoring_enabled: - type: boolean - number_of_workers: - type: integer - reporting_interval: - type: string - skip_cmd: - type: boolean - timeout: - type: string - trace_spans_buffer_max_bytes: - type: integer - tracing_enabled: - type: boolean - profiler: - type: object - properties: - alloc_force_gc: - type: boolean - alloc_profiling: - type: boolean - api_addr: - type: string - cpu_profiling: - type: boolean - debug_logging: - type: boolean - enabled: - type: boolean - goroutine_profiling: - type: boolean - heap_profiling: - type: boolean - instance: - type: string - mutex_profiling: - type: boolean - service: - type: string - service_version: - type: string - zone: - type: string - project_id: - type: string trace: type: object properties: diff --git a/pkg/agent/core/ngt/handler/grpc/handler_test.go b/pkg/agent/core/ngt/handler/grpc/handler_test.go index 05b7887783..96f46001b3 100644 --- a/pkg/agent/core/ngt/handler/grpc/handler_test.go +++ b/pkg/agent/core/ngt/handler/grpc/handler_test.go @@ -35,6 +35,7 @@ import ( "github.com/vdaas/vald/internal/test/goleak" "github.com/vdaas/vald/pkg/agent/core/ngt/service" ) + func TestMain(m *testing.M) { log.Init(log.WithLoggerType(logger.NOP.String())) info.Init("") diff --git a/pkg/agent/core/ngt/handler/grpc/index.go b/pkg/agent/core/ngt/handler/grpc/index.go index 6be641e501..f97ad336f1 100644 --- a/pkg/agent/core/ngt/handler/grpc/index.go +++ b/pkg/agent/core/ngt/handler/grpc/index.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -56,7 +54,9 @@ func (s *server) CreateIndex(ctx context.Context, c *payload.Control_CreateIndex }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeFailedPrecondition(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeFailedPrecondition(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -71,7 +71,9 @@ func (s *server) CreateIndex(ctx context.Context, c *payload.Control_CreateIndex }, info.Get()) log.Error(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -96,7 +98,9 @@ func (s *server) SaveIndex(ctx context.Context, _ *payload.Empty) (res *payload. }, info.Get()) log.Error(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -131,7 +135,9 @@ func (s *server) CreateAndSaveIndex(ctx context.Context, c *payload.Control_Crea }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeFailedPrecondition(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeFailedPrecondition(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -145,7 +151,9 @@ func (s *server) CreateAndSaveIndex(ctx context.Context, c *payload.Control_Crea }, info.Get()) log.Error(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/index_test.go b/pkg/agent/core/ngt/handler/grpc/index_test.go index 672a643ab9..3212695045 100644 --- a/pkg/agent/core/ngt/handler/grpc/index_test.go +++ b/pkg/agent/core/ngt/handler/grpc/index_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/insert.go b/pkg/agent/core/ngt/handler/grpc/insert.go index bd02522fc2..3afa81866b 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert.go +++ b/pkg/agent/core/ngt/handler/grpc/insert.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -30,6 +28,7 @@ import ( "github.com/vdaas/vald/internal/net/grpc/status" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" + "go.opentelemetry.io/otel/attribute" ) // Insert inserts a vector to the NGT. @@ -63,14 +62,16 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res * }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } err = s.ngt.InsertWithTime(vec.GetId(), vec.GetVector(), req.GetConfig().GetTimestamp()) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if errors.Is(err, errors.ErrUUIDAlreadyExists(vec.GetId())) { err = status.WrapWithAlreadyExists(fmt.Sprintf("Insert API uuid %s already exists", vec.GetId()), err, @@ -83,7 +84,7 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeAlreadyExists(err.Error()) + attrs = trace.StatusCodeAlreadyExists(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", vec.GetId()), err, &errdetails.RequestInfo{ @@ -103,7 +104,7 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else { var ( st *status.Status @@ -119,10 +120,12 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res * ResourceType: ngtResourceType + "/ngt.Insert", ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) - code = trace.FromGRPCStatus(st.Code(), msg) + attrs = trace.FromGRPCStatus(st.Code(), msg) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -150,7 +153,9 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Insert gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -168,7 +173,9 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamInsert gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -208,7 +215,9 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -217,7 +226,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ } err = s.ngt.InsertMultiple(vmap) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if alreadyExistsIDs := func() []string { aids := make([]string, 0, len(uuids)) for _, id := range uuids { @@ -237,7 +246,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeAlreadyExists(err.Error()) + attrs = trace.StatusCodeAlreadyExists(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { err = status.WrapWithInvalidArgument(fmt.Sprintf("MultiInsert API invalid uuids \"%v\" detected", uuids), err, &errdetails.RequestInfo{ @@ -257,7 +266,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else { err = status.WrapWithInternal("MultiInsert API failed", err, &errdetails.RequestInfo{ @@ -269,10 +278,13 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - code = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) + } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/insert_test.go b/pkg/agent/core/ngt/handler/grpc/insert_test.go index 1945581008..5148081cde 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert_test.go +++ b/pkg/agent/core/ngt/handler/grpc/insert_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search.go b/pkg/agent/core/ngt/handler/grpc/linear_search.go index e819de800f..60ece5d1a6 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -31,6 +29,7 @@ import ( "github.com/vdaas/vald/internal/net/grpc/status" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" + "go.opentelemetry.io/otel/attribute" ) func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { @@ -61,7 +60,9 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -70,7 +71,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) req.GetVector(), req.GetConfig().GetNum())) if err != nil || res == nil { - var stat trace.Status + var attrs []attribute.KeyValue switch { case errors.Is(err, errors.ErrCreateIndexingIsInProgress): err = status.WrapWithAborted("LinearSearch API aborted to process search request due to createing indices is in progress", err, @@ -83,7 +84,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeAborted(err.Error()) + attrs = trace.StatusCodeAborted(err.Error()) case errors.Is(err, errors.ErrEmptySearchResult), err == nil && res == nil, 0 < req.GetConfig().GetMinNum() && len(res.GetResults()) < int(req.GetConfig().GetMinNum()): @@ -97,7 +98,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.As(err, &errNGT): log.Errorf("ngt core process returned error: %v", err) err = status.WrapWithInternal("LinearSearch API failed to process search request due to ngt core process returned error", err, @@ -110,7 +111,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) case errors.Is(err, errors.ErrIncompatibleDimensionSize(len(req.GetVector()), int(s.ngt.GetDimensionSize()))): err = status.WrapWithInvalidArgument("LinearSearch API Incompatible Dimension Size detected", err, @@ -130,7 +131,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) ResourceType: ngtResourceType + "/ngt.LinearSearch", }) log.Warn(err) - stat = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) default: err = status.WrapWithInternal("LinearSearch API failed to process search request", err, &errdetails.RequestInfo{ @@ -142,10 +143,12 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(stat) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -182,7 +185,9 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -191,7 +196,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq req.GetConfig().GetNum()) res, err = toSearchResponse(dst, err) if err != nil || res == nil { - var stat trace.Status + var attrs []attribute.KeyValue switch { case errors.Is(err, errors.ErrCreateIndexingIsInProgress): err = status.WrapWithAborted("LinearSearchByID API aborted to process search request due to createing indices is in progress", err, @@ -204,7 +209,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeAborted(err.Error()) + attrs = trace.StatusCodeAborted(err.Error()) case errors.Is(err, errors.ErrEmptySearchResult), err == nil && res == nil, 0 < req.GetConfig().GetMinNum() && len(res.GetResults()) < int(req.GetConfig().GetMinNum()): @@ -218,7 +223,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.Is(err, errors.ErrObjectIDNotFound(req.GetId())), strings.Contains(err.Error(), fmt.Sprintf("ngt uuid %s's object not found", req.GetId())): err = status.WrapWithNotFound(fmt.Sprintf("LinearSearchByID API uuid %s's object not found", req.GetId()), err, @@ -231,7 +236,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.As(err, &errNGT): log.Errorf("ngt core process returned error: %v", err) err = status.WrapWithInternal("LinearSearchByID API failed to process search request due to ngt core process returned error", err, @@ -244,7 +249,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) case errors.Is(err, errors.ErrIncompatibleDimensionSize(len(vec), int(s.ngt.GetDimensionSize()))): err = status.WrapWithInvalidArgument("LinearSearchByID API Incompatible Dimension Size detected", err, @@ -264,7 +269,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceType: ngtResourceType + "/ngt.LinearSearchByID", }) log.Warn(err) - stat = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) default: err = status.WrapWithInternal("LinearSearchByID API failed to process search request", err, &errdetails.RequestInfo{ @@ -276,10 +281,12 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(stat) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -308,7 +315,9 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse LinearSearch gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -327,7 +336,9 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamLinearSearch gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -355,7 +366,9 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse LinearSearchByID gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -372,7 +385,9 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamLinearSearchByID gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -414,7 +429,9 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -442,7 +459,9 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -484,7 +503,9 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -512,7 +533,9 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search_test.go b/pkg/agent/core/ngt/handler/grpc/linear_search_test.go index 0c12a8a31f..74fece7a5f 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search_test.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/object.go b/pkg/agent/core/ngt/handler/grpc/object.go index 771448c4f4..46a59164ae 100644 --- a/pkg/agent/core/ngt/handler/grpc/object.go +++ b/pkg/agent/core/ngt/handler/grpc/object.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -60,7 +58,9 @@ func (s *server) Exists(ctx context.Context, uid *payload.Object_ID) (res *paylo }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warn(err) return nil, err @@ -78,7 +78,9 @@ func (s *server) Exists(ctx context.Context, uid *payload.Object_ID) (res *paylo }, uid.GetId()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -114,7 +116,9 @@ func (s *server) GetObject(ctx context.Context, id *payload.Object_VectorRequest }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -131,7 +135,9 @@ func (s *server) GetObject(ctx context.Context, id *payload.Object_VectorRequest ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -163,7 +169,9 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse GetObject gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamVector{ Payload: &payload.Object_StreamVector_Status{ @@ -181,7 +189,9 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamGetObject gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) diff --git a/pkg/agent/core/ngt/handler/grpc/object_test.go b/pkg/agent/core/ngt/handler/grpc/object_test.go index 3bd0f445e1..460486fcfe 100644 --- a/pkg/agent/core/ngt/handler/grpc/object_test.go +++ b/pkg/agent/core/ngt/handler/grpc/object_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/remove.go b/pkg/agent/core/ngt/handler/grpc/remove.go index 6ee48a4523..72c23180ce 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove.go +++ b/pkg/agent/core/ngt/handler/grpc/remove.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -30,6 +28,7 @@ import ( "github.com/vdaas/vald/internal/net/grpc/status" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" + "go.opentelemetry.io/otel/attribute" ) func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res *payload.Object_Location, err error) { @@ -61,14 +60,16 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warn(err) return nil, err } err = s.ngt.DeleteWithTime(uuid, req.GetConfig().GetTimestamp()) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if errors.Is(err, errors.ErrObjectIDNotFound(uuid)) { err = status.WrapWithNotFound(fmt.Sprintf("Remove API uuid %s not found", uuid), err, &errdetails.RequestInfo{ @@ -80,7 +81,7 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { err = status.WrapWithInvalidArgument(fmt.Sprintf("Remove API invalid argument for uuid \"%s\" detected", uuid), err, &errdetails.RequestInfo{ @@ -100,7 +101,7 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else { err = status.WrapWithInternal("Remove API failed", err, &errdetails.RequestInfo{ @@ -112,10 +113,12 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - code = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -143,7 +146,9 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Remove gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -161,7 +166,9 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamRemove gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -181,7 +188,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ } err = s.ngt.DeleteMultiple(uuids...) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if notFoundIDs := func() []string { aids := make([]string, 0, len(uuids)) for _, id := range uuids { @@ -201,7 +208,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { err = status.WrapWithInvalidArgument(fmt.Sprintf("MultiRemove API invalid argument for uuids \"%v\" detected", uuids), err, &errdetails.RequestInfo{ @@ -221,7 +228,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else { err = status.WrapWithInternal("MultiRemove API failed", err, &errdetails.RequestInfo{ @@ -233,10 +240,12 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - code = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/remove_test.go b/pkg/agent/core/ngt/handler/grpc/remove_test.go index 85cd9e1d2c..9534c941cc 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove_test.go +++ b/pkg/agent/core/ngt/handler/grpc/remove_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go index 23bda06d49..5099ff698e 100644 --- a/pkg/agent/core/ngt/handler/grpc/search.go +++ b/pkg/agent/core/ngt/handler/grpc/search.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -32,6 +30,7 @@ import ( "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/pkg/agent/core/ngt/model" + "go.opentelemetry.io/otel/attribute" ) func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { @@ -62,7 +61,9 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -73,7 +74,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * req.GetConfig().GetEpsilon(), req.GetConfig().GetRadius())) if err != nil || res == nil { - var stat trace.Status + var attrs []attribute.KeyValue switch { case errors.Is(err, errors.ErrCreateIndexingIsInProgress): err = status.WrapWithAborted("Search API aborted to process search request due to createing indices is in progress", err, @@ -86,7 +87,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeAborted(err.Error()) + attrs = trace.StatusCodeAborted(err.Error()) case errors.Is(err, errors.ErrEmptySearchResult), err == nil && res == nil, 0 < req.GetConfig().GetMinNum() && len(res.GetResults()) < int(req.GetConfig().GetMinNum()): @@ -100,7 +101,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.As(err, &errNGT): log.Errorf("ngt core process returned error: %v", err) err = status.WrapWithInternal("Search API failed to process search request due to ngt core process returned error", err, @@ -113,7 +114,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) case errors.Is(err, errors.ErrIncompatibleDimensionSize(len(req.GetVector()), int(s.ngt.GetDimensionSize()))): err = status.WrapWithInvalidArgument("Search API Incompatible Dimension Size detected", err, @@ -133,7 +134,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * ResourceType: ngtResourceType + "/ngt.Search", }) log.Warn(err) - stat = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) default: err = status.WrapWithInternal("Search API failed to process search request", err, &errdetails.RequestInfo{ @@ -145,10 +146,12 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(stat) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -185,7 +188,9 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -196,7 +201,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) req.GetConfig().GetRadius()) res, err = toSearchResponse(dst, err) if err != nil || res == nil { - var stat trace.Status + var attrs []attribute.KeyValue switch { case errors.Is(err, errors.ErrCreateIndexingIsInProgress): err = status.WrapWithAborted("SearchByID API aborted to process search request due to createing indices is in progress", err, @@ -209,7 +214,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeAborted(err.Error()) + attrs = trace.StatusCodeAborted(err.Error()) case errors.Is(err, errors.ErrEmptySearchResult), err == nil && res == nil, 0 < req.GetConfig().GetMinNum() && len(res.GetResults()) < int(req.GetConfig().GetMinNum()): @@ -223,7 +228,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.Is(err, errors.ErrObjectIDNotFound(req.GetId())), strings.Contains(err.Error(), fmt.Sprintf("ngt uuid %s's object not found", req.GetId())): err = status.WrapWithNotFound(fmt.Sprintf("SearchByID API uuid %s's object not found", req.GetId()), err, @@ -236,7 +241,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Debug(err) - stat = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) case errors.As(err, &errNGT): log.Errorf("ngt core process returned error: %v", err) err = status.WrapWithInternal("SearchByID API failed to process search request due to ngt core process returned error", err, @@ -249,7 +254,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) case errors.Is(err, errors.ErrIncompatibleDimensionSize(len(vec), int(s.ngt.GetDimensionSize()))): err = status.WrapWithInvalidArgument("SearchByID API Incompatible Dimension Size detected", err, @@ -269,7 +274,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceType: ngtResourceType + "/ngt.SearchByID", }) log.Warn(err) - stat = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) default: err = status.WrapWithInternal("SearchByID API failed to process search request", err, &errdetails.RequestInfo{ @@ -281,10 +286,12 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - stat = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(stat) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -313,7 +320,9 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Search gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -332,7 +341,9 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamSearch gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -360,7 +371,9 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse SearchByID gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -377,7 +390,9 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamSearchByID gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -419,7 +434,9 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -447,7 +464,9 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -489,7 +508,9 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -517,7 +538,9 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/search_test.go b/pkg/agent/core/ngt/handler/grpc/search_test.go index cfe9768f4a..582f91588c 100644 --- a/pkg/agent/core/ngt/handler/grpc/search_test.go +++ b/pkg/agent/core/ngt/handler/grpc/search_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/update.go b/pkg/agent/core/ngt/handler/grpc/update.go index 12254b15a5..2f0d014055 100644 --- a/pkg/agent/core/ngt/handler/grpc/update.go +++ b/pkg/agent/core/ngt/handler/grpc/update.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -30,6 +28,7 @@ import ( "github.com/vdaas/vald/internal/net/grpc/status" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" + "go.opentelemetry.io/otel/attribute" ) func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res *payload.Object_Location, err error) { @@ -62,7 +61,9 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -91,7 +92,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * } err = s.ngt.UpdateWithTime(uuid, vec.GetVector(), req.GetConfig().GetTimestamp()) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if errors.Is(err, errors.ErrObjectIDNotFound(vec.GetId())) { err = status.WrapWithNotFound(fmt.Sprintf("Update API uuid %s not found", vec.GetId()), err, &errdetails.RequestInfo{ @@ -103,7 +104,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) || errors.Is(err, errors.ErrInvalidDimensionSize(len(vec.GetVector()), s.ngt.GetDimensionSize())) { err = status.WrapWithInvalidArgument(fmt.Sprintf("Update API invalid argument for uuid \"%s\" vec \"%v\" detected", vec.GetId(), vec.GetVector()), err, &errdetails.RequestInfo{ @@ -123,7 +124,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else if errors.Is(err, errors.ErrUUIDAlreadyExists(vec.GetId())) { err = status.WrapWithAlreadyExists(fmt.Sprintf("Update API uuid %s's same data already exists", vec.GetId()), err, &errdetails.RequestInfo{ @@ -135,7 +136,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeAlreadyExists(err.Error()) + attrs = trace.StatusCodeAlreadyExists(err.Error()) } else { err = status.WrapWithInternal("Update API failed", err, &errdetails.RequestInfo{ @@ -147,10 +148,12 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - code = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -178,7 +181,9 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Update gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -196,7 +201,9 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpdate gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -237,7 +244,9 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -247,7 +256,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ err = s.ngt.UpdateMultiple(vmap) if err != nil { - var code trace.Status + var attrs []attribute.KeyValue if notFoundIDs := func() []string { aids := make([]string, 0, len(uuids)) for _, id := range uuids { @@ -267,7 +276,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeNotFound(err.Error()) + attrs = trace.StatusCodeNotFound(err.Error()) } else if invalidDimensionIDs := func() []string { idis := make([]string, 0, len(uuids)) for id, vec := range vmap { @@ -295,7 +304,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeInvalidArgument(err.Error()) + attrs = trace.StatusCodeInvalidArgument(err.Error()) } else if alreadyExistsIDs := func() []string { aids := make([]string, 0, len(uuids)) for _, id := range uuids { @@ -315,7 +324,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) - code = trace.StatusCodeAlreadyExists(err.Error()) + attrs = trace.StatusCodeAlreadyExists(err.Error()) } else { err = status.WrapWithInternal("Update API failed", err, &errdetails.RequestInfo{ @@ -327,10 +336,12 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) log.Error(err) - code = trace.StatusCodeInternal(err.Error()) + attrs = trace.StatusCodeInternal(err.Error()) } if span != nil { - span.SetStatus(code) + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/update_test.go b/pkg/agent/core/ngt/handler/grpc/update_test.go index 2704d22c5d..41583ed4c6 100644 --- a/pkg/agent/core/ngt/handler/grpc/update_test.go +++ b/pkg/agent/core/ngt/handler/grpc/update_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/upsert.go b/pkg/agent/core/ngt/handler/grpc/upsert.go index f3069c3758..359d2e6a59 100644 --- a/pkg/agent/core/ngt/handler/grpc/upsert.go +++ b/pkg/agent/core/ngt/handler/grpc/upsert.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( @@ -64,7 +62,9 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -124,7 +124,9 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -152,7 +154,9 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Upsert gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -170,7 +174,9 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpsert gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -213,7 +219,9 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -320,7 +328,9 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/upsert_test.go b/pkg/agent/core/ngt/handler/grpc/upsert_test.go index d721be3fc1..6c68018471 100644 --- a/pkg/agent/core/ngt/handler/grpc/upsert_test.go +++ b/pkg/agent/core/ngt/handler/grpc/upsert_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package grpc import ( diff --git a/pkg/agent/core/ngt/service/kvs/ou.go b/pkg/agent/core/ngt/service/kvs/ou.go index 5c1a86c9e9..218243b24e 100644 --- a/pkg/agent/core/ngt/service/kvs/ou.go +++ b/pkg/agent/core/ngt/service/kvs/ou.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package kvs import ( diff --git a/pkg/agent/core/ngt/service/kvs/ou_test.go b/pkg/agent/core/ngt/service/kvs/ou_test.go index bc2227fc0d..69d6c71dfa 100644 --- a/pkg/agent/core/ngt/service/kvs/ou_test.go +++ b/pkg/agent/core/ngt/service/kvs/ou_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package kvs import ( diff --git a/pkg/agent/core/ngt/service/kvs/uo.go b/pkg/agent/core/ngt/service/kvs/uo.go index 3c36c5c05b..87f1201a73 100644 --- a/pkg/agent/core/ngt/service/kvs/uo.go +++ b/pkg/agent/core/ngt/service/kvs/uo.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package kvs import ( diff --git a/pkg/agent/core/ngt/service/kvs/uo_test.go b/pkg/agent/core/ngt/service/kvs/uo_test.go index ddfefabc48..250acec846 100644 --- a/pkg/agent/core/ngt/service/kvs/uo_test.go +++ b/pkg/agent/core/ngt/service/kvs/uo_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package kvs import ( diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index b08acf3a06..b787025c5a 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -155,13 +155,13 @@ func New(cfg *config.NGT, opts ...Option) (nn NGT, err error) { return nil, errors.ErrOptionFailed(err, reflect.ValueOf(opt)) } } - if len(n.path) == 0 { n.inMem = true } if n.enableCopyOnWrite && !n.inMem && len(n.path) != 0 { - n.path, err = filepath.Abs(strings.ReplaceAll(n.path, string(os.PathSeparator)+string(os.PathSeparator), string(os.PathSeparator))) + sep := string(os.PathSeparator) + n.path, err = filepath.Abs(strings.ReplaceAll(n.path, sep+sep, sep)) if err != nil { log.Warn(err) } @@ -213,7 +213,6 @@ func New(cfg *config.NGT, opts ...Option) (nn NGT, err error) { } n.indexing.Store(false) n.saving.Store(false) - return n, nil } @@ -461,7 +460,6 @@ func (n *ngt) loadKVS(path string) (err error) { gob.Register(map[string]uint32{}) var f *os.File - f, err = file.Open( path, os.O_RDONLY|os.O_SYNC, diff --git a/pkg/agent/core/ngt/service/vqueue/undeleted_index_map.go b/pkg/agent/core/ngt/service/vqueue/undeleted_index_map.go index 3768b3e0fa..b486373cc2 100644 --- a/pkg/agent/core/ngt/service/vqueue/undeleted_index_map.go +++ b/pkg/agent/core/ngt/service/vqueue/undeleted_index_map.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vqueue import ( diff --git a/pkg/agent/core/ngt/service/vqueue/undeleted_index_map_test.go b/pkg/agent/core/ngt/service/vqueue/undeleted_index_map_test.go index 0ea43e1a85..1d46f5e96b 100644 --- a/pkg/agent/core/ngt/service/vqueue/undeleted_index_map_test.go +++ b/pkg/agent/core/ngt/service/vqueue/undeleted_index_map_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vqueue import ( diff --git a/pkg/agent/core/ngt/service/vqueue/uninserted_index_map.go b/pkg/agent/core/ngt/service/vqueue/uninserted_index_map.go index 1444bd17b3..f2ba3d082a 100644 --- a/pkg/agent/core/ngt/service/vqueue/uninserted_index_map.go +++ b/pkg/agent/core/ngt/service/vqueue/uninserted_index_map.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vqueue import ( diff --git a/pkg/agent/core/ngt/service/vqueue/uninserted_index_map_test.go b/pkg/agent/core/ngt/service/vqueue/uninserted_index_map_test.go index c59814c3af..6176b69349 100644 --- a/pkg/agent/core/ngt/service/vqueue/uninserted_index_map_test.go +++ b/pkg/agent/core/ngt/service/vqueue/uninserted_index_map_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package vqueue import ( diff --git a/pkg/agent/sidecar/service/observer/observer.go b/pkg/agent/sidecar/service/observer/observer.go index 1a8be53bbb..abb1d47c3d 100644 --- a/pkg/agent/sidecar/service/observer/observer.go +++ b/pkg/agent/sidecar/service/observer/observer.go @@ -412,7 +412,7 @@ func (o *observer) backup(ctx context.Context) (err error) { ctx, span := trace.StartSpan(ctx, "vald/agent-sidecar/service/observer/StorageObserver.backup") if span != nil { - span.AddAttributes( + span.SetAttributes( trace.StringAttribute("storage_type", bi.StorageInfo.Type), trace.StringAttribute("bucket_name", bi.BucketName), trace.StringAttribute("filename", bi.Filename), diff --git a/pkg/discoverer/k8s/handler/grpc/handler.go b/pkg/discoverer/k8s/handler/grpc/handler.go index 00a20b59de..0d9491e85d 100644 --- a/pkg/discoverer/k8s/handler/grpc/handler.go +++ b/pkg/discoverer/k8s/handler/grpc/handler.go @@ -95,7 +95,9 @@ func (s *server) Pods(ctx context.Context, req *payload.Discoverer_Request) (*pa }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("GetPods returned error: %v", err) return nil, err @@ -112,7 +114,9 @@ func (s *server) Pods(ctx context.Context, req *payload.Discoverer_Request) (*pa }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Pods not found: %#v, error: %v", res, err) return nil, err @@ -130,7 +134,9 @@ func (s *server) Pods(ctx context.Context, req *payload.Discoverer_Request) (*pa }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Pods not found: %#v, error: %v", res, err) return nil, err @@ -148,7 +154,9 @@ func (s *server) Pods(ctx context.Context, req *payload.Discoverer_Request) (*pa }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Pods not found: %#v, error: %v", res, err) return nil, err @@ -180,7 +188,9 @@ func (s *server) Nodes(ctx context.Context, req *payload.Discoverer_Request) (*p }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("GetNodes returned error: %v", err) return nil, err @@ -197,7 +207,9 @@ func (s *server) Nodes(ctx context.Context, req *payload.Discoverer_Request) (*p }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Nodes not found: %#v, error: %v", res, err) return nil, err @@ -218,7 +230,9 @@ func (s *server) Nodes(ctx context.Context, req *payload.Discoverer_Request) (*p info.Get(), ) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Nodes not found: %#v, error: %v", res, err) return nil, err @@ -239,7 +253,9 @@ func (s *server) Nodes(ctx context.Context, req *payload.Discoverer_Request) (*p info.Get(), ) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warnf("Nodes not found: %#v, error: %v", res, err) return nil, err diff --git a/pkg/gateway/filter/handler/grpc/handler.go b/pkg/gateway/filter/handler/grpc/handler.go index 5eae935ccc..0b3c95c335 100644 --- a/pkg/gateway/filter/handler/grpc/handler.go +++ b/pkg/gateway/filter/handler/grpc/handler.go @@ -20,6 +20,7 @@ package grpc import ( "context" "fmt" + "strconv" "sync" "github.com/vdaas/vald/apis/grpc/v1/payload" @@ -34,6 +35,7 @@ import ( "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/grpc" "github.com/vdaas/vald/internal/net/grpc/codes" + "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" "github.com/vdaas/vald/internal/observability/trace" ) @@ -42,6 +44,8 @@ type server struct { eg errgroup.Group defaultVectorizer string defaultFilters []string + name string + ip string ingress ingress.Client egress egress.Client gateway client.Client @@ -68,8 +72,8 @@ func New(opts ...Option) vald.ServerWithFilter { return s } -func (s *server) SearchObject(ctx context.Context, req *payload.Search_ObjectRequest) (*payload.Search_Response, error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.SearchObjectRPCName) +func (s *server) SearchObject(ctx context.Context, req *payload.Search_ObjectRequest) (res *payload.Search_Response, err error) { + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.SearchObjectRPCName), apiName+"/"+vald.SearchObjectRPCName) defer func() { if span != nil { span.End() @@ -77,7 +81,31 @@ func (s *server) SearchObject(ctx context.Context, req *payload.Search_ObjectReq }() vr := req.GetVectorizer() if vr == nil || vr.GetPort() == 0 { - return nil, status.WrapWithInvalidArgument("SearchObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err = errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.SearchObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer port", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vr.GetHost() == "" { vr.Host = "localhost" @@ -85,19 +113,91 @@ func (s *server) SearchObject(ctx context.Context, req *payload.Search_ObjectReq target := fmt.Sprintf("%s:%d", vr.GetHost(), vr.GetPort()) if len(target) == 0 { if len(s.Vectorizer) == 0 { - return nil, status.WrapWithInvalidArgument("SearchObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.SearchObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } target = s.Vectorizer } c, err := s.ingress.Target(ctx, target) if err != nil { - return nil, status.WrapWithUnavailable("SearchObject API target filter API unavailable", err, req, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.SearchRPCName+" API ingress filter targets %v not found", target), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.GenVector(ctx, &payload.Object_Blob{ Object: req.GetObject(), }) if err != nil { - return nil, status.WrapWithInternal("SearchObject API failed to extract vector from filter", err, req, info.Get()) + err = status.WrapWithInternal(vald.SearchObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } return s.Search(ctx, &payload.Search_Request{ Vector: vec.GetVector(), @@ -106,7 +206,7 @@ func (s *server) SearchObject(ctx context.Context, req *payload.Search_ObjectReq } func (s *server) MultiSearchObject(ctx context.Context, reqs *payload.Search_MultiObjectRequest) (res *payload.Search_Responses, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiSearchObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiSearchObjectRPCName), apiName+"/"+vald.MultiSearchObjectRPCName) defer func() { if span != nil { span.End() @@ -123,20 +223,46 @@ func (s *server) MultiSearchObject(ctx context.Context, reqs *payload.Search_Mul wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, fmt.Sprintf("%s.%s/errgroup.Go/id-%d", apiName, vald.MultiSearchObjectRPCName, idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.SearchObject(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, + vald.MultiSearchObjectRPCName+" API object "+string(query.GetObject())+"'s search request result not found", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { errs = status.WrapWithNotFound( - fmt.Sprintf("MultiSearchObject API object %s's search request result not found", + fmt.Sprintf(vald.MultiSearchObjectRPCName+" API object %s's search request result not found", string(query.GetObject())), err, info.Get()) } else { errs = errors.Wrap(errs, status.WrapWithNotFound( - fmt.Sprintf("MultiSearchObject API object %s's search request result not found", + fmt.Sprintf(vald.MultiSearchObjectRPCName+" API object %s's search request result not found", string(query.GetObject())), err, info.Get()).Error()) } mu.Unlock() @@ -151,7 +277,7 @@ func (s *server) MultiSearchObject(ctx context.Context, reqs *payload.Search_Mul } func (s *server) StreamSearchObject(stream vald.Filter_StreamSearchObjectServer) error { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamSearchObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamSearchObjectRPCName), apiName+"/"+vald.StreamSearchObjectRPCName) defer func() { if span != nil { span.End() @@ -160,12 +286,30 @@ func (s *server) StreamSearchObject(stream vald.Filter_StreamSearchObjectServer) return grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Search_ObjectRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { - res, err := s.SearchObject(ctx, data.(*payload.Search_ObjectRequest)) + req := data.(*payload.Search_ObjectRequest) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamSearchObjectRPCName+"/requestID-"+req.GetConfig().GetRequestId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + + res, err := s.SearchObject(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -182,7 +326,7 @@ func (s *server) StreamSearchObject(stream vald.Filter_StreamSearchObjectServer) } func (s *server) LinearSearchObject(ctx context.Context, req *payload.Search_ObjectRequest) (*payload.Search_Response, error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.LinearSearchObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.LinearSearchObjectRPCName), apiName+"/"+vald.LinearSearchObjectRPCName) defer func() { if span != nil { span.End() @@ -190,7 +334,31 @@ func (s *server) LinearSearchObject(ctx context.Context, req *payload.Search_Obj }() vr := req.GetVectorizer() if vr == nil || vr.GetPort() == 0 { - return nil, status.WrapWithInvalidArgument("LinearSearchObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrInvalidAPIConfig + err = status.WrapWithInvalidArgument(vald.LinearSearchObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer port", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vr.GetHost() == "" { vr.Host = "localhost" @@ -198,19 +366,89 @@ func (s *server) LinearSearchObject(ctx context.Context, req *payload.Search_Obj target := fmt.Sprintf("%s:%d", vr.GetHost(), vr.GetPort()) if len(target) == 0 { if len(s.Vectorizer) == 0 { - return nil, status.WrapWithInvalidArgument("LinearSearchObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.LinearSearchObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } target = s.Vectorizer } c, err := s.ingress.Target(ctx, target) if err != nil { - return nil, status.WrapWithUnavailable("LinearSearchObject API target filter API unavailable", err, req, info.Get()) + err = status.WrapWithUnavailable(vald.LinearSearchObjectRPCName+" API target filter API unavailable", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.GenVector(ctx, &payload.Object_Blob{ Object: req.GetObject(), }) if err != nil { - return nil, status.WrapWithInternal("LinearSearchObject API failed to extract vector from filter", err, req, info.Get()) + err = status.WrapWithInternal(vald.LinearSearchObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } return s.LinearSearch(ctx, &payload.Search_Request{ Vector: vec.GetVector(), @@ -219,7 +457,7 @@ func (s *server) LinearSearchObject(ctx context.Context, req *payload.Search_Obj } func (s *server) MultiLinearSearchObject(ctx context.Context, reqs *payload.Search_MultiObjectRequest) (res *payload.Search_Responses, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiLinearSearchObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiLinearSearchObjectRPCName), apiName+"/"+vald.MultiLinearSearchObjectRPCName) defer func() { if span != nil { span.End() @@ -236,20 +474,40 @@ func (s *server) MultiLinearSearchObject(ctx context.Context, reqs *payload.Sear wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiLinearSearchObjectRPCName+"/requestID-"+query.GetConfig().GetRequestId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + r, err := s.LinearSearchObject(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, + vald.MultiLinearSearchObjectRPCName+" API object "+string(query.GetObject())+"'s search request result not found", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } + mu.Lock() if errs == nil { errs = status.WrapWithNotFound( - fmt.Sprintf("MultiLinearSearchObject API object %s's search request result not found", + fmt.Sprintf(vald.LinearSearchObjectRPCName+" API object %s's search request result not found", string(query.GetObject())), err, info.Get()) } else { errs = errors.Wrap(errs, status.WrapWithNotFound( - fmt.Sprintf("MultiLinearSearchObject API object %s's search request result not found", + fmt.Sprintf(vald.LinearSearchObjectRPCName+" API object %s's search request result not found", string(query.GetObject())), err, info.Get()).Error()) } mu.Unlock() @@ -264,21 +522,42 @@ func (s *server) MultiLinearSearchObject(ctx context.Context, reqs *payload.Sear } func (s *server) StreamLinearSearchObject(stream vald.Filter_StreamSearchObjectServer) error { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamLinearSearchObjectRPCName) + ctx, span := trace.StartSpan( + grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamLinearSearchObjectRPCName), + apiName+"/"+vald.StreamLinearSearchObjectRPCName, + ) defer func() { if span != nil { span.End() } }() - return grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, + err := grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Search_ObjectRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { - res, err := s.LinearSearchObject(ctx, data.(*payload.Search_ObjectRequest)) + req := data.(*payload.Search_ObjectRequest) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamLinearSearchObjectRPCName+"/requestID-"+req.GetConfig().GetRequestId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + + res, err := s.LinearSearchObject(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -292,10 +571,20 @@ func (s *server) StreamLinearSearchObject(stream vald.Filter_StreamSearchObjectS }, }, nil }) + if err != nil { + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Error(err) + return err + } + return err } func (s *server) InsertObject(ctx context.Context, req *payload.Insert_ObjectRequest) (*payload.Object_Location, error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.InsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.InsertObjectRPCName), apiName+"/"+vald.InsertObjectRPCName) defer func() { if span != nil { span.End() @@ -303,7 +592,31 @@ func (s *server) InsertObject(ctx context.Context, req *payload.Insert_ObjectReq }() vr := req.GetVectorizer() if vr == nil || vr.GetPort() == 0 { - return nil, status.WrapWithInvalidArgument("InsertObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.InsertObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer port", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vr.GetHost() == "" { vr.Host = "localhost" @@ -311,17 +624,87 @@ func (s *server) InsertObject(ctx context.Context, req *payload.Insert_ObjectReq target := fmt.Sprintf("%s:%d", vr.GetHost(), vr.GetPort()) if len(target) == 0 { if len(s.Vectorizer) == 0 { - return nil, status.WrapWithInvalidArgument("InsertObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.InsertObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } target = s.Vectorizer } c, err := s.ingress.Target(ctx, target) if err != nil { - return nil, status.WrapWithUnavailable("InsertObject API target filter API unavailable", err, req, info.Get()) + err = status.WrapWithUnavailable(vald.InsertObjectRPCName+" API target filter API unavailable", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.GenVector(ctx, req.GetObject()) if err != nil { - return nil, status.WrapWithInternal("InsertObject API failed to extract vector from filter", err, req, info.Get()) + err = status.WrapWithInternal(vald.InsertObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } return s.Insert(ctx, &payload.Insert_Request{ Vector: &payload.Object_Vector{ @@ -333,22 +716,39 @@ func (s *server) InsertObject(ctx context.Context, req *payload.Insert_ObjectReq } func (s *server) StreamInsertObject(stream vald.Filter_StreamInsertObjectServer) error { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamInsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamInsertObjectRPCName), apiName+"/"+vald.StreamInsertObjectRPCName) defer func() { if span != nil { span.End() } }() - return grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, + err := grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Insert_ObjectRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Insert_ObjectRequest) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamInsertObjectRPCName+"/requestID-"+req.GetObject().GetId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + loc, err := s.InsertObject(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.InsertObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -362,10 +762,20 @@ func (s *server) StreamInsertObject(stream vald.Filter_StreamInsertObjectServer) }, }, nil }) + if err != nil { + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Error(err) + return err + } + return nil } func (s *server) MultiInsertObject(ctx context.Context, reqs *payload.Insert_MultiObjectRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiInsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiInsertObjectRPCName), apiName+"/"+vald.MultiInsertObjectRPCName) defer func() { if span != nil { span.End() @@ -382,20 +792,39 @@ func (s *server) MultiInsertObject(ctx context.Context, reqs *payload.Insert_Mul wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiInsertObjectRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() + loc, err := s.InsertObject(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.InsertObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } + mu.Lock() if errs == nil { errs = status.WrapWithNotFound( - fmt.Sprintf("MultiInsertObject API object id: %s's insert failed", + fmt.Sprintf(vald.MultiInsertObjectRPCName+" API object id: %s's insert failed", query.GetObject().GetId()), err, info.Get()) } else { errs = errors.Wrap(errs, status.WrapWithNotFound( - fmt.Sprintf("MultiInsertObject API object id: %s's insert failed", + fmt.Sprintf(vald.MultiInsertObjectRPCName+" API object id: %s's insert failed", query.GetObject().GetId()), err, info.Get()).Error()) } mu.Unlock() @@ -410,7 +839,7 @@ func (s *server) MultiInsertObject(ctx context.Context, reqs *payload.Insert_Mul } func (s *server) UpdateObject(ctx context.Context, req *payload.Update_ObjectRequest) (*payload.Object_Location, error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.UpdateObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.UpdateObjectRPCName), apiName+"/"+vald.UpdateObjectRPCName) defer func() { if span != nil { span.End() @@ -418,7 +847,31 @@ func (s *server) UpdateObject(ctx context.Context, req *payload.Update_ObjectReq }() vr := req.GetVectorizer() if vr == nil || vr.GetPort() == 0 { - return nil, status.WrapWithInvalidArgument("UpdateObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.UpdateObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer port", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vr.GetHost() == "" { vr.Host = "localhost" @@ -427,17 +880,87 @@ func (s *server) UpdateObject(ctx context.Context, req *payload.Update_ObjectReq target := fmt.Sprintf("%s:%d", vr.GetHost(), vr.GetPort()) if len(target) == 0 { if len(s.Vectorizer) == 0 { - return nil, status.WrapWithInvalidArgument("UpdateObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.UpdateObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } target = s.Vectorizer } c, err := s.ingress.Target(ctx, target) if err != nil { - return nil, status.WrapWithUnavailable("UpdateObject API target filter API unavailable", err, req, info.Get()) + err = status.WrapWithUnavailable(vald.UpdateObjectRPCName+" API target filter API unavailable", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.GenVector(ctx, req.GetObject()) if err != nil { - return nil, status.WrapWithInternal("UpdateObject API failed to extract vector from filter", err, req, info.Get()) + err = status.WrapWithInternal(vald.UpdateObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } return s.Update(ctx, &payload.Update_Request{ Vector: &payload.Object_Vector{ @@ -449,21 +972,38 @@ func (s *server) UpdateObject(ctx context.Context, req *payload.Update_ObjectReq } func (s *server) StreamUpdateObject(stream vald.Filter_StreamUpdateObjectServer) error { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamUpdateObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamUpdateObjectRPCName), apiName+"/"+vald.StreamUpdateObjectRPCName) defer func() { if span != nil { span.End() } }() - return grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, + err := grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Update_ObjectRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { + req := data.(*payload.Update_ObjectRequest) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpdateObjectRPCName+"/id-"+req.GetObject().GetId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() loc, err := s.UpdateObject(ctx, data.(*payload.Update_ObjectRequest)) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpdateObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -477,10 +1017,20 @@ func (s *server) StreamUpdateObject(stream vald.Filter_StreamUpdateObjectServer) }, }, nil }) + if err != nil { + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Error(err) + return err + } + return nil } func (s *server) MultiUpdateObject(ctx context.Context, reqs *payload.Update_MultiObjectRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiUpdateObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiUpdateObjectRPCName), apiName+"/"+vald.MultiUpdateObjectRPCName) defer func() { if span != nil { span.End() @@ -497,11 +1047,30 @@ func (s *server) MultiUpdateObject(ctx context.Context, reqs *payload.Update_Mul wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiUpdateObjectRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() loc, err := s.UpdateObject(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, "failed to parse "+vald.UpdateObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } + log.Warn(err) mu.Lock() if errs == nil { errs = status.WrapWithNotFound( @@ -525,7 +1094,7 @@ func (s *server) MultiUpdateObject(ctx context.Context, reqs *payload.Update_Mul } func (s *server) UpsertObject(ctx context.Context, req *payload.Upsert_ObjectRequest) (*payload.Object_Location, error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.UpsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.UpsertObjectRPCName), apiName+"/"+vald.UpsertObjectRPCName) defer func() { if span != nil { span.End() @@ -533,7 +1102,31 @@ func (s *server) UpsertObject(ctx context.Context, req *payload.Upsert_ObjectReq }() vr := req.GetVectorizer() if vr == nil || vr.GetPort() == 0 { - return nil, status.WrapWithInvalidArgument("UpsertObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.UpsertObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer port", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vr.GetHost() == "" { vr.Host = "localhost" @@ -541,17 +1134,95 @@ func (s *server) UpsertObject(ctx context.Context, req *payload.Upsert_ObjectReq target := fmt.Sprintf("%s:%d", vr.GetHost(), vr.GetPort()) if len(target) == 0 { if len(s.Vectorizer) == 0 { - return nil, status.WrapWithInvalidArgument("UpsertObject API vectorizer configuration is invalid", errors.ErrFilterNotFound, info.Get()) + err := errors.ErrFilterNotFound + err = status.WrapWithInvalidArgument(vald.UpsertObjectRPCName+" API vectorizer configuration is invalid", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } target = s.Vectorizer } c, err := s.ingress.Target(ctx, target) if err != nil { - return nil, status.WrapWithUnavailable("UpsertObject API target filter API unavailable", err, req, info.Get()) + err = status.WrapWithUnavailable(vald.UpsertObjectRPCName+" API target filter API unavailable", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.GenVector(ctx, req.GetObject()) if err != nil { - return nil, status.WrapWithInternal("UpsertObject API failed to extract vector from filter", err, req, info.Get()) + err = status.WrapWithInternal(vald.UpsertObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } return s.Upsert(ctx, &payload.Upsert_Request{ Vector: &payload.Object_Vector{ @@ -563,21 +1234,39 @@ func (s *server) UpsertObject(ctx context.Context, req *payload.Upsert_ObjectReq } func (s *server) StreamUpsertObject(stream vald.Filter_StreamUpsertObjectServer) error { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamUpsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamUpsertObjectRPCName), apiName+"/"+vald.StreamUpsertObjectRPCName) defer func() { if span != nil { span.End() } }() - return grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, + err := grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Upsert_ObjectRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { + req := data.(*payload.Upsert_ObjectRequest) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpdateObjectRPCName+"/id-"+req.GetObject().GetId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + loc, err := s.UpsertObject(ctx, data.(*payload.Upsert_ObjectRequest)) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpsertObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -591,10 +1280,20 @@ func (s *server) StreamUpsertObject(stream vald.Filter_StreamUpsertObjectServer) }, }, nil }) + if err != nil { + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Error(err) + return err + } + return err } func (s *server) MultiUpsertObject(ctx context.Context, reqs *payload.Upsert_MultiObjectRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiUpsertObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiUpsertObjectRPCName), apiName+"/"+vald.MultiUpsertObjectRPCName) defer func() { if span != nil { span.End() @@ -611,10 +1310,28 @@ func (s *server) MultiUpsertObject(ctx context.Context, reqs *payload.Upsert_Mul wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiUpsertObjectRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() loc, err := s.UpsertObject(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpsertObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetObject().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -649,7 +1366,7 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (*payload. } func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.SearchRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.SearchRPCName), apiName+"/"+vald.SearchRPCName) defer func() { if span != nil { span.End() @@ -664,18 +1381,66 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * } c, err := s.ingress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("Search API ingress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.SearchRPCName+" API ingress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.FilterVector(ctx, &payload.Object_Vector{ Vector: req.GetVector(), }) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("Search API ingress filter request to %v failure on vec %v", addrs, req.GetVector()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.SearchRPCName+" API ingress filter request to %v failure on vec %v", addrs, req.GetVector()), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } req.Vector = vec.GetVector() } res, err = s.gateway.Search(ctx, req, s.copts...) if err != nil { + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchRPCName+" gRPC error response") + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) + } return nil, err } targets = req.GetConfig().GetEgressFilters().GetTargets() @@ -687,12 +1452,54 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * } c, err := s.egress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("Search API egress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.SearchRPCName+" API egress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } for i, dist := range res.GetResults() { d, err := c.FilterDistance(ctx, dist) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("Search API egress filter request to %v failure on id %s", addrs, dist.GetId()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.SearchRPCName+" API egress filter request to %v failure on id %s", addrs, dist.GetId()), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } res.Results[i] = d } @@ -701,7 +1508,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * } func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) (res *payload.Search_Response, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.SearchByIDRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.SearchByIDRPCName), apiName+"/"+vald.SearchByIDRPCName) defer func() { if span != nil { span.End() @@ -709,6 +1516,12 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) }() res, err = s.gateway.SearchByID(ctx, req, s.copts...) if err != nil { + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchByIDRPCName+" gRPC error response") + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) + } return nil, err } targets := req.GetConfig().GetEgressFilters().GetTargets() @@ -720,12 +1533,54 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) } c, err := s.egress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("SearchByID API egress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.SearchByIDRPCName+" API egress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } for i, dist := range res.GetResults() { d, err := c.FilterDistance(ctx, dist) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("SearchByID API egress filter request to %v failure on id %s", addrs, dist.GetId()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.SearchByIDRPCName+" API egress filter request to %v failure on id %s", addrs, dist.GetId()), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } res.Results[i] = d } @@ -734,7 +1589,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) } func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamSearchRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamSearchRPCName), apiName+"/"+vald.StreamSearchRPCName) defer func() { if span != nil { span.End() @@ -743,12 +1598,29 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) err = grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Search_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { - res, err := s.Search(ctx, data.(*payload.Search_Request)) + req := data.(*payload.Search_Request) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamSearchRPCName+"/id-"+req.GetConfig().GetRequestId()) + defer func() { + if sspan != nil { + sspan.End() + } + }() + res, err := s.Search(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamSearchRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -765,7 +1637,9 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) if err != nil { if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -774,7 +1648,7 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) } func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamSearchByIDRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamSearchByIDRPCName), apiName+"/"+vald.StreamSearchByIDRPCName) defer func() { if span != nil { span.End() @@ -784,7 +1658,7 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er func() interface{} { return new(payload.Search_IDRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_IDRequest) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamSearchByID/id-"+req.GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamSearchByIDRPCName+"/id-"+req.GetId()) defer func() { if sspan != nil { sspan.End() @@ -792,13 +1666,28 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er }() res, err := s.SearchByID(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchByIDRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -814,7 +1703,9 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er }) if err != nil { if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -823,7 +1714,7 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er } func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequest) (res *payload.Search_Responses, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiSearchRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiSearchRPCName), apiName+"/"+vald.MultiSearchRPCName) defer func() { if span != nil { span.End() @@ -839,10 +1730,36 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiSearchRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.Search(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, "failed to parse "+vald.SearchRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -867,7 +1784,7 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ } func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_MultiIDRequest) (res *payload.Search_Responses, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiSearchByIDRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiSearchByIDRPCName), apiName+"/"+vald.MultiSearchByIDRPCName) defer func() { if span != nil { span.End() @@ -883,10 +1800,36 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiSearchByIDRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.SearchByID(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, "failed to parse "+vald.SearchByIDRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -926,13 +1869,55 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) } c, err := s.ingress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("LinearSearch API ingress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.LinearSearchRPCName+" API ingress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err := c.FilterVector(ctx, &payload.Object_Vector{ Vector: req.GetVector(), }) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("LinearSearch API ingress filter request to %v failure on vec %v", addrs, req.GetVector()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.LinearSearchRPCName+" API ingress filter request to %v failure on vec %v", addrs, req.GetVector()), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } req.Vector = vec.GetVector() } @@ -949,12 +1934,54 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) } c, err := s.egress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("LinearSearch API egress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.LinearSearchRPCName+" API ingress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } for i, dist := range res.GetResults() { d, err := c.FilterDistance(ctx, dist) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("LinearSearch API egress filter request to %v failure on id %s", addrs, dist.GetId()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.LinearSearchRPCName+" API egress filter request to %v failure on id %s", addrs, dist.GetId()), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } res.Results[i] = d } @@ -982,12 +2009,54 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq } c, err := s.egress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("LinearSearchByID API egress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.LinearSearchByIDRPCName+" API egress filter targets %v not found", addrs), + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } for i, dist := range res.GetResults() { d, err := c.FilterDistance(ctx, dist) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("LinearSearchByID API egress filter request to %v failure on id %s", addrs, dist.GetId()), err, info.Get()) + err = status.WrapWithInternal( + fmt.Sprintf(vald.LinearSearchByIDRPCName+" API egress filter request to %v failure on id %s", addrs, dist.GetId()), + err, + &errdetails.RequestInfo{ + RequestId: dist.GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } res.Results[i] = d } @@ -996,7 +2065,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq } func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamLinearSearchRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamLinearSearchRPCName), apiName+"/"+vald.StreamLinearSearchRPCName) defer func() { if span != nil { span.End() @@ -1005,12 +2074,37 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) err = grpc.BidirectionalStream(ctx, stream, s.streamConcurrency, func() interface{} { return new(payload.Search_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { + req := data.(*payload.Search_Request) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamLinearSearchRPCName+"/id-"+req.Config.RequestId) + defer func() { + if sspan != nil { + sspan.End() + } + }() res, err := s.LinearSearch(ctx, data.(*payload.Search_Request)) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -1027,7 +2121,9 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) if err != nil { if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -1036,7 +2132,10 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) } func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByIDServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamLinearSearchByIDRPCName) + ctx, span := trace.StartSpan( + grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamLinearSearchByIDRPCName), + apiName+"/"+vald.StreamLinearSearchByIDRPCName, + ) defer func() { if span != nil { span.End() @@ -1046,7 +2145,7 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI func() interface{} { return new(payload.Search_IDRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_IDRequest) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamLinearSearchByID/id-"+req.GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamLinearSearchByIDRPCName+"/id-"+req.GetId()) defer func() { if sspan != nil { sspan.End() @@ -1054,13 +2153,20 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI }() res, err := s.LinearSearchByID(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchByIDRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -1075,8 +2181,12 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI }, nil }) if err != nil { + st, msg, err := status.ParseError(err, codes.Internal, + "failed to parse "+vald.StreamLinearSearchRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -1101,10 +2211,28 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiLinearSearchRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.LinearSearch(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchByIDRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1129,7 +2257,7 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul } func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search_MultiIDRequest) (res *payload.Search_Responses, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiLinearSearchByIDRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiLinearSearchByIDRPCName), apiName+"/"+vald.MultiLinearSearchByIDRPCName) defer func() { if span != nil { span.End() @@ -1145,10 +2273,28 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiLinearSearchByIDRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.LinearSearchByID(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchByIDRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1173,7 +2319,7 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search } func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (loc *payload.Object_Location, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.InsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.InsertRPCName), apiName+"/"+vald.InsertRPCName) defer func() { if span != nil { span.End() @@ -1183,21 +2329,52 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (loc * uuid := vec.GetId() if len(vec.GetVector()) < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(len(vec.GetVector()), 0) + err = status.WrapWithInvalidArgument(vald.InsertRPCName+" API invalid vector argument", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, + ) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInvalidArgument("Insert API invalid vector argument", err, req, info.Get()) + return nil, err } if !req.GetConfig().GetSkipStrictExistCheck() { id, _ := s.Exists(ctx, &payload.Object_ID{ Id: uuid, }) if id != nil || len(id.GetId()) > 0 { - err = errors.Wrap(err, errors.ErrMetaDataAlreadyExists(uuid).Error()) + err = errors.ErrMetaDataAlreadyExists(uuid) + err = status.WrapWithAlreadyExists(vald.InsertRPCName+" API ID = "+uuid+" already exists", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName + "." + vald.ExistsRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeAlreadyExists(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeAlreadyExists(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithAlreadyExists(fmt.Sprintf("Insert API ID %s already exists", vec.GetId()), err, info.Get()) + return nil, err } if req.GetConfig() != nil { req.GetConfig().SkipStrictExistCheck = true @@ -1216,15 +2393,42 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (loc * } c, err := s.ingress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("Insert API ingress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.InsertRPCName+" API ingress filter filter targets %v not found", addrs), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } } vec, err = c.FilterVector(ctx, req.GetVector()) if err != nil { - return nil, status.WrapWithInternal( - fmt.Sprintf("Insert API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), - err, - info.Get(), - ) + err = status.WrapWithInternal( + fmt.Sprintf(vald.InsertRPCName+" API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vec.GetId() == "" { vec.Id = req.GetVector().GetId() @@ -1232,18 +2436,30 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (loc * req.Vector = vec loc, err = s.gateway.Insert(ctx, req, s.copts...) if err != nil { - err = errors.Wrapf(err, "Insert API failed to Insert uuid = %s\tinfo = %#v", uuid, info.Get()) + err = status.WrapWithInternal( + vald.InsertRPCName+" API failed to Execute DoMulti ID = "+uuid, err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) log.Error(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInternal(fmt.Sprintf("Insert API failed to Execute DoMulti error = %s", err.Error()), err, info.Get()) + return nil, err } return loc, nil } func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamInsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamInsertRPCName), apiName+"/"+vald.StreamInsertRPCName) defer func() { if span != nil { span.End() @@ -1253,7 +2469,7 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) func() interface{} { return new(payload.Insert_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Insert_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamInsert/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamInsertRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1261,13 +2477,29 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }() res, err := s.Insert(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.InsertRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1284,7 +2516,9 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) if err != nil { if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -1293,7 +2527,7 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) } func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiInsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiInsertRPCName), apiName+"/"+vald.MultiInsertRPCName) defer func() { if span != nil { span.End() @@ -1309,10 +2543,36 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiInsertRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.Insert(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.InsertRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1337,7 +2597,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ } func (s *server) Update(ctx context.Context, req *payload.Update_Request) (loc *payload.Object_Location, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.UpdateRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.UpdateRPCName), apiName+"/"+vald.UpdateRPCName) defer func() { if span != nil { span.End() @@ -1347,21 +2607,46 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (loc * uuid := vec.GetId() if len(vec.GetVector()) < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(len(vec.GetVector()), 0) + err = status.WrapWithInvalidArgument(vald.UpdateRPCName+" API invalid vector argument", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInvalidArgument("Update API invalid vector argument", err, req, info.Get()) + return nil, err } if !req.GetConfig().GetSkipStrictExistCheck() { id, _ := s.Exists(ctx, &payload.Object_ID{ Id: uuid, }) if id != nil || len(id.GetId()) > 0 { - err = errors.Wrap(err, errors.ErrMetaDataAlreadyExists(uuid).Error()) + err = status.WrapWithAlreadyExists(vald.UpdateRPCName+" API ID = "+uuid+"'s same vector data already exists", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName + "." + vald.ExistsRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeAlreadyExists(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeAlreadyExists(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithAlreadyExists(fmt.Sprintf("Update API ID %s already exists", vec.GetId()), err, info.Get()) + return nil, err } if req.GetConfig() != nil { req.GetConfig().SkipStrictExistCheck = true @@ -1380,15 +2665,43 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (loc * } c, err := s.ingress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("Update API ingress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.UpdateRPCName+" API ingress filter filter targets %v not found", addrs), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err = c.FilterVector(ctx, req.GetVector()) if err != nil { - return nil, status.WrapWithInternal( - fmt.Sprintf("Update API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), - err, - info.Get(), - ) + err = status.WrapWithInternal( + fmt.Sprintf(vald.UpdateRPCName+" API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vec.GetId() == "" { vec.Id = req.GetVector().GetId() @@ -1396,18 +2709,29 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (loc * req.Vector = vec loc, err = s.gateway.Update(ctx, req, s.copts...) if err != nil { - err = errors.Wrapf(err, "Update API failed to Update uuid = %s\tinfo = %#v", uuid, info.Get()) - log.Error(err) + err = status.WrapWithInternal( + vald.UpdateRPCName+" API failed to Execute DoMulti ID = "+uuid, err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInternal(fmt.Sprintf("Update API failed to Execute DoMulti error = %s", err.Error()), err, info.Get()) + return nil, err } return loc, nil } func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamUpdateRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamUpdateRPCName), apiName+"/"+vald.StreamUpdateRPCName) defer func() { if span != nil { span.End() @@ -1417,7 +2741,7 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) func() interface{} { return new(payload.Update_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Update_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamUpdate/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpdateRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1425,13 +2749,20 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }() res, err := s.Update(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpdateRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1447,17 +2778,13 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) - } - log.Error(err) return err } return nil } func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiUpdateRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiUpdateRPCName), apiName+"/"+vald.MultiUpdateRPCName) defer func() { if span != nil { span.End() @@ -1473,10 +2800,36 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiUpdateRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.Update(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpdateRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1501,7 +2854,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ } func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc *payload.Object_Location, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.UpsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.UpsertRPCName), apiName+"/"+vald.UpsertRPCName) defer func() { if span != nil { span.End() @@ -1511,21 +2864,46 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * uuid := vec.GetId() if len(vec.GetVector()) < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(len(vec.GetVector()), 0) + err = status.WrapWithInvalidArgument(vald.UpsertRPCName+" API invalid vector argument", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInvalidArgument("Upsert API invalid vector argument", err, req, info.Get()) + return nil, err } if !req.GetConfig().GetSkipStrictExistCheck() { id, _ := s.Exists(ctx, &payload.Object_ID{ Id: uuid, }) if id != nil || len(id.GetId()) > 0 { - err = errors.Wrap(err, errors.ErrMetaDataAlreadyExists(uuid).Error()) + err = status.WrapWithAlreadyExists(vald.UpsertRPCName+" API ID = "+uuid+"'s same vector data already exists", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName + "." + vald.ExistsRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeAlreadyExists(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeAlreadyExists(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithAlreadyExists(fmt.Sprintf("Upsert API ID %s already exists", vec.GetId()), err, info.Get()) + return nil, err } if req.GetConfig() != nil { req.GetConfig().SkipStrictExistCheck = true @@ -1544,15 +2922,43 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * } c, err := s.ingress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("Upsert API ingress filter targets %v not found", addrs), err, info.Get()) + err = status.WrapWithUnavailable( + fmt.Sprintf(vald.UpsertRPCName+" API ingress filter filter targets %v not found", addrs), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err = c.FilterVector(ctx, req.GetVector()) if err != nil { - return nil, status.WrapWithInternal( - fmt.Sprintf("Upsert API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), - err, - info.Get(), - ) + err = status.WrapWithInternal( + fmt.Sprintf(vald.UpsertRPCName+" API ingress filter request to %v failure on id: %s\tvec: %v", addrs, req.GetVector().GetId(), req.GetVector().GetVector()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } if vec.GetId() == "" { vec.Id = req.GetVector().GetId() @@ -1560,18 +2966,30 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * req.Vector = vec loc, err = s.gateway.Upsert(ctx, req, s.copts...) if err != nil { - err = errors.Wrapf(err, "Upsert API failed to Upsert uuid = %s\tinfo = %#v", uuid, info.Get()) + err = status.WrapWithInternal(vald.UpsertRPCName+" API failed to Execute DoMulti ID = "+uuid, err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + log.Error(err) if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithInternal(fmt.Sprintf("Upsert API failed to Execute DoMulti error = %s", err.Error()), err, info.Get()) + return nil, err } return loc, nil } func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamUpsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamUpsertRPCName), apiName+"/"+vald.StreamUpsertRPCName) defer func() { if span != nil { span.End() @@ -1581,7 +2999,7 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) func() interface{} { return new(payload.Upsert_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Upsert_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamUpsert/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpsertRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1589,13 +3007,20 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }() res, err := s.Upsert(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpsertRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1611,8 +3036,11 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }) if err != nil { + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpsertRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -1621,7 +3049,7 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) } func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiUpsertRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiUpsertRPCName), apiName+"/"+vald.MultiUpsertRPCName) defer func() { if span != nil { span.End() @@ -1637,10 +3065,29 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiUpsertRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() + r, err := s.Upsert(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpsertRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1665,7 +3112,7 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ } func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (loc *payload.Object_Location, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.RemoveRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.RemoveRPCName), apiName+"/"+vald.RemoveRPCName) defer func() { if span != nil { span.End() @@ -1675,7 +3122,7 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (loc * } func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamRemoveRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamRemoveRPCName), apiName+"/"+vald.StreamRemoveRPCName) defer func() { if span != nil { span.End() @@ -1685,7 +3132,7 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) func() interface{} { return new(payload.Remove_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Remove_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamRemove/id-"+req.GetId().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamRemoveRPCName+"/id-"+req.GetId().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1693,13 +3140,20 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }() res, err := s.Remove(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.RemoveRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetId().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1715,8 +3169,11 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }) if err != nil { + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamRemoveRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err @@ -1725,7 +3182,7 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) } func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequest) (locs *payload.Object_Locations, errs error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiRemoveRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.MultiRemoveRPCName), apiName+"/"+vald.MultiRemoveRPCName) defer func() { if span != nil { span.End() @@ -1741,11 +3198,30 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ wg.Add(1) s.eg.Go(func() error { defer wg.Done() + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiRemoveRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) + defer func() { + if sspan != nil { + sspan.End() + } + }() r, err := s.Remove(ctx, query) if err != nil { - if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + st, msg, err := status.ParseError(err, codes.NotFound, + fmt.Sprintf(vald.MultiRemoveRPCName+" API ID = %v not found", query.GetId().GetId()), + &errdetails.RequestInfo{ + RequestId: query.GetId().GetId(), + ServingData: errdetails.Serialize(reqs), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + if sspan != nil { + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } + mu.Lock() if errs == nil { errs = status.WrapWithNotFound( @@ -1769,7 +3245,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ } func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorRequest) (vec *payload.Object_Vector, err error) { - ctx, span := trace.StartSpan(ctx, apiName+"/"+vald.GetObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(ctx, vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.GetObjectRPCName), apiName+"/"+vald.GetObjectRPCName) defer func() { if span != nil { span.End() @@ -1777,10 +3253,22 @@ func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorReques }() vec, err = s.gateway.GetObject(ctx, req) if err != nil { + err = status.WrapWithNotFound(vald.GetObjectRPCName+" API failed to extract vector from filter", err, + &errdetails.RequestInfo{ + RequestId: req.GetId().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } - return nil, status.WrapWithNotFound(fmt.Sprintf("GetObject API uuid %s Object not found", req.GetId().GetId()), err, info.Get()) + return nil, err } targets := req.GetFilters().GetTargets() if targets != nil || s.ObjectFilters != nil { @@ -1791,18 +3279,56 @@ func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorReques } c, err := s.egress.Target(ctx, addrs...) if err != nil { - return nil, status.WrapWithUnavailable(fmt.Sprintf("GetObject API egress filter targets %v not found on id %s", addrs, req.GetId().GetId()), err, info.Get()) + err = status.WrapWithUnavailable(vald.SearchObjectRPCName+" API target filter API unavailable", err, + &errdetails.RequestInfo{ + RequestId: req.GetId().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vectorizer targets", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeUnavailable(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } vec, err = c.FilterVector(ctx, vec) if err != nil { - return nil, status.WrapWithInternal(fmt.Sprintf("GetObject API egress filter request to %v failure on id %s", addrs, req.GetId().GetId()), err, info.Get()) + err = status.WrapWithInternal(vald.GetObjectRPCName+" API egress filter API failed", err, + &errdetails.RequestInfo{ + RequestId: req.GetId().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err } } return vec, nil } func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err error) { - ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamGetObjectRPCName) + ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.FilterRPCServiceName+"/"+vald.StreamSearchObjectRPCName), apiName+"/"+vald.StreamGetObjectRPCName) defer func() { if span != nil { span.End() @@ -1820,13 +3346,20 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }() res, err := s.GetObject(ctx, req) if err != nil { - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, errors.Wrap(err, "failed to parse grpc status from error").Error()) - err = errors.Wrap(st.Err(), err.Error()) - } + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.GetObjectRPCName+" gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetId().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get(), + ) if sspan != nil { - sspan.SetStatus(trace.StatusCodeInternal(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamVector{ Payload: &payload.Object_StreamVector_Status{ @@ -1843,7 +3376,9 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err if err != nil { if span != nil { - span.SetStatus(trace.StatusCodeInternal(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } log.Error(err) return err diff --git a/pkg/gateway/filter/handler/grpc/option.go b/pkg/gateway/filter/handler/grpc/option.go index 27df180765..7f55caeea8 100644 --- a/pkg/gateway/filter/handler/grpc/option.go +++ b/pkg/gateway/filter/handler/grpc/option.go @@ -18,12 +18,15 @@ package grpc import ( + "os" "runtime" "github.com/vdaas/vald/internal/client/v1/client/filter/egress" "github.com/vdaas/vald/internal/client/v1/client/filter/ingress" "github.com/vdaas/vald/internal/client/v1/client/vald" "github.com/vdaas/vald/internal/errgroup" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net" ) type Option func(*server) @@ -31,6 +34,32 @@ type Option func(*server) var defaultOptions = []Option{ WithErrGroup(errgroup.Get()), WithStreamConcurrency(runtime.GOMAXPROCS(-1) * 10), + WithName(func() string { + name, err := os.Hostname() + if err != nil { + log.Warn(err) + } + return name + }()), + WithIP(net.LoadLocalIP()), +} + +// WithIP returns the option to set the IP for server. +func WithIP(ip string) Option { + return func(s *server) { + if len(ip) != 0 { + s.ip = ip + } + } +} + +// WithName returns the option to set the name for server. +func WithName(name string) Option { + return func(s *server) { + if len(name) != 0 { + s.name = name + } + } } func WithIngressFilterClient(c ingress.Client) Option { diff --git a/pkg/gateway/filter/handler/grpc/option_test.go b/pkg/gateway/filter/handler/grpc/option_test.go index 6c003be646..d6626374ba 100644 --- a/pkg/gateway/filter/handler/grpc/option_test.go +++ b/pkg/gateway/filter/handler/grpc/option_test.go @@ -1430,3 +1430,239 @@ func TestWithUpsertFilterTargets(t *testing.T) { }) } } + +func TestWithIP(t *testing.T) { + // Change interface type to the type of object you are testing + type T = interface{} + type args struct { + ip string + } + type want struct { + obj *T + // Uncomment this line if the option returns an error, otherwise delete it + // err error + } + type test struct { + name string + args args + want want + // Use the first line if the option returns an error. otherwise use the second line + // checkFunc func(want, *T, error) error + // checkFunc func(want, *T) error + beforeFunc func(args) + afterFunc func(args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T, err error) error { + if !errors.Is(err, w.err) { + return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) + } + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + // Uncomment this block if the option do not returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T) error { + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + tests := []test{ + // TODO test cases + /* + { + name: "test_case_1", + args: args { + ip: "", + }, + want: want { + obj: new(T), + }, + }, + */ + + // TODO test cases + /* + func() test { + return test { + name: "test_case_2", + args: args { + ip: "", + }, + want: want { + obj: new(T), + }, + } + }(), + */ + } + + for _, tc := range tests { + test := tc + t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) + if test.beforeFunc != nil { + test.beforeFunc(test.args) + } + if test.afterFunc != nil { + defer test.afterFunc(test.args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + + got := WithIP(test.args.ip) + obj := new(T) + if err := checkFunc(test.want, obj, got(obj)); err != nil { + tt.Errorf("error = %v", err) + } + */ + + // Uncomment this block if the option do not return an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + got := WithIP(test.args.ip) + obj := new(T) + got(obj) + if err := checkFunc(test.want, obj); err != nil { + tt.Errorf("error = %v", err) + } + */ + }) + } +} + +func TestWithName(t *testing.T) { + // Change interface type to the type of object you are testing + type T = interface{} + type args struct { + name string + } + type want struct { + obj *T + // Uncomment this line if the option returns an error, otherwise delete it + // err error + } + type test struct { + name string + args args + want want + // Use the first line if the option returns an error. otherwise use the second line + // checkFunc func(want, *T, error) error + // checkFunc func(want, *T) error + beforeFunc func(args) + afterFunc func(args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T, err error) error { + if !errors.Is(err, w.err) { + return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) + } + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + // Uncomment this block if the option do not returns an error, otherwise delete it + /* + defaultCheckFunc := func(w want, obj *T) error { + if !reflect.DeepEqual(obj, w.obj) { + return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj) + } + return nil + } + */ + + tests := []test{ + // TODO test cases + /* + { + name: "test_case_1", + args: args { + name: "", + }, + want: want { + obj: new(T), + }, + }, + */ + + // TODO test cases + /* + func() test { + return test { + name: "test_case_2", + args: args { + name: "", + }, + want: want { + obj: new(T), + }, + } + }(), + */ + } + + for _, tc := range tests { + test := tc + t.Run(test.name, func(tt *testing.T) { + tt.Parallel() + defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) + if test.beforeFunc != nil { + test.beforeFunc(test.args) + } + if test.afterFunc != nil { + defer test.afterFunc(test.args) + } + + // Uncomment this block if the option returns an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + + got := WithName(test.args.name) + obj := new(T) + if err := checkFunc(test.want, obj, got(obj)); err != nil { + tt.Errorf("error = %v", err) + } + */ + + // Uncomment this block if the option do not return an error, otherwise delete it + /* + checkFunc := test.checkFunc + if test.checkFunc == nil { + checkFunc = defaultCheckFunc + } + got := WithName(test.args.name) + obj := new(T) + got(obj) + if err := checkFunc(test.want, obj); err != nil { + tt.Errorf("error = %v", err) + } + */ + }) + } +} diff --git a/pkg/gateway/internal/location/location.go b/pkg/gateway/internal/location/location.go index 5d3d3480de..0e479bd2dd 100644 --- a/pkg/gateway/internal/location/location.go +++ b/pkg/gateway/internal/location/location.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/pkg/gateway/internal/location/location_test.go b/pkg/gateway/internal/location/location_test.go index fbe9ca2636..fc9d1c595a 100644 --- a/pkg/gateway/internal/location/location_test.go +++ b/pkg/gateway/internal/location/location_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package location import ( diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go index 0cbb1a49c0..cc1fb884cc 100644 --- a/pkg/gateway/lb/handler/grpc/handler.go +++ b/pkg/gateway/lb/handler/grpc/handler.go @@ -22,6 +22,7 @@ import ( "fmt" "math" "math/big" + "strconv" "sync" "sync/atomic" "time" @@ -78,7 +79,7 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo uuid := meta.GetId() if len(uuid) == 0 { err = errors.ErrInvalidUUID(uuid) - err = status.WrapWithInvalidArgument(fmt.Sprintf("Exists API invalid argument for uuid \"%s\" detected", uuid), err, + err = status.WrapWithInvalidArgument(vald.ExistsRPCName+" API invalid argument for uuid \""+uuid+"\" detected", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(meta), @@ -92,12 +93,14 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo }, }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) log.Warn(err) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -110,7 +113,7 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo ctx, cancel = context.WithCancel(ctx) var once sync.Once ech <- s.gateway.BroadCast(ctx, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) error { - sctx, sspan := trace.StartSpan(ctx, apiName+".Exists/"+target) + sctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.ExistsRPCName+"/"+target) defer func() { if sspan != nil { sspan.End() @@ -124,19 +127,23 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeCancelled( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.Exists.BroadCast/" + - target + " canceled: " + err.Error())) + "/vald.v1." + vald.ExistsRPCName + ".BroadCast/" + + target + " canceled: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } return nil case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeDeadlineExceeded( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.Exists.BroadCast/" + - target + " deadline_exceeded: " + err.Error())) + "/vald.v1." + vald.ExistsRPCName + ".BroadCast/" + + target + " deadline_exceeded: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } return nil } @@ -144,17 +151,19 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo st *status.Status msg string ) - st, msg, err = status.ParseError(err, codes.NotFound, fmt.Sprintf("error Exists API meta %s's uuid not found", uuid), + st, msg, err = status.ParseError(err, codes.NotFound, "error "+vald.ExistsRPCName+" API meta "+uuid+"'s uuid not found", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(meta), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } if err != nil && st.Code() != codes.NotFound { return err @@ -181,17 +190,19 @@ func (s *server) Exists(ctx context.Context, meta *payload.Object_ID) (id *paylo if err == nil { err = errors.ErrObjectIDNotFound(uuid) } - st, msg, err := status.ParseError(err, codes.NotFound, fmt.Sprintf("error Exists API meta %s's uuid not found", uuid), + st, msg, err := status.ParseError(err, codes.NotFound, "error "+vald.ExistsRPCName+" API meta "+uuid+"'s uuid not found", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(meta), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err @@ -209,7 +220,7 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * vl := len(req.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("Search API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.SearchRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -223,7 +234,9 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * }, }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -246,16 +259,18 @@ func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res * }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Search gRPC error response", + "failed to parse "+vald.SearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Search", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -274,7 +289,7 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) uuid := req.GetId() if len(uuid) == 0 { err = errors.ErrInvalidMetaDataConfig - err = status.WrapWithInvalidArgument("SearchByID API invalid uuid", err, + err = status.WrapWithInvalidArgument(vald.SearchByIDRPCName+" API invalid uuid", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -288,11 +303,13 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) }, }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.SearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -319,13 +336,13 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) EgressFilters: cfg.GetEgressFilters(), } if err != nil { - _, _, err := status.ParseError(err, codes.NotFound, fmt.Sprintf("SearchByID API failed to get uuid %s's object", req.GetId()), + _, _, err := status.ParseError(err, codes.NotFound, vald.SearchByIDRPCName+" API failed to get uuid "+req.GetId()+"'s object", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(oreq), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) var serr error @@ -336,16 +353,18 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) return res, nil } err = errors.Wrap(err, serr.Error()) - st, msg, serr := status.ParseError(err, codes.Internal, "SearchByID API failed to process search request", + st, msg, serr := status.ParseError(err, codes.Internal, vald.SearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.SearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, errors.Wrap(err, serr.Error()) } @@ -354,12 +373,12 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) Config: scfg, }) if err != nil { - _, _, err := status.ParseError(err, codes.Internal, "SearchByID API failed to process search request", + _, _, err := status.ParseError(err, codes.Internal, vald.SearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Search", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName + "." + vald.SearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) var serr error @@ -369,17 +388,19 @@ func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) if serr == nil { return res, nil } - st, msg, serr := status.ParseError(serr, codes.Internal, "SearchByID API failed to process search request", + st, msg, serr := status.ParseError(serr, codes.Internal, vald.SearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.SearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.SearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) err = errors.Wrap(err, serr.Error()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -434,27 +455,33 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeCancelled( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.search.BroadCast/" + - target + " canceled: " + err.Error())) + target + " canceled: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeDeadlineExceeded( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.search.BroadCast/" + - target + " deadline_exceeded: " + err.Error())) + target + " deadline_exceeded: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } case err != nil: st, msg, err := status.ParseError(err, codes.Internal, "failed to parse search gRPC error response", &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Search", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.search", ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } switch st.Code() { case codes.Internal, @@ -465,11 +492,13 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, case r == nil || len(r.GetResults()) == 0: err = status.WrapWithNotFound("failed to process search request", errors.ErrEmptySearchResult, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Search", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.search", ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if sspan != nil { - sspan.SetStatus(trace.StatusCodeNotFound(err.Error())) + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } } for _, dist := range r.GetResults() { @@ -567,7 +596,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, }, info.Get(), ) if span != nil { - span.SetStatus(trace.StatusCodeDeadlineExceeded(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeDeadlineExceeded(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -585,7 +616,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, }, info.Get(), ) if span != nil { - span.SetStatus(trace.StatusCodeDeadlineExceeded(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeDeadlineExceeded(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -603,7 +636,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } log.Warn(err) if len(res.GetResults()) == 0 { @@ -624,7 +659,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -634,7 +671,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, err = errors.ErrInsuffcientSearchResult } if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } err = status.WrapWithNotFound( fmt.Sprintf("error search result length is not enough required: %d, found: %d", min, len(res.GetResults())), @@ -649,7 +688,9 @@ func (s *server) search(ctx context.Context, cfg *payload.Search_Config, }, info.Get(), ) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -672,7 +713,7 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) func() interface{} { return new(payload.Search_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamSearch/requestID-"+req.GetConfig().GetRequestId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamSearchRPCName+"/requestID-"+req.GetConfig().GetRequestId()) defer func() { if sspan != nil { sspan.End() @@ -680,9 +721,11 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) }() res, err := s.Search(ctx, data.(*payload.Search_Request)) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Search gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -699,9 +742,11 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse StreamSearch gRPC error response") + "failed to parse "+vald.StreamSearchRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -719,7 +764,7 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er func() interface{} { return new(payload.Search_IDRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_IDRequest) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamSearchByID/id-"+req.GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamSearchByIDRPCName+"/id-"+req.GetId()) defer func() { if sspan != nil { sspan.End() @@ -727,9 +772,11 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er }() res, err := s.SearchByID(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse SearchByID gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchByIDRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -746,9 +793,11 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse StreamSearchByID gRPC error response") + "failed to parse "+vald.StreamSearchByIDRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -775,7 +824,7 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ vl := len(req.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err := errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("MultiSearch API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.MultiSearchRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -789,14 +838,16 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } wg.Add(1) s.eg.Go(func() error { defer wg.Done() - ctx, sspan := trace.StartSpan(ctx, fmt.Sprintf("%s.MultiSearch/errgroup.Go/id-%d", apiName, idx)) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiSearchRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) defer func() { if sspan != nil { sspan.End() @@ -804,13 +855,15 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ }() r, err := s.Search(ctx, query) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Search gRPC error response", + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.SearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: query.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -827,17 +880,19 @@ func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequ } wg.Wait() if errs != nil { - st, msg, err := status.ParseError(errs, codes.Internal, "failed to parse MultiSearch gRPC error response", + st, msg, err := status.ParseError(errs, codes.Internal, "failed to parse "+vald.MultiSearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(rids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiSearch", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiSearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -863,7 +918,7 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi rids = append(rids, req.GetConfig().GetRequestId()) wg.Add(1) s.eg.Go(func() error { - sctx, sspan := trace.StartSpan(ctx, fmt.Sprintf("%s.MultiSearchByID/errgroup.Go/id-%d", apiName, idx)) + sctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiSearchByIDRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) defer func() { if span != nil { span.End() @@ -873,13 +928,15 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi r, err := s.SearchByID(sctx, query) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse SearchByID gRPC error response", + "failed to parse "+vald.SearchByIDRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: query.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -897,17 +954,19 @@ func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_Multi wg.Wait() if errs != nil { st, msg, err := status.ParseError(errs, codes.Internal, - "failed to parse MultiSearchByID gRPC error response", + "failed to parse "+vald.MultiSearchByIDRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(rids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiSearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiSearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -924,7 +983,7 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) vl := len(req.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("LinearSearch API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.LinearSearchRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -938,7 +997,9 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) }, }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -959,16 +1020,18 @@ func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse LinearSearch gRPC error response", + "failed to parse "+vald.LinearSearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.LinearSearch", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -986,7 +1049,7 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq }() if len(req.GetId()) == 0 { err = errors.ErrInvalidMetaDataConfig - err = status.WrapWithInvalidArgument("LinearSearchByID API invalid uuid", err, + err = status.WrapWithInvalidArgument(vald.LinearSearchByIDRPCName+" API invalid uuid", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -1000,7 +1063,9 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq }, }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1025,13 +1090,13 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq EgressFilters: cfg.GetEgressFilters(), } if err != nil { - _, _, err := status.ParseError(err, codes.NotFound, fmt.Sprintf("LinearSearchByID API failed to get uuid %s's object", req.GetId()), + _, _, err := status.ParseError(err, codes.NotFound, fmt.Sprintf(vald.LinearSearchByIDRPCName+" API failed to get uuid %s's object", req.GetId()), &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(oreq), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) var serr error @@ -1042,16 +1107,18 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq return res, nil } err = errors.Wrap(err, serr.Error()) - st, msg, serr := status.ParseError(err, codes.Internal, "LinearSearchByID API failed to process search request", + st, msg, serr := status.ParseError(err, codes.Internal, vald.LinearSearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.LinearSearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, errors.Wrap(err, serr.Error()) } @@ -1061,12 +1128,12 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq Config: scfg, }) if err != nil { - _, _, err := status.ParseError(err, codes.Internal, "LinearSearchByID API failed to process search request", + _, _, err := status.ParseError(err, codes.Internal, vald.LinearSearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.LinearSearch", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName + "." + vald.LinearSearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) var serr error @@ -1076,17 +1143,19 @@ func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDReq if serr == nil { return res, nil } - st, msg, serr := status.ParseError(serr, codes.Internal, "LinearSearchByID API failed to process search request", + st, msg, serr := status.ParseError(serr, codes.Internal, vald.LinearSearchByIDRPCName+" API failed to process search request", &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.LinearSearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.LinearSearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) err = errors.Wrap(err, serr.Error()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1104,7 +1173,7 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) func() interface{} { return new(payload.Search_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamLinearSearch/requestID-"+req.GetConfig().GetRequestId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamLinearSearchRPCName+"/requestID-"+req.GetConfig().GetRequestId()) defer func() { if sspan != nil { sspan.End() @@ -1112,9 +1181,11 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) }() res, err := s.LinearSearch(ctx, data.(*payload.Search_Request)) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse LinearSearch gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -1131,9 +1202,11 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse StreamLinearSearch gRPC error response") + "failed to parse "+vald.StreamLinearSearchRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -1151,7 +1224,7 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI func() interface{} { return new(payload.Search_IDRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Search_IDRequest) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamLinearSearchByID/id-"+req.GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamLinearSearchByIDRPCName+"/id-"+req.GetId()) defer func() { if sspan != nil { sspan.End() @@ -1159,9 +1232,11 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI }() res, err := s.LinearSearchByID(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse LinearSearchByID gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchByIDRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Search_StreamResponse{ Payload: &payload.Search_StreamResponse_Status{ @@ -1178,9 +1253,11 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse StreamLinearSearchByID gRPC error response") + "failed to parse "+vald.StreamLinearSearchByIDRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -1207,7 +1284,7 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul vl := len(req.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err := errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("MultiLinearSearch API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.MultiLinearSearchRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: req.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(req), @@ -1221,14 +1298,16 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } wg.Add(1) s.eg.Go(func() error { defer wg.Done() - ctx, sspan := trace.StartSpan(ctx, fmt.Sprintf("%s.MultiLinearSearch/errgroup.Go/id-%d", apiName, idx)) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiLinearSearchRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) defer func() { if sspan != nil { sspan.End() @@ -1236,13 +1315,15 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul }() r, err := s.LinearSearch(ctx, query) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse LinearSearch gRPC error response", + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.LinearSearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: query.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1259,17 +1340,19 @@ func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_Mul } wg.Wait() if errs != nil { - st, msg, err := status.ParseError(errs, codes.Internal, "failed to parse MultiLinearSearch gRPC error response", + st, msg, err := status.ParseError(errs, codes.Internal, "failed to parse "+vald.MultiLinearSearchRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(rids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiLinearSearch", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiLinearSearchRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1295,23 +1378,25 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search rids = append(rids, req.GetConfig().GetRequestId()) wg.Add(1) s.eg.Go(func() error { - sctx, sspan := trace.StartSpan(ctx, fmt.Sprintf("%s.MultiLinearSearchByID/errgroup.Go/id-%d", apiName, idx)) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.MultiLinearSearchByIDRPCName+"/errgroup.Go/id-"+strconv.Itoa(idx)) defer func() { - if span != nil { - span.End() + if sspan != nil { + sspan.End() } }() defer wg.Done() - r, err := s.LinearSearchByID(sctx, query) + r, err := s.LinearSearchByID(ctx, query) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse LinearSearchByID gRPC error response", + "failed to parse "+vald.LinearSearchByIDRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: query.GetConfig().GetRequestId(), ServingData: errdetails.Serialize(query), }) if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } mu.Lock() if errs == nil { @@ -1329,17 +1414,19 @@ func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search wg.Wait() if errs != nil { st, msg, err := status.ParseError(errs, codes.Internal, - "failed to parse MultiLinearSearchByID gRPC error response", + "failed to parse "+vald.MultiLinearSearchByIDRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(rids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiLinearSearchByID", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiLinearSearchByIDRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1356,7 +1443,7 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p uuid := req.GetVector().GetId() if len(uuid) == 0 { err = errors.ErrInvalidMetaDataConfig - err = status.WrapWithInvalidArgument("Insert API invalid uuid", err, + err = status.WrapWithInvalidArgument(vald.InsertRPCName+" API invalid uuid", err, &errdetails.RequestInfo{ ServingData: errdetails.Serialize(req), }, @@ -1369,11 +1456,13 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p }, }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Insert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1381,7 +1470,7 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p vl := len(vec) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("Insert API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.InsertRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), @@ -1395,7 +1484,9 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1408,17 +1499,19 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p err = errors.ErrMetaDataAlreadyExists(uuid) } st, msg, err := status.ParseError(err, codes.AlreadyExists, - fmt.Sprintf("error Insert API ID = %v already exists", uuid), + "error "+vald.InsertRPCName+" API ID = "+uuid+" already exists", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName + "." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1447,7 +1540,7 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p emu := new(sync.Mutex) var errs error err = s.gateway.DoMulti(ctx, s.replica, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) (err error) { - ctx, span := trace.StartSpan(ctx, apiName+".Insert/"+target) + ctx, span := trace.StartSpan(ctx, apiName+"."+vald.InsertRPCName+"/"+target) defer func() { if span != nil { span.End() @@ -1459,34 +1552,40 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if span != nil { - span.SetStatus(trace.StatusCodeCancelled( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.Insert.DoMulti/" + - target + " canceled: " + err.Error())) + "/vald.v1." + vald.InsertRPCName + ".DoMulti/" + + target + " canceled: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if span != nil { - span.SetStatus(trace.StatusCodeDeadlineExceeded( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.Insert.DoMulti/" + - target + " deadline_exceeded: " + err.Error())) + "/vald.v1." + vald.InsertRPCName + ".DoMulti/" + + target + " deadline_exceeded: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil } st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Insert gRPC error response", + "failed to parse "+vald.InsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Insert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } if err != nil && st.Code() != codes.AlreadyExists { emu.Lock() @@ -1515,17 +1614,19 @@ func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (ce *p } if errs != nil { st, msg, err := status.ParseError(errs, codes.Internal, - "failed to parse Insert gRPC error response", + "failed to parse "+vald.InsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Insert.DoMulti", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.InsertRPCName + ".DoMulti", ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1544,7 +1645,7 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) func() interface{} { return new(payload.Insert_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Insert_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamInsert/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamInsertRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1552,9 +1653,11 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }() res, err := s.Insert(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Insert gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.InsertRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1570,9 +1673,11 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamInsert gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamInsertRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -1595,7 +1700,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ vl := len(vector) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("MultiInsert API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.MultiInsertRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(reqs), @@ -1609,7 +1714,9 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1622,17 +1729,19 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ err = errors.ErrMetaDataAlreadyExists(uuid) } st, msg, err := status.ParseError(err, codes.AlreadyExists, - fmt.Sprintf("error MultiInsert API ID = %v already exists", uuid), + "error "+vald.MultiInsertRPCName+" API ID = "+uuid+" already exists", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiInsertRPCName + "." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1662,7 +1771,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ emu := new(sync.Mutex) var errs error err = s.gateway.DoMulti(ctx, s.replica, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) (err error) { - ctx, span := trace.StartSpan(ctx, apiName+".MultiInsert/"+target) + ctx, span := trace.StartSpan(ctx, apiName+"."+vald.MultiInsertRPCName+"/"+target) defer func() { if span != nil { span.End() @@ -1674,34 +1783,40 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if span != nil { - span.SetStatus(trace.StatusCodeCancelled( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.MultiInsert.DoMulti/" + - target + " canceled: " + err.Error())) + "/vald.v1." + vald.MultiInsertRPCName + ".DoMulti/" + + target + " canceled: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if span != nil { - span.SetStatus(trace.StatusCodeDeadlineExceeded( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.MultiInsert.DoMulti/" + - target + " deadline_exceeded: " + err.Error())) + "/vald.v1." + vald.MultiInsertRPCName + ".DoMulti/" + + target + " deadline_exceeded: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil } st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse MultiInsert gRPC error response", + "failed to parse "+vald.MultiInsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiInsert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiInsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } if err != nil { @@ -1730,17 +1845,19 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ if errs != nil { st, msg, err := status.ParseError(errs, codes.Internal, - "failed to parse MultiInsert gRPC error response", + "failed to parse "+vald.MultiInsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ", "), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiInsert.DoMulti", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiInsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1757,7 +1874,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * uuid := req.GetVector().GetId() if len(uuid) == 0 { err = errors.ErrInvalidMetaDataConfig - err = status.WrapWithInvalidArgument("Update API invalid uuid", err, + err = status.WrapWithInvalidArgument(vald.UpdateRPCName+" API invalid uuid", err, &errdetails.RequestInfo{ ServingData: errdetails.Serialize(req), }, @@ -1770,11 +1887,13 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * }, }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Update", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName, ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1782,7 +1901,7 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * vl := len(vec) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("Update API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.UpdateRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), @@ -1796,7 +1915,9 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1812,17 +1933,19 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * err = errors.ErrObjectIDNotFound(uuid) } st, msg, err := status.ParseError(err, codes.NotFound, - fmt.Sprintf("error Update API ID = %v not fount", uuid), + "error "+vald.UpdateRPCName+" API ID = "+uuid+" not found", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Update.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1831,17 +1954,19 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * err = errors.ErrSameVectorAlreadyExists(uuid, vec.GetVector(), req.GetVector().GetVector()) } st, msg, err := status.ParseError(err, codes.AlreadyExists, - fmt.Sprintf("error Update API ID = %v's same vector data already exists", uuid), + "error "+vald.UpdateRPCName+" API ID = "+uuid+"'s same vector data already exists", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1870,17 +1995,19 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * res, err = s.Remove(ctx, rreq) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Remove for Update gRPC error response", + "failed to parse "+vald.RemoveRPCName+" for "+vald.UpdateRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(rreq), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Update.Remove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName + "." + vald.RemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -1896,17 +2023,19 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * res, err = s.Insert(ctx, ireq) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Insert for Update gRPC error response", + "failed to parse "+vald.InsertRPCName+" for "+vald.UpdateRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(ireq), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Update.Insert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpdateRPCName + "." + vald.InsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err @@ -1925,7 +2054,7 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) func() interface{} { return new(payload.Update_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Update_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamUpdate/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpdateRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -1933,9 +2062,11 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }() res, err := s.Update(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Update gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpdateRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -1951,9 +2082,11 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpdate gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpdateRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -1976,7 +2109,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ vl := len(req.GetVector().GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("MultiUpdate API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.MultiUpdateRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: req.GetVector().GetId(), ServingData: errdetails.Serialize(reqs), @@ -1990,7 +2123,9 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2006,17 +2141,19 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ err = errors.ErrObjectIDNotFound(uuid) } st, msg, err := status.ParseError(err, codes.NotFound, - fmt.Sprintf("error MultiUpdate API ID = %v not fount", uuid), + "error "+vald.MultiUpdateRPCName+" API ID = "+uuid+" not fount", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiUpdate.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiUpdateRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2061,37 +2198,41 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse MultiRemove for MultiUpdate gRPC error response", + "failed to parse "+vald.MultiRemoveRPCName+" for "+vald.MultiUpdateRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(rreqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiUpdate.MultiRemove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiUpdateRPCName + "." + vald.MultiRemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } - log.Debugf("uuids %v were removed from %v due to MultiUpdate. MultiInsert will be executed for them soon. Please see detail %#v", ids, locs.GetLocations(), locs) + log.Debugf("uuids %v were removed from %v due to MultiUpdate. "+vald.MultiInsertRPCName+" will be executed for them soon. Please see detail %#v", ids, locs.GetLocations(), locs) locs, err = s.MultiInsert(ctx, &payload.Insert_MultiRequest{ Requests: ireqs, }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse MultiInsert for MultiUpdate gRPC error response", + "failed to parse "+vald.MultiInsertRPCName+" for "+vald.MultiUpdateRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(ireqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiUpdate.MultiInsert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiUpdateRPCName + "." + vald.MultiInsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2110,7 +2251,7 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * uuid := vec.GetId() if len(uuid) == 0 { err = errors.ErrInvalidMetaDataConfig - err = status.WrapWithInvalidArgument("Upsert API invalid uuid", err, + err = status.WrapWithInvalidArgument(vald.UpsertRPCName+" API invalid uuid", err, &errdetails.RequestInfo{ ServingData: errdetails.Serialize(req), }, @@ -2123,11 +2264,13 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * }, }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Upsert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), }) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2135,7 +2278,7 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * vl := len(vec.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("Upsert API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.UpsertRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), @@ -2149,7 +2292,9 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2167,17 +2312,19 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * err = errors.ErrSameVectorAlreadyExists(uuid, vec.GetVector(), req.GetVector().GetVector()) } st, msg, err := status.ParseError(err, codes.AlreadyExists, - fmt.Sprintf("error Update for Upsert API ID = %v's same vector data already exists", uuid), + "error "+vald.UpdateRPCName+" for "+vald.UpsertRPCName+" API ID = "+uuid+"'s same vector data already exists", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName + "." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2190,7 +2337,7 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * var operation string if shouldInsert { - operation = "Insert" + operation = vald.InsertRPCName loc, err = s.Insert(ctx, &payload.Insert_Request{ Vector: vec, Config: &payload.Insert_Config{ @@ -2200,7 +2347,7 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * }, }) } else { - operation = "Update" + operation = vald.UpdateRPCName loc, err = s.Update(ctx, &payload.Update_Request{ Vector: vec, Config: &payload.Update_Config{ @@ -2213,17 +2360,19 @@ func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc * if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse "+operation+" for Upsert gRPC error response", + "failed to parse "+operation+" for "+vald.UpsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Upsert." + operation, + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.UpsertRPCName + "." + operation, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2241,7 +2390,7 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) func() interface{} { return new(payload.Upsert_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Upsert_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamUpsert/id-"+req.GetVector().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamUpsertRPCName+"/id-"+req.GetVector().GetId()) defer func() { if sspan != nil { sspan.End() @@ -2249,9 +2398,11 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }() res, err := s.Upsert(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Upsert gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.UpsertRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -2267,9 +2418,11 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpdate gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpsertRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -2294,7 +2447,7 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ vl := len(vec.GetVector()) if vl < algorithm.MinimumVectorDimensionSize { err = errors.ErrInvalidDimensionSize(vl, 0) - err = status.WrapWithInvalidArgument("MultiUpsert API invalid vector argument", err, + err = status.WrapWithInvalidArgument(vald.MultiUpsertRPCName+" API invalid vector argument", err, &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), @@ -2308,7 +2461,9 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ }, }, info.Get()) if span != nil { - span.SetStatus(trace.StatusCodeInvalidArgument(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2426,17 +2581,19 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse MultiUpsert gRPC error response", + "failed to parse "+vald.MultiUpsertRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiUpsert", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiUpsertRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2459,17 +2616,19 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (locs err = errors.ErrObjectIDNotFound(id.GetId()) } st, msg, err := status.ParseError(err, codes.NotFound, - fmt.Sprintf("error Remove API ID = %v not found", id.GetId()), + "error "+vald.RemoveRPCName+" API ID = "+id.GetId()+" not found", &errdetails.RequestInfo{ RequestId: id.GetId(), ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName + "." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2495,7 +2654,7 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (locs Ips: make([]string, 0, s.replica), } err = s.gateway.BroadCast(ctx, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) (err error) { - ctx, span := trace.StartSpan(ctx, apiName+".Remove/"+target) + ctx, span := trace.StartSpan(ctx, apiName+"."+vald.RemoveRPCName+"/"+target) defer func() { if span != nil { span.End() @@ -2504,17 +2663,19 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (locs loc, err := vc.Remove(ctx, req, copts...) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Remove gRPC error response", + "failed to parse "+vald.RemoveRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: id.GetId(), ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Remove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } if err != nil && st.Code() != codes.NotFound { log.Error(err) @@ -2530,33 +2691,37 @@ func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (locs }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse Remove gRPC error response", + "failed to parse "+vald.RemoveRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: id.GetId(), ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Remove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } if len(locs.Ips) <= 0 { err = errors.ErrIndexNotFound - err = status.WrapWithNotFound("Remove API remove target not found", err, + err = status.WrapWithNotFound(vald.RemoveRPCName+" API remove target not found", err, &errdetails.RequestInfo{ RequestId: id.GetId(), ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Remove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.RemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2574,7 +2739,7 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) func() interface{} { return new(payload.Remove_Request) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Remove_Request) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamRemove/id-"+req.GetId().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamRemoveRPCName+"/id-"+req.GetId().GetId()) defer func() { if sspan != nil { sspan.End() @@ -2582,9 +2747,11 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }() res, err := s.Remove(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Remove gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.RemoveRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamLocation{ Payload: &payload.Object_StreamLocation_Status{ @@ -2600,9 +2767,11 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamRemove gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamRemoveRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return err } @@ -2629,17 +2798,19 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ err = errors.ErrObjectIDNotFound(id.GetId()) } st, msg, err := status.ParseError(err, codes.NotFound, - fmt.Sprintf("MultiRemove API ID = %v not found", id.GetId()), + fmt.Sprintf(vald.MultiRemoveRPCName+" API ID = %v not found", id.GetId()), &errdetails.RequestInfo{ RequestId: id.GetId(), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.Exists", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiRemoveRPCName + "." + vald.ExistsRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2665,7 +2836,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ Locations: make([]*payload.Object_Location, 0, len(reqs.GetRequests())), } err = s.gateway.BroadCast(ctx, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) error { - ctx, span := trace.StartSpan(ctx, apiName+".MultiRemove/"+target) + ctx, span := trace.StartSpan(ctx, apiName+"."+vald.MultiRemoveRPCName+"/"+target) defer func() { if span != nil { span.End() @@ -2677,19 +2848,23 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if span != nil { - span.SetStatus(trace.StatusCodeCancelled( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.MultiRemove.BroadCast/" + - target + " canceled: " + err.Error())) + "/vald.v1." + vald.MultiRemoveRPCName + ".BroadCast/" + + target + " canceled: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if span != nil { - span.SetStatus(trace.StatusCodeDeadlineExceeded( + span.RecordError(err) + span.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.MultiRemove.BroadCast/" + - target + " deadline_exceeded: " + err.Error())) + "/vald.v1." + vald.MultiRemoveRPCName + ".BroadCast/" + + target + " deadline_exceeded: " + err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil } @@ -2700,11 +2875,13 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiRemove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiRemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } if err != nil && st.Code() != codes.NotFound { @@ -2720,33 +2897,37 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ }) if err != nil { st, msg, err := status.ParseError(err, codes.Internal, - "failed to parse MultiRemove gRPC error response", + "failed to parse "+vald.MultiRemoveRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiRemove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiRemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } if len(locs.Locations) <= 0 { err = errors.ErrIndexNotFound - err = status.WrapWithNotFound("MultiRemove API remove target not found", err, + err = status.WrapWithNotFound(vald.MultiRemoveRPCName+" API remove target not found", err, &errdetails.RequestInfo{ RequestId: strings.Join(ids, ","), ServingData: errdetails.Serialize(reqs), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.MultiRemove", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.MultiRemoveRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }) if span != nil { - span.SetStatus(trace.StatusCodeNotFound(err.Error())) + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2769,7 +2950,7 @@ func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorReques ctx, cancel = context.WithCancel(ctx) var once sync.Once ech <- s.gateway.BroadCast(ctx, func(ctx context.Context, target string, vc vald.Client, copts ...grpc.CallOption) error { - sctx, sspan := trace.StartSpan(ctx, apiName+".GetObject/"+target) + sctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.GetObjectRPCName+"/"+target) defer func() { if span != nil { sspan.End() @@ -2781,35 +2962,41 @@ func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorReques case errors.Is(err, context.Canceled), errors.Is(err, errors.ErrRPCCallFailed(target, context.Canceled)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeCancelled( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeCancelled( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.GetObject.BroadCast/" + - target + " canceled: " + err.Error())) + "/vald.v1." + vald.GetObjectRPCName + ".BroadCast/" + + target + " canceled: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } return nil case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errors.ErrRPCCallFailed(target, context.DeadlineExceeded)): if sspan != nil { - sspan.SetStatus(trace.StatusCodeDeadlineExceeded( + sspan.RecordError(err) + sspan.SetAttributes(trace.StatusCodeDeadlineExceeded( errdetails.ValdGRPCResourceTypePrefix + - "/vald.v1.GetObject.BroadCast/" + - target + " deadline_exceeded: " + err.Error())) + "/vald.v1." + vald.GetObjectRPCName + ".BroadCast/" + + target + " deadline_exceeded: " + err.Error())...) + sspan.SetStatus(trace.StatusError, err.Error()) } return nil } uuid := req.GetId().GetId() st, msg, err := status.ParseError(err, codes.NotFound, - fmt.Sprintf("GetObject API ID = %s not found", uuid), + vald.GetObjectRPCName+" API ID = "+uuid+"'s not found", &errdetails.RequestInfo{ RequestId: uuid, ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %s", apiName, s.name, s.ip, target), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } if err != nil && st.Code() != codes.NotFound { return err @@ -2835,17 +3022,19 @@ func (s *server) GetObject(ctx context.Context, req *payload.Object_VectorReques if err != nil || vec == nil || vec.GetId() == "" || vec.GetVector() == nil { err = errors.ErrObjectNotFound(err, req.GetId().GetId()) st, msg, err := status.ParseError(err, codes.NotFound, - "failed to parse GetObject gRPC error response", + "failed to parse "+vald.GetObjectRPCName+" gRPC error response", &errdetails.RequestInfo{ RequestId: req.GetId().GetId(), ServingData: errdetails.Serialize(req), }, &errdetails.ResourceInfo{ - ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1.GetObject", + ResourceType: errdetails.ValdGRPCResourceTypePrefix + "/vald.v1." + vald.GetObjectRPCName, ResourceName: fmt.Sprintf("%s: %s(%s) to %v", apiName, s.name, s.ip, s.gateway.Addrs(ctx)), }, info.Get()) if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) } return nil, err } @@ -2863,7 +3052,7 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err func() interface{} { return new(payload.Object_VectorRequest) }, func(ctx context.Context, data interface{}) (interface{}, error) { req := data.(*payload.Object_VectorRequest) - ctx, sspan := trace.StartSpan(ctx, apiName+".StreamGetObject/id-"+req.GetId().GetId()) + ctx, sspan := trace.StartSpan(ctx, apiName+"."+vald.StreamGetObjectRPCName+"/id-"+req.GetId().GetId()) defer func() { if sspan != nil { sspan.End() @@ -2871,9 +3060,11 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }() res, err := s.GetObject(ctx, req) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse GetObject gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.GetObjectRPCName+" gRPC error response") if sspan != nil { - sspan.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + sspan.RecordError(err) + sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + sspan.SetStatus(trace.StatusError, err.Error()) } return &payload.Object_StreamVector{ Payload: &payload.Object_StreamVector_Status{ @@ -2889,9 +3080,12 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }) if err != nil { - st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamGetObject gRPC error response") + st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamGetObjectRPCName+" gRPC error response") if span != nil { - span.SetStatus(trace.FromGRPCStatus(st.Code(), msg)) + span.RecordError(err) + span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...) + span.SetStatus(trace.StatusError, err.Error()) + } return err } diff --git a/pkg/tools/cli/loadtest/assets/dataset.go b/pkg/tools/cli/loadtest/assets/dataset.go index f5bf66b934..2e1a8b7429 100644 --- a/pkg/tools/cli/loadtest/assets/dataset.go +++ b/pkg/tools/cli/loadtest/assets/dataset.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/dataset_test.go b/pkg/tools/cli/loadtest/assets/dataset_test.go index cf5da19279..f81704931f 100644 --- a/pkg/tools/cli/loadtest/assets/dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/dataset_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/hdf5_loader.go b/pkg/tools/cli/loadtest/assets/hdf5_loader.go index 5c7d48532e..de03692932 100644 --- a/pkg/tools/cli/loadtest/assets/hdf5_loader.go +++ b/pkg/tools/cli/loadtest/assets/hdf5_loader.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go b/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go index 88166a11d6..c0ef35e574 100644 --- a/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go +++ b/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/large_dataset.go b/pkg/tools/cli/loadtest/assets/large_dataset.go index d526cede1c..0b437e2674 100644 --- a/pkg/tools/cli/loadtest/assets/large_dataset.go +++ b/pkg/tools/cli/loadtest/assets/large_dataset.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/large_dataset_test.go b/pkg/tools/cli/loadtest/assets/large_dataset_test.go index efe216dec0..06965df027 100644 --- a/pkg/tools/cli/loadtest/assets/large_dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/large_dataset_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/small_dataset.go b/pkg/tools/cli/loadtest/assets/small_dataset.go index 62a54ba1c1..84c29c3a83 100644 --- a/pkg/tools/cli/loadtest/assets/small_dataset.go +++ b/pkg/tools/cli/loadtest/assets/small_dataset.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/small_dataset_test.go b/pkg/tools/cli/loadtest/assets/small_dataset_test.go index aaefe616a1..61de70361b 100644 --- a/pkg/tools/cli/loadtest/assets/small_dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/small_dataset_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package assets import ( diff --git a/pkg/tools/cli/loadtest/service/insert.go b/pkg/tools/cli/loadtest/service/insert.go index db6e859bc6..561f538be7 100644 --- a/pkg/tools/cli/loadtest/service/insert.go +++ b/pkg/tools/cli/loadtest/service/insert.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/insert_test.go b/pkg/tools/cli/loadtest/service/insert_test.go index 957a0685d9..4f31722e17 100644 --- a/pkg/tools/cli/loadtest/service/insert_test.go +++ b/pkg/tools/cli/loadtest/service/insert_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader.go b/pkg/tools/cli/loadtest/service/loader.go index c056b9ee6b..f5cff37fba 100644 --- a/pkg/tools/cli/loadtest/service/loader.go +++ b/pkg/tools/cli/loadtest/service/loader.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader_option.go b/pkg/tools/cli/loadtest/service/loader_option.go index 1ae5c40c94..4da3fb5d38 100644 --- a/pkg/tools/cli/loadtest/service/loader_option.go +++ b/pkg/tools/cli/loadtest/service/loader_option.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader_option_test.go b/pkg/tools/cli/loadtest/service/loader_option_test.go index bc1f5f238c..e9cd2e1f5f 100644 --- a/pkg/tools/cli/loadtest/service/loader_option_test.go +++ b/pkg/tools/cli/loadtest/service/loader_option_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader_test.go b/pkg/tools/cli/loadtest/service/loader_test.go index bdf14e1309..2689f013d9 100644 --- a/pkg/tools/cli/loadtest/service/loader_test.go +++ b/pkg/tools/cli/loadtest/service/loader_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/search.go b/pkg/tools/cli/loadtest/service/search.go index 5b19a358bc..d73ac8b3fd 100644 --- a/pkg/tools/cli/loadtest/service/search.go +++ b/pkg/tools/cli/loadtest/service/search.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/pkg/tools/cli/loadtest/service/search_test.go b/pkg/tools/cli/loadtest/service/search_test.go index 5ff06aaea0..2493796784 100644 --- a/pkg/tools/cli/loadtest/service/search_test.go +++ b/pkg/tools/cli/loadtest/service/search_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package service import ( diff --git a/tests/e2e/crud/crud_test.go b/tests/e2e/crud/crud_test.go index 3ec1deed98..2dd9d55fd4 100644 --- a/tests/e2e/crud/crud_test.go +++ b/tests/e2e/crud/crud_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/hdf5/hdf5.go b/tests/e2e/hdf5/hdf5.go index 5c9083cf0e..273a4b1cf2 100644 --- a/tests/e2e/hdf5/hdf5.go +++ b/tests/e2e/hdf5/hdf5.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/kubernetes/client/client.go b/tests/e2e/kubernetes/client/client.go index 5dd261b415..29905d37e3 100644 --- a/tests/e2e/kubernetes/client/client.go +++ b/tests/e2e/kubernetes/client/client.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/kubernetes/portforward/portforward.go b/tests/e2e/kubernetes/portforward/portforward.go index 622d9ff0a1..37627c746c 100644 --- a/tests/e2e/kubernetes/portforward/portforward.go +++ b/tests/e2e/kubernetes/portforward/portforward.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/multiapis/multiapis_test.go b/tests/e2e/multiapis/multiapis_test.go index 24bbbfa1f1..035b0f1f68 100644 --- a/tests/e2e/multiapis/multiapis_test.go +++ b/tests/e2e/multiapis/multiapis_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/operation/doc.go b/tests/e2e/operation/doc.go index edc3e17c2d..0a3ac5b6fc 100644 --- a/tests/e2e/operation/doc.go +++ b/tests/e2e/operation/doc.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/operation/multi.go b/tests/e2e/operation/multi.go index 1f263760ba..7c0addbcab 100644 --- a/tests/e2e/operation/multi.go +++ b/tests/e2e/operation/multi.go @@ -1,21 +1,18 @@ //go:build e2e -// +build e2e -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/tests/e2e/operation/operation.go b/tests/e2e/operation/operation.go index c5c5227642..4213759f87 100644 --- a/tests/e2e/operation/operation.go +++ b/tests/e2e/operation/operation.go @@ -1,21 +1,18 @@ //go:build e2e -// +build e2e -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/tests/e2e/operation/stream.go b/tests/e2e/operation/stream.go index 19069c4af5..dfb1f3d71c 100644 --- a/tests/e2e/operation/stream.go +++ b/tests/e2e/operation/stream.go @@ -1,21 +1,18 @@ //go:build e2e -// +build e2e -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package operation import ( diff --git a/tests/e2e/performance/max_vector_dim_test.go b/tests/e2e/performance/max_vector_dim_test.go index b42a993f4b..71c7c14fec 100644 --- a/tests/e2e/performance/max_vector_dim_test.go +++ b/tests/e2e/performance/max_vector_dim_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/e2e/sidecar/sidecar_test.go b/tests/e2e/sidecar/sidecar_test.go index 230ea13f83..5f5b8d49f9 100644 --- a/tests/e2e/sidecar/sidecar_test.go +++ b/tests/e2e/sidecar/sidecar_test.go @@ -1,5 +1,4 @@ //go:build e2e -// +build e2e // // Copyright (C) 2019-2022 vdaas.org vald team diff --git a/tests/performance/max_vector_dim_test.go b/tests/performance/max_vector_dim_test.go index 65a4aa8149..25962b80e6 100644 --- a/tests/performance/max_vector_dim_test.go +++ b/tests/performance/max_vector_dim_test.go @@ -1,18 +1,16 @@ -// // Copyright (C) 2019-2022 vdaas.org vald team // // 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 // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://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. -// package performance import ( diff --git a/versions/GO_VERSION b/versions/GO_VERSION index b9fb27ab4f..bc4493477a 100644 --- a/versions/GO_VERSION +++ b/versions/GO_VERSION @@ -1 +1 @@ -1.18.3 +1.19 diff --git a/versions/OPERATOR_SDK_VERSION b/versions/OPERATOR_SDK_VERSION index 7999cbb5e5..49a8e27b23 100644 --- a/versions/OPERATOR_SDK_VERSION +++ b/versions/OPERATOR_SDK_VERSION @@ -1 +1 @@ -v1.22 +v1.23