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

[Alerting] Track fields usage in find api #112096

Merged
merged 5 commits into from
Sep 20, 2021

Conversation

chrisronline
Copy link
Contributor

Resolves #112009

To test, you can use these sample URLs:

Legacy: https://localhost:5601/api/alerts/_find?fields=[%22hi%22]
New: https://localhost:5601/api/alerting/rules/_find?fields=[%22hi%22]

{
  "usage_counters": {
    "daily_events": [
      {
        "domain_id": "alerts",
        "counter_name": "legacyAlertingFieldsUsage",
        "counter_type": "alertingFieldsUsage",
        "last_updated_at": "2021-09-13T20:47:44.480Z",
        "from_timestamp": "2021-09-13T00:00:00Z",
        "total": 2
      },
      {
        "domain_id": "alerts",
        "counter_name": "legacyRoute_find",
        "counter_type": "legacyApiUsage",
        "last_updated_at": "2021-09-13T20:47:44.480Z",
        "from_timestamp": "2021-09-13T00:00:00Z",
        "total": 4
      },
      {
        "domain_id": "alerts",
        "counter_name": "alertingFieldsUsage",
        "counter_type": "alertingFieldsUsage",
        "last_updated_at": "2021-09-14T13:17:01.098Z",
        "from_timestamp": "2021-09-14T00:00:00Z",
        "total": 2
      }
    ]
  }
}

@chrisronline chrisronline added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.16.0 Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework labels Sep 14, 2021
@chrisronline chrisronline requested a review from a team as a code owner September 14, 2021 13:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Verified counter gets incremented when using the fields query param.

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@chrisronline chrisronline merged commit 49977b2 into elastic:master Sep 20, 2021
@chrisronline chrisronline deleted the alerting/fields_usage branch September 20, 2021 20:28
chrisronline added a commit to chrisronline/kibana that referenced this pull request Sep 20, 2021
* Track fields usage

* Add test

* Add missing change
chrisronline added a commit that referenced this pull request Sep 20, 2021
* Track fields usage

* Add test

* Add missing change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Alerting] Add telemetry for "fields" attribute usage in find API
5 participants