https://signoz.io logo
#support
Title
# support
p

Paulo Henrique de Morais Santiago

03/29/2023, 1:02 PM
Hello! I need help to create a alert for Error Percentage (10%+) for a app/service called: nodejs-example-app-for-signoz How i made this query?
s

Srikanth Chekuri

03/29/2023, 2:38 PM
Do you want to make an alert similar to this?
p

Paulo Henrique de Morais Santiago

03/29/2023, 2:41 PM
No, just use thist chart to alert on slack channel
This is one of default chart on defaults panes.
s

Srikanth Chekuri

03/29/2023, 2:45 PM
This is made with
SUM_RATE
of spans with
status_code=STATUS_CODE_ERROR
for a service as query
A
to
SUM_RATE
of all spans from same service query
B
and using
Formula
of
(A/B)*100
.
You can achieve this with query builder
p

Paulo Henrique de Morais Santiago

03/29/2023, 2:46 PM
Metric based or traced-based alert?
s

Srikanth Chekuri

03/29/2023, 2:47 PM
No, there is a metric called
signoz_calls_total
.
p

Paulo Henrique de Morais Santiago

03/29/2023, 2:47 PM
Ok i will try
I use IN or Like?
Who is equal?
Status_code IN status_code_error Status_code LIKE status_code_error
s

Srikanth Chekuri

03/29/2023, 3:08 PM
You can use Status_code IN status_code_error
p

Paulo Henrique de Morais Santiago

03/29/2023, 6:04 PM
hey bro @Srikanth Chekuri
The result is 2.88
But on default panel the result is 15%
what i`m doing wrong?
s

Srikanth Chekuri

03/29/2023, 6:07 PM
Select the operations which are the API endpoints; otherwise, it includes all the operations. We call these operations as service entry spans i.e in a trace call there are some operations which are the actual starting points and there are sub operations so when we work with service we are generally interested in top-level/entry-spans for service.
p

Paulo Henrique de Morais Santiago

03/29/2023, 6:14 PM
Sorry, but i did not urderstand.
So, its not possible create a alert for the Error Percentage, from the default (overview metrics) panel.
s

Srikanth Chekuri

03/29/2023, 6:15 PM
It is possible. Your filter criteria is not the same as in overview page.
p

Paulo Henrique de Morais Santiago

03/29/2023, 6:16 PM
I just want create a alert for this chart
How i made the correct. filter?
s

Srikanth Chekuri

03/29/2023, 6:19 PM
That is exactly what I am referring to. You are halfway through creating the alert. You need to add an operations filter. In the list of operations for the service, there are going to be some operations which are the entry point for the service, and you need to select those operations. For the example trace -> service-a
/api/users/{user_id}
-> service-a
db.operation
-> return. In this case, the ``/api/users/{user_id}`` is the top-level span i.e span where the trace journey started for the service. There can be a number of sub-operations under that such as
db.operation
etc...
And another question, how the default do the service discovery of all, if i understand correctly, i will need to create one by one.
s

Srikanth Chekuri

03/30/2023, 2:15 AM
I can create this here?
Yes
how the default do the service discovery of all
Are you talking about the service entry spans or service discovery in k8s?
p

Paulo Henrique de Morais Santiago

03/30/2023, 4:47 PM
hey @Srikanth Chekuri. Thanks!! I found the operation you mentioned.
But has a option to select all?
Or all that the error percentage chart on overview metrics show as default.
s

Srikanth Chekuri

03/30/2023, 4:53 PM
Your question was not clear to me. In this list, you need to select those are the entry-level spans.
p

Paulo Henrique de Morais Santiago

03/30/2023, 4:56 PM
Here, i think the chart from home page have a filter that select all pertinent to that app
I will need do it manually one by one?
s

Srikanth Chekuri

03/30/2023, 4:57 PM
No, key operations are not necessarily top-level operations.
For example the
tcp.connect
is most likely some inner span in service not the top level/entry span
p

Paulo Henrique de Morais Santiago

03/30/2023, 4:59 PM
Who operations the error percentage chart form home page uses?
s

Srikanth Chekuri

03/30/2023, 5:00 PM
It has an API and queries to fetch those top-level operations. You can open devtools and see it.
p

Paulo Henrique de Morais Santiago

03/30/2023, 5:09 PM
You are the best. I will configure and back you as soon. Thanks again
3 Views