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] Fix apm.transaction_duration alert to aggregrate over service environment #143238

Merged

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Oct 12, 2022

Closes #143217

Fixes the Latency Threshold alert type in APM so that each environment is checked separately if the alert should be triggered. If an alert triggers for multiple environments in the same interval, an alert is triggered for each.

@ogupte ogupte requested a review from a team as a code owner October 12, 2022 20:12
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Oct 12, 2022
@elasticmachine
Copy link
Contributor

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

@ogupte
Copy link
Contributor Author

ogupte commented Oct 13, 2022

@elasticmachine merge upstream

value: 5500000,
},
},
],
},
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we had API test for our alerts:

  1. call an internal (apm) API to create a latency rule
  2. ingest synthtrace data that causes alerts to fire
  3. Retrieve alerts from alerts index and verify they have the expected dimensions associated.

There might be timing problems (I don't know how often the scheduler runs or how predictable it is). And currently we call the alerting API directly when creating alerts. In the ideal scenario we'd have our own api that would call the alerting api's underneath. This will also make it MUCH easier for end users to use the API to create specific apm rules.

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the chart previews. We'll have to do this for the other rule types as well, although not blocking for this PR.

@ogupte ogupte enabled auto-merge (squash) October 18, 2022 02:14
@ogupte ogupte removed request for a team, parkiino and paul-tavares October 18, 2022 21:33
@ogupte ogupte disabled auto-merge October 18, 2022 21:33
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.1MB 3.1MB +254.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
apm 52 53 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
apm 28.9KB 29.0KB +98.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ogupte ogupte merged commit 0c5270c into elastic:main Oct 19, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 19, 2022
kc13greiner pushed a commit to kc13greiner/kibana that referenced this pull request Oct 19, 2022
…nvironment (elastic#143238)

* [APM] Fix apm.transaction_duration alert to aggregrate over service environment (elastic#143217)

* PR feedback

* updates the alert preview chart for Latency threshold to reflect the correct logic used in this fix

* fixes linting errors

* Adds shared helper function for avg or pct latencty aggregation

* Renamed ChartPreview (multi)data props to `series` which is always an array

* fixes test mock object

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fixes status custom domain and type error

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Default agg type fixes API test

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fixes linting issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
guskovaue pushed a commit to guskovaue/kibana that referenced this pull request Oct 22, 2022
…nvironment (elastic#143238)

* [APM] Fix apm.transaction_duration alert to aggregrate over service environment (elastic#143217)

* PR feedback

* updates the alert preview chart for Latency threshold to reflect the correct logic used in this fix

* fixes linting errors

* Adds shared helper function for avg or pct latencty aggregation

* Renamed ChartPreview (multi)data props to `series` which is always an array

* fixes test mock object

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fixes status custom domain and type error

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Default agg type fixes API test

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fixes linting issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
e40pud pushed a commit to e40pud/kibana that referenced this pull request Oct 24, 2022
…nvironment (elastic#143238)

* [APM] Fix apm.transaction_duration alert to aggregrate over service environment (elastic#143217)

* PR feedback

* updates the alert preview chart for Latency threshold to reflect the correct logic used in this fix

* fixes linting errors

* Adds shared helper function for avg or pct latencty aggregation

* Renamed ChartPreview (multi)data props to `series` which is always an array

* fixes test mock object

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fixes status custom domain and type error

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Default agg type fixes API test

* fixes type error

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fixes linting issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:fix Team:APM All issues that need APM UI Team support v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Latency threshold alert type should distinguish between environments
6 participants