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] Support specific fields when creating service groups (#142201) #143881

Merged
merged 18 commits into from
Oct 29, 2022

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Oct 24, 2022

Closes #142201
Closes #143792
Closes #143861

Support for service group fields

  • agent.name
  • service.name
  • service.language.name
  • service.environment
  • labels.*

Query suggestions

Client-side validation

Screen Shot 2022-10-24 at 12 30 59 PM

param validation in route

Screen Shot 2022-10-24 at 12 31 05 PM

Rule types persist required fields in alert

Screen Shot 2022-10-24 at 12 32 20 PM

Fix for latency threshold buckets

x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts now uses a multi_terms agg and iterates thru each combination of service.name, service.environment, and transaction.type to test the transaction duration against the defined threshold.

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

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

@ogupte ogupte added v8.6.0 release_note:skip Skip the PR/issue when compiling release notes labels Oct 24, 2022
@ogupte ogupte marked this pull request as draft October 24, 2022 17:33
@ogupte ogupte force-pushed the apm-142201-service-groups-dimensions branch 2 times, most recently from b25d4a5 to f17ffca Compare October 26, 2022 04:21
aggregationType: ruleParams.aggregationType,
transactionDurationField: field,
}),
...getSourceFieldsAgg(),
Copy link
Member

Choose a reason for hiding this comment

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

using a top hits agg with a lot of buckets is very expensive. if there is a way to only do this for actual alerts that should fire I would recommend it.

@ogupte ogupte force-pushed the apm-142201-service-groups-dimensions branch from 40c3684 to e4c4743 Compare October 26, 2022 13:48
@ogupte ogupte marked this pull request as ready for review October 26, 2022 13:48
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM, just some suggestions

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.

Mostly just nits. lgtm

) {
return {
source_fields: {
top_hits: {
Copy link
Member

Choose a reason for hiding this comment

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

Can you change this to top_metrics agg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With top_metrics we can't get all the labels.* fields, unless they are all enumerated in the agg. top_hits will get all labels.* without having to know all the field names in advance.

@ogupte ogupte enabled auto-merge (squash) October 29, 2022 05:03
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1338 1339 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
observability 547 548 +1

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 +857.0B

Page load bundle

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

id before after diff
apm 29.0KB 29.0KB +60.0B
Unknown metric groups

API count

id before after diff
observability 550 551 +1

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 57 63 +6
osquery 103 108 +5
securitySolution 439 443 +4
total +17

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 65 71 +6
osquery 104 110 +6
securitySolution 516 520 +4
total +18

History

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

@ogupte ogupte merged commit 796751e into elastic:main Oct 29, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 29, 2022
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 31, 2022
* main: (41 commits)
  [api-docs] Daily api_docs build (elastic#144212)
  Add readonly view to role management (elastic#143893)
  [api-docs] Daily api_docs build (elastic#144208)
  [APM] Adds button group to navigate to "All services" (elastic#142911)
  Update react-query to ^4.12.0 (main) (elastic#139986)
  [APM] Support specific fields when creating service groups (elastic#142201) (elastic#143881)
  [api-docs] Daily api_docs build (elastic#144203)
  [ts] add stub index.d.ts in @kbn/ui-shared-deps-npm
  [Synthetics] Fix failing Synthetics Integration test (elastic#144175)
  chore(NA): remove @types/pkg link creation when generating a new package (elastic#144200)
  [Osquery] Update schema to v5.5.1 (elastic#144090)
  [ci] remove github-checks-reporter (elastic#144193)
  [8.6][ML Inference] Verify pipeline usage before deletion (elastic#144053)
  [ts] ts refs cache was removed, remove capture task
  Added Rollups CCS Test (elastic#144074)
  [auto] migrate existing plugin/package configs
  [ts] stop building @types packages in bootstrap
  skip failing test suite (elastic#142762)
  skip failing test suite (elastic#144186)
  [Fleet] Show Add Fleet Server instead of add agent when adding agent from agent policy (elastic#144105)
  ...
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:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v8.6.0
Projects
None yet
7 participants