dapr / dapr/dotnet-sdk

Sentinel does not work for the grpc method

Open
#795 0 comments 0 reactions 0 assignees View on GitHub
kind/bug
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
1d 22h
Merged PRs (30d)
5

Description

## Expected Behavior

var result = await daprClient.InvokeMethodGrpcAsync("daprbackend", "SayHello", request)

The rules of sentinel has no action for the above method;

forecasts = await _daprClient.InvokeMethodAsync>(
HttpMethod.Post,
"dotbackend",
$"weatherforecast",
parm);
For the ApiMethod, sentinel can work well

For the Grpc method, the configure of sentinel is :

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: sentinel
spec:
type: middleware.http.sentinel
version: v1
metadata:
- name: appName
value: "daprbackend"
- name: logDir
value: "/var/tmp"
- name: flowRules
value: >-
[
{
"resource": "POST:/v1.0/invoke/daprbackend/dapr.proto.runtime.v1.Dapr/InvokeService",
"threshold": 10,
"tokenCalculateStrategy": 0,
"controlBehavior": 0
},
- name: circuitBreakerRules
value: >-
[
{
"resource": "POST:/v1.0/invoke/daprbackend/method/OnInvoke",
"strategy": 0,
"retryTimeoutMs": 1000,
"minRequestAmount": 20,
"statIntervalMs": 1000,
"maxallowedrtms": 20,
"threshold": 0.1
}
]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.