Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Alerts for specific transaction groups and error groups #152329

Closed
3 tasks done
gbamparop opened this issue Feb 28, 2023 · 11 comments
Closed
3 tasks done

[APM] Alerts for specific transaction groups and error groups #152329

gbamparop opened this issue Feb 28, 2023 · 11 comments
Assignees
Labels
8.8 candidate apm:alerting apm:release-feature APM UI - Release Feature Goal apm:test-plan-8.8.0 APM UI Test Plan for v8.8.0 apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support

Comments

@gbamparop
Copy link
Contributor

gbamparop commented Feb 28, 2023

APM users can create rules for specific services but are unable to create rules for specific transaction groups or error groups. This is a much requested feature because some parts of an application are more important than others and have different tolerance for latency, throughput and failed transaction rate thresholds.

Latency threshold and Failed transaction threshold rules

These rules already allow users to filter by service.name, service.environment and transaction.type.
A transaction.name filter should also be added, enabling users to only be alerted when a given transaction group exceeds the threshold.

Screenshot 2023-01-31 at 16 37 02

Error count threshold rule

When creating this rule users can filter by service.name and service.environment. By adding another filter for error.grouping_key users can be alerted when a single error group exceeds a given threshold.

Progress

Add transaction name filter

Add error grouping key filter

Links

@gbamparop gbamparop added Team:APM All issues that need APM UI Team support apm:alerting apm:release-feature APM UI - Release Feature Goal 8.8 candidate labels Feb 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@kpatticha
Copy link
Contributor

kpatticha commented Apr 5, 2023

As we discussed in a call earlier we agreed that we won't group by the transaction name as part of the ticket but just add the transaction name filter.

The grouping will be handled as part of #152990 #154535, #154536, #154537

cc @benakansara, @sqren, @dgieselaar

kpatticha added a commit that referenced this issue Apr 20, 2023
Part of the #152329

1. Adds a synthrace scenario that generates many transactions per
service
2. Fixes the duration chart preview when selecting All option -
#152195
3. Introduces the `Transaction name` filter in the rule type. 


### Pages loading the rule type
1. APM
2. Alert
3. Management rule 


### Consider 
- [ ] Update/Adding documentation example
https://www.elastic.co/guide/en/kibana/master/apm-alerts.html#apm-create-transaction-alert
## Creating a rule

https://user-images.githubusercontent.com/3369346/231740745-425c8eb8-6798-4ce4-b375-4ef96afdb334.mov

## Updating a rule


https://user-images.githubusercontent.com/3369346/231742035-28f50dfd-64bb-475d-b037-331eea4188d7.mov


### Before



https://user-images.githubusercontent.com/3369346/232799038-2edaa199-b970-48f2-b3ca-728273e4bf44.mov



### Notes

#### Feedback
The default action messages don't include any links. I will create a
follow-up ticket to improve the messages with actionable links.

Related bugs but out of the scope of the PR

- #154818
- #154704

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kpatticha
Copy link
Contributor

kpatticha commented Apr 20, 2023

@gbamparop @sqren

In the implementation ticket, there is no reference of adding the transaction name filter in the error count rule type. However, I see #155001 (comment) #155001 is added as a grouping field. Should we also consider adding the filter ?

@sorenlouv
Copy link
Member

sorenlouv commented Apr 21, 2023

@kpatticha I don't understand the context of the link (it points to a comment about an issue with slack for the latency threshold rule) but I think you are asking if transaction.name should be added as a filter to error count rule.
If so, I don't think we need to do that right now. We should however allow the user to group by transaction.name and error.grouping_key for the error count rule.

@kpatticha
Copy link
Contributor

oops, wrong link (fixed now) but you understand correctly. I'll make a note and if we have the time we can address adding the transaction.name in the error count rule.

For grouping I will reach out to AO

@benakansara
Copy link
Contributor

@kpatticha @sqren I have added group-by transaction.name in all 3 APM rules - Latency threshold, Error count, Failed transaction rate in #155001

Should I add a new field in the dropdown to group alerts on error.grouping_key in Error count rule?

@sorenlouv
Copy link
Member

sorenlouv commented Apr 21, 2023

Should I add a new field in the dropdown to group alerts on error.grouping_key in Error count rule?

@benakansara yes please! Can you also add error.grouping_name as a grouping option? (also mentioned in #155410 (comment))

kpatticha added a commit that referenced this issue Apr 24, 2023
#155405)

part of #152329
related work #154241

Introduces the Transaction name filter in the failed transaction rate
rule type
 



https://user-images.githubusercontent.com/3369346/233386404-1875b283-0321-4bf1-a7d3-66327f7d4ec5.mov


## Fixes

The regression introduces in a previous
[PR](fce4ef8)

Existing rule types can have empty string in their params so we need to
make sure we don't filter empty values as it will yield no results.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@gbamparop gbamparop added the apm:test-plan-8.8.0 APM UI Test Plan for v8.8.0 label Apr 25, 2023
@edfi-al
Copy link

edfi-al commented Oct 12, 2023

Hello! I have a service named platform and inside of it there is a transaction called actions. I want to create an alert for the actions transaction.

So, firstly I went to APM, I chose the Alerts->Latency and in my view I have only the service [which is platform and i can't change it], type [I have selected request], environment [I have selected prod], WHEN avg is above 1500ms for the last 5 minutes.

But as you can imagine, I can't choose the transaction that I want [actions] and in this way my alert is for the whole service [platform].

Can you please help me? Thank u!

@benakansara
Copy link
Contributor

@edfi-al Could you tell us which version of Kibana are you using? We have added transaction name filter in Latency threshold rule in 8.8.0. There is a filter called "NAME".

Additionally, in 8.10.0, we have added KQL filter where you can specify any filters with KQL query.

Screenshot 2023-10-12 at 18 57 39

@edfi-al
Copy link

edfi-al commented Oct 12, 2023

Hello @benakansara and thank you for replying. I'm using v.7.11.1.

image

Must I upgrade to at least v.8.8.0 in order to use NAME in alert?

@benakansara
Copy link
Contributor

@edfi-al yes, at least 8.8.0 is needed to use new NAME filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.8 candidate apm:alerting apm:release-feature APM UI - Release Feature Goal apm:test-plan-8.8.0 APM UI Test Plan for v8.8.0 apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support
Projects
None yet
Development

No branches or pull requests

6 participants