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 7fd2428b68..ce58bc9f84 100644
Binary files a/internal/test/data/backup/100index/grp and b/internal/test/data/backup/100index/grp differ
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 b6092c6b31..0000000000
Binary files a/internal/test/data/backup/100index/ngt-meta.kvsdb and /dev/null differ
diff --git a/internal/test/data/backup/100index/obj b/internal/test/data/backup/100index/obj
index c2af6b5395..1b1cb4d44c 100644
Binary files a/internal/test/data/backup/100index/obj and b/internal/test/data/backup/100index/obj differ
diff --git a/internal/test/data/backup/100index/prf b/internal/test/data/backup/100index/prf
index c271714025..f08f25b718 100644
--- a/internal/test/data/backup/100index/prf
+++ b/internal/test/data/backup/100index/prf
@@ -3,11 +3,11 @@ BatchSizeForCreation 200
BuildTimeLimit 0
DatabaseType Memory
Dimension 784
-DistanceType L2
+DistanceType Angle
DynamicEdgeSizeBase 30
DynamicEdgeSizeRate 20
-EdgeSizeForCreation 20
-EdgeSizeForSearch 10
+EdgeSizeForCreation 0
+EdgeSizeForSearch 0
EdgeSizeLimitForCreation 5
EpsilonForCreation 0.1
GraphType ANNG
diff --git a/internal/test/data/backup/100index/tre b/internal/test/data/backup/100index/tre
index 8e27a21768..f9f6340605 100644
Binary files a/internal/test/data/backup/100index/tre and b/internal/test/data/backup/100index/tre differ
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