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 & Event Log are using deprecated fields we shouldn't be using #84222

Closed
gmmorris opened this issue Nov 24, 2020 · 3 comments · Fixed by #85652
Closed

Alerting & Event Log are using deprecated fields we shouldn't be using #84222

gmmorris opened this issue Nov 24, 2020 · 3 comments · Fixed by #85652
Assignees
Labels
Feature:Alerting Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@gmmorris
Copy link
Contributor

gmmorris commented Nov 24, 2020

@timroes says a lot of things, among them, this:

It seems that you use rest_total_hits_as_int in https://github.com/elastic/kibana/blob/master/x-pack/plugins/actions/server/usage/actions_telemetry.ts#L38 (and further down in that file and the same in the alerts_telemetry file). It seems you never actually use it (since you don't seem to read the hits.total anywhere from that response). Since this parameter is deprecated (#26356) (and potentially slower than withou - though most likely not in your case) would you mind removing it?

Regarding event_log 😄 https://github.com/elastic/kibana/blob/master/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts#L291 There is should be converted into the new track_total_hits >The comment suggest it's done because of the old typings. You can temporarily use https://github.com/elastic/kibana/blob/master/x-pack/typings/elasticsearch/index.d.ts#L57 which supports also the new format until the elasticsearch typings have fixed that

If you set track_total_hits=true it will automatically track all and return you the exact amount, but in the new format { total: { relation: 'eq', value: 12536123 } }

@gmmorris gmmorris added Feature:Alerting Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Nov 24, 2020
@elasticmachine
Copy link
Contributor

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

@timroes
Copy link
Contributor

timroes commented Nov 24, 2020

Things I also say:

Don't use any in TS, it's evil!

@gmmorris
Copy link
Contributor Author

Things I also say:

Don't use any in TS, it's evil!

I say this too :)

@YulNaumenko YulNaumenko self-assigned this Dec 10, 2020
@gmmorris gmmorris mentioned this issue Jan 26, 2021
6 tasks
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants