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

[ObsUX] Telemetry : Differentiate between user- vs auto-initiatated Host queries #173077

Closed
roshan-elastic opened this issue Dec 11, 2023 · 6 comments · Fixed by #173279
Closed
Assignees
Labels
Feature:ObsHosts Hosts feature within Observability Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team technical debt Improvement of the software architecture and operational architecture

Comments

@roshan-elastic
Copy link

roshan-elastic commented Dec 11, 2023

Problem

We're trying to understand whether want to interrogate all of their Hosts vs refine it down to a group/select few hosts. However, our telemetry doesn't differentiate between the default query that automatically fires vs those initiated by users. Therefore, when we want to look at how many hosts are returned, we can't differentiate between the default result set vs what users are actually searching for.

Solution

Update telemetry event Host View Total Host Count Retrieved to include properties.with_query attribute to help us differentiate:

Sample event - Returned upon query where user had added some kind of filter/KQL query

...

{
 "event_type": "Host View Total Host Count Retrieved",
  ...
  "properties": {
     "with_query":true, // whether query had KQL filter/query applied or was blank
     "total": 1000 // returned host count
     ...
     }
}

Sample event - Returned upon query WITHOUT KQL query

{
 "event_type": "Host View Total Host Count Retrieved",
  ...
  "properties": {
     "with_query":false, // whether query had KQL filter/query applied or was blank
     "total": 1000 // returned host count
     ...
     }
}
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 11, 2023
@roshan-elastic roshan-elastic added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Dec 12, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 12, 2023
@roshan-elastic
Copy link
Author

Hey @smith,

This isn't a bug so probably shouldn't be handled during bug freeze but it would be great if we can get this bit of telemetry added in (and back-ported) as soon as we can.

Context : This will help us understand how users interact with hosts...we can't figure out whether users are filtering for large counts of hosts or whether those large counts are only returned in the default query which happens when you open the page

@smith
Copy link
Contributor

smith commented Dec 12, 2023

I think we can get this prioritized and backported without any problems.

@smith smith added technical debt Improvement of the software architecture and operational architecture Feature:ObsHosts Hosts feature within Observability labels Dec 12, 2023
@crespocarlos crespocarlos self-assigned this Dec 13, 2023
@crespocarlos
Copy link
Contributor

@roshan-elastic We're using an attribute named with_query in the Hosts View Query Submitted, but it only receives the information about the KQL bar. For this ticket, we want to know whether filters (controls included) and/or kql search were used for filtering the data.

Perhaps naming it with_query_or_filter or with_filters might better represent what this information is about?

@roshan-elastic
Copy link
Author

Hey @crespocarlos - nice thinking!

I think you're suggesting this but could we have with_query behaving the same way but we have an additional with_filters attribute?

I'm happy to work with these in the analytics tool (will also preserve our existing structure I believe)?

@crespocarlos
Copy link
Contributor

@roshan-elastic , yeah, we can have 2 attributes with_query and with_filters.

crespocarlos added a commit that referenced this issue Dec 18, 2023
…73279)

closes #173077

## Summary

Adds `with_query` and `with_filters` attributes to the "Host View Total
Host Count Retrieved" event.

**note**: date picker isn't considered for the flags above.

### How to test

1. Start  ES, Kibana, and  metricbeat
2. Navigate to Infrastructure > Hosts
3. Inspect the `kibana-browser` request payload and check if the new
attributes are there
4. Add/remove filters and query and repeat step 3.

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 18, 2023
…astic#173279)

closes elastic#173077

## Summary

Adds `with_query` and `with_filters` attributes to the "Host View Total
Host Count Retrieved" event.

**note**: date picker isn't considered for the flags above.

### How to test

1. Start  ES, Kibana, and  metricbeat
2. Navigate to Infrastructure > Hosts
3. Inspect the `kibana-browser` request payload and check if the new
attributes are there
4. Add/remove filters and query and repeat step 3.

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit c622478)
kibanamachine referenced this issue Dec 18, 2023
…ent (#173279) (#173507)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Obs UX] Include with_filters and with_query to hosts count event
(#173279)](#173279)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-18T11:05:18Z","message":"[Obs
UX] Include with_filters and with_query to hosts count event
(#173279)\n\ncloses
https://github.com/elastic/kibana/issues/173077\r\n\r\n##
Summary\r\n\r\nAdds `with_query` and `with_filters` attributes to the
\"Host View Total\r\nHost Count Retrieved\" event.\r\n\r\n**note**: date
picker isn't considered for the flags above.\r\n\r\n### How to
test\r\n\r\n1. Start ES, Kibana, and metricbeat\r\n2. Navigate to
Infrastructure > Hosts\r\n3. Inspect the `kibana-browser` request
payload and check if the new\r\nattributes are there\r\n4. Add/remove
filters and query and repeat step 3.\r\n\r\nCo-authored-by: Kibana
Machine
<[email protected]>","sha":"c6224788036dc4f8b1f0a9a585b846042f4d89c2","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Metrics
UI","release_note:skip","backport:prev-minor","Team:obs-ux-infra_services","v8.13.0"],"number":173279,"url":"https://github.com/elastic/kibana/pull/173279","mergeCommit":{"message":"[Obs
UX] Include with_filters and with_query to hosts count event
(#173279)\n\ncloses
https://github.com/elastic/kibana/issues/173077\r\n\r\n##
Summary\r\n\r\nAdds `with_query` and `with_filters` attributes to the
\"Host View Total\r\nHost Count Retrieved\" event.\r\n\r\n**note**: date
picker isn't considered for the flags above.\r\n\r\n### How to
test\r\n\r\n1. Start ES, Kibana, and metricbeat\r\n2. Navigate to
Infrastructure > Hosts\r\n3. Inspect the `kibana-browser` request
payload and check if the new\r\nattributes are there\r\n4. Add/remove
filters and query and repeat step 3.\r\n\r\nCo-authored-by: Kibana
Machine
<[email protected]>","sha":"c6224788036dc4f8b1f0a9a585b846042f4d89c2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173279","number":173279,"mergeCommit":{"message":"[Obs
UX] Include with_filters and with_query to hosts count event
(#173279)\n\ncloses
https://github.com/elastic/kibana/issues/173077\r\n\r\n##
Summary\r\n\r\nAdds `with_query` and `with_filters` attributes to the
\"Host View Total\r\nHost Count Retrieved\" event.\r\n\r\n**note**: date
picker isn't considered for the flags above.\r\n\r\n### How to
test\r\n\r\n1. Start ES, Kibana, and metricbeat\r\n2. Navigate to
Infrastructure > Hosts\r\n3. Inspect the `kibana-browser` request
payload and check if the new\r\nattributes are there\r\n4. Add/remove
filters and query and repeat step 3.\r\n\r\nCo-authored-by: Kibana
Machine
<[email protected]>","sha":"c6224788036dc4f8b1f0a9a585b846042f4d89c2"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ObsHosts Hosts feature within Observability Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants