Tony.Chen

Results 14 issues of Tony.Chen

Failed to parse sampling strategy response: json: cannot unmarshal string into Go struct field SamplingStrategyResponse.strategyType of type api_v2.SamplingStrategyType: ```json {"strategyType":"PROBABILISTIC","probabilisticSampling":{"samplingRate":1},"operationSampling":{"defaultSamplingProbability":1,"defaultLowerBoundTracesPerSecond":0,"perOperationStrategies":[{"operation":"/health","probabilisticSampling":{"samplingRate":0}},{"operation":"/metrics","probabilisticSampling":{"samplingRate":0}}}],"defaultUpperBoundTracesPerSecond":0}} ```

Skip Changelog

### Feature-request ### Proposal middleware registry,类似 [gateway registry](https://github.com/go-kratos/gateway/blob/main/middleware/registry.go),可以通过名称进行注册管理; yaml 配置,并且通过 对应名称的 middleware,这个 yaml 配置将会放到 proto 相同目录,通过工具生成配置注册; selector,通过 operation 进行匹配选择对应的 middleware。 例子: ```yaml type: google.api.Service config_version: 3 name: library-example.googleapis.com title: Example...

proposal

### Feature-request ### Proposal 通过 `google/api/client.proto` 进行 default_host 并使用 protoc-gen-kratos 生成 Client,例如: ```proto import "google/api/client.proto"; // The hostname for this service. // This should be specified with no prefix or...

proposal

Incompatible behavior changes: - v2.3.1 Registry Endpoint: - #2076 #2071 - v2.3.0 WithLogger Option: - https://github.com/go-kratos/kratos/pull/2061 - `config.WithLogger/http.WithLogger/grpc.WithLogger` use `log.Info()` instead.

api change

# Preface Thanks to everyone’s efforts in the first half of this year, framework of **kratos v2** has been basically completed. Next, kratos will carry out deep cultivation in the...

enhancement
feature

implement is based on gRPC health check API: https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto Health Status: * UNKNOWN * SERVING * NOT_SERVING * SERVICE_UNKNOWN There should be a health package in kratos for HTTP/gRPC health...

feature

![image](https://user-images.githubusercontent.com/3871120/90946270-d67f9b80-e45d-11ea-9a6e-1fed142eef67.png) 通过gRPC客户端请求HTTP2,Response Trailers丢失: rpc error: code = Internal desc = server closed the stream without sending trailers

content-type: - application/x-protobuf - application/x-google-protobuf - application/grpc - application/grpc+json 如果是gRPC需要去除body前面【5bytes】 = 【1 gzip-flag + 4 length】(因为streaming需要body header实现 https://github.com/uw-labs/bloomrpc ![image](https://user-images.githubusercontent.com/3871120/90946434-49d5dd00-e45f-11ea-97aa-838e82793c88.png) https://www.charlesproxy.com/documentation/using-charles/protocol-buffers/ https://docs.proxyman.io/advanced-features/protobuf 推荐个很不错的UI参考:https://proxyman.io/

https://github.com/tonybase/benchmark/tree/main/benchmark-protobuf-json: ``` ➜ benchmark-protobuf-json git:(main) go test -bench=. -benchmem goos: darwin goarch: amd64 pkg: github.com/tonybase/benchmark/benchmark-protobuf-json cpu: Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz BenchmarkOrderProto3Marshal-8 3230240 352.5 ns/op 112 B/op 1 allocs/op...

performance