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

[ResponseOps] Add telemetry for the es query rule types #176451

Merged
merged 7 commits into from
Feb 12, 2024

Conversation

doakalexi
Copy link
Contributor

@doakalexi doakalexi commented Feb 7, 2024

Resolves #176237

Summary

Adds new telemetry fields to track the ES Query rule search types.

Checklist

To verify

  • Create a couple of ES Query rules with the different search types

  • Create a rule that is not an ES Query rule

  • Change alerting telemetry task schedule interval 1 min

  • Run Telemetry usage payload API in your browser console to verify the telemetry data looks the same

@doakalexi
Copy link
Contributor Author

/ci

@doakalexi
Copy link
Contributor Author

/ci

@doakalexi doakalexi changed the title Updating telemetry with es query search types [ResponseOps] Add telemetry for the es query rule types Feb 8, 2024
@doakalexi doakalexi marked this pull request as ready for review February 8, 2024 22:52
@doakalexi doakalexi requested review from a team as code owners February 8, 2024 22:52
@doakalexi doakalexi added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Feb 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@doakalexi doakalexi added release_note:skip Skip the PR/issue when compiling release notes v8.13.0 labels Feb 8, 2024
@ymao1
Copy link
Contributor

ymao1 commented Feb 9, 2024

Would it make more sense to try to add it to the count_by_type object?

So something like:

{
  "count_by_type": {
    "__es-query": 3,
    "__es-query_es_query: 1,
    "__es-query_search_source: 1,
    "__es-query_esql_query: 1,
  }
}

Also, do we want to get the number of active (enabled) rules of these types?

@doakalexi
Copy link
Contributor Author

Would it make more sense to try to add it to the count_by_type object?

So something like:

{
  "count_by_type": {
    "__es-query": 3,
    "__es-query_es_query: 1,
    "__es-query_search_source: 1,
    "__es-query_esql_query: 1,
  }
}

Also, do we want to get the number of active (enabled) rules of these types?

Resolved in this commit 170416c

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. Works as described.

@doakalexi doakalexi enabled auto-merge (squash) February 12, 2024 15:02
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@doakalexi doakalexi merged commit d89097a into elastic:main Feb 12, 2024
33 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Feb 12, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
Resolves elastic#176237

## Summary

Adds new telemetry fields to track the ES Query rule search types.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### To verify

- Create a couple of ES Query rules with the different search types
- Create a rule that is not an ES Query rule

- Change alerting telemetry task
[schedule](https://github.com/doakalexi/kibana/blob/main/x-pack/plugins/alerting/server/usage/task.ts#L28)
interval 1 min

- Run [Telemetry usage payload
API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)
in your browser console to verify the new telemetry data under
`count_by_type` and `count_active_by_type`
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
Resolves elastic#176237

## Summary

Adds new telemetry fields to track the ES Query rule search types.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### To verify

- Create a couple of ES Query rules with the different search types
- Create a rule that is not an ES Query rule

- Change alerting telemetry task
[schedule](https://github.com/doakalexi/kibana/blob/main/x-pack/plugins/alerting/server/usage/task.ts#L28)
interval 1 min

- Run [Telemetry usage payload
API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)
in your browser console to verify the new telemetry data under
`count_by_type` and `count_active_by_type`
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:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps] Add telemetry for the es query rule types
6 participants