determineMethod determines the method to record attributes with. This will be "other" if StaticMethod isn't specified or if method filter is set and specifies, the method name as is otherwise.
(method string, opts ...grpc.CallOption)
| 104 | // "other" if StaticMethod isn't specified or if method filter is set and |
| 105 | // specifies, the method name as is otherwise. |
| 106 | func determineMethod(method string, opts ...grpc.CallOption) string { |
| 107 | for _, opt := range opts { |
| 108 | if _, ok := opt.(grpc.StaticMethodCallOption); ok { |
| 109 | return removeLeadingSlash(method) |
| 110 | } |
| 111 | } |
| 112 | return "other" |
| 113 | } |
| 114 | |
| 115 | func (h *clientMetricsHandler) streamInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { |
| 116 | ctx, ci := getOrCreateCallInfo(ctx, cc, method, opts...) |
no test coverage detected