GRPC Thresholds by tag?

I am trying to get more granular results for my test using GRPC. I hit several GPRC endpoints on each iteration and would like to get detailed info on each call.

According to this page there should be a ‘service’ tag I can use: Tags and Groups

When I invoke I try something like:

const res = client.invoke("services.worker_service.WorkerService/WorkerListItems", payload, params);

In my options I tried to cover all my bases to get real output as so:

export const options ={
   thresholds:{
      "grpc_req_duration:{service:WorkerListItems}":['p(95)<300'],
      "grpc_req_duration:{service:worker_service}":['p(95)<300'],
      "grpc_req_duration:{service:WorkerService}":['p(95)<300'],
   }
}

But in the output I just get zeros:

grpc_req_duration.............avg=200ms  min=100ms  med=185ms  max=600ms  p(90)=300ms  p(95)=333ms
    { service:WorkerListItems } avg=0s  min=0s  med=0s  max=0s p(90)=0s  p(95)=0s
    { service:worker_service } avg=0s  min=0s  med=0s  max=0s p(90)=0s  p(95)=0s
    { service:WorkerService } avg=0s  min=0s  med=0s  max=0s p(90)=0s  p(95)=0s

Ultimately I’d like to get this information for each endpoint I’m hitting, but I can’t seem to get valid output no matter what I do. The calls are happening and returning valid data, I just can’t get metrics on them.

What am I doing wrong in my syntax?

Thanks!

Hi @runtest , welcome to the community forum!

I think the correct threshold definition would be:

export const options ={
   thresholds:{
      "grpc_req_duration{service:services.worker_service.WorkerService}":['p(95)<300'],
   }
}

or

export const options ={
   thresholds:{
      "grpc_req_duration{method:WorkerListItems}":['p(95)<300'],
   }
}

Please let me know if it helps or not

Thank you for the reply!

I got some progress with:

export const options ={
   thresholds:{
      "grpc_req_duration{service:services.worker_service.WorkerService}":['p(95)<300'],
   }
}

Still can’t get any details below the service level though. Individual endpoints are still a mystery.

You should use my second example with the method