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

[Infra] Add dashboard tracking event with filter properties #182859

Closed
jennypavlova opened this issue May 7, 2024 · 1 comment · Fixed by #183659
Closed

[Infra] Add dashboard tracking event with filter properties #182859

jennypavlova opened this issue May 7, 2024 · 1 comment · Fixed by #183659
Assignees
Labels
enhancement New value added to drive a business result Feature:ObsHosts Hosts feature within Observability Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@jennypavlova
Copy link
Contributor

jennypavlova commented May 7, 2024

Summary

As mentioned here we want to add more properties to the current (dashboard_loaded_with_data) dashboard event

As discussed in the main issue we will add a custom event to track that to avoid modifying the existing generic event ("dashboard_loaded_with_data")

The new event should have the properties:

{
	"timestamp": "2024-05-03T16:57:39.589Z",
	"event_type": "Asset Dashboard Loaded",
	"context": {...
	},
	"properties": {
                    "state": true, // at least one filter should be true
                     "assetType": "host", // or container, etc
                     "filtered_by": ["assetId", "somethingelse"] 
	}
}

Implementation details

Investigate if we can pass the properties to the event:

  • The event is registered here
  • Check if it is OK to add this change as the event is called inside the dashboard embeddable and this change might affect other embeddable usage
  • After this change make sure that the tracking works for other dashboard embeddable use cases (like APM)
  • As we will add a new event this points ^ are no longer needed

AC

  • In the case of the asset details flyout/page dashboards tab we should add a tracking event asset_dashboard_loaded with the properties :
    • When filtered
          "properties": {
                        "state": true, // at least one filter should be true
                         "assetType": "host", // or container, etc
                         "filtered_by": ["assetId", "somethingelse"] 
          }
    • Not filtered:
              {
                  "state": false, // no filters added
                  "assetType": "host", // or container, etc
                  "filtered_by": [] // empty 
              }
  • All tracking events for dashboards should remain unchanged
@jennypavlova jennypavlova added enhancement New value added to drive a business result Feature:ObsHosts Hosts feature within Observability needs-refinement Needs PM's to refine scope Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels May 7, 2024
@jennypavlova jennypavlova self-assigned this May 7, 2024
@elasticmachine
Copy link
Contributor

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

@jennypavlova jennypavlova removed their assignment May 15, 2024
@jennypavlova jennypavlova removed the needs-refinement Needs PM's to refine scope label May 15, 2024
@jennypavlova jennypavlova self-assigned this May 15, 2024
@jennypavlova jennypavlova changed the title [Infra] Extend dashboard tracking event with more properties [Infra] Add dashboard tracking event with filter properties May 15, 2024
jennypavlova added a commit that referenced this issue May 21, 2024
Closes #182859 
## Summary

This PR adds a tracking event `Asset Dashboard Loaded` when the custom
dashboard is loaded on the dashboards tab.

So to understand the usage of the filters we want to track: 
- when the page loads with the dashboard tab open
- If the dashboard filters change or a different dashboard is selected 
- when the dashboard is initially loaded (and the filters applied)
We don't want to track:
- If the dashboard is not changed, in case: 
   - Edit action is canceled or the same filters are saved 
   - the same dashboard is selected 
- switching to a different tab and back to the dashboards tab (showing
the same dashboard)

## Testing
Go to the asset details flyout/ asset details page and select the
dashboards tab
- Add a dashboard with a filter ( Check tracking )

![image](https://github.com/elastic/kibana/assets/14139027/690ba626-714c-4325-8435-d43f5c914f4d)

- Add a dashboard without a filter  ( Check tracking )

![image](https://github.com/elastic/kibana/assets/14139027/7f4c009a-3c1b-4301-961d-e6e2407f5e75)

- Switch dashboards ( Check tracking )
- Edit a dashboard ( Check tracking )




https://github.com/elastic/kibana/assets/14139027/b43f3e88-25a8-46d4-be88-087917f577db

- Should not track: 


https://github.com/elastic/kibana/assets/14139027/34d93849-fe0d-4643-ac7e-d8de0b74820c
jennypavlova added a commit that referenced this issue May 21, 2024
…ge (#183486)

Closes #180386 
⚠️ To be merged after
[#182859](#182859) is done
## Summary

This PR enables custom dashboards by default and adds the flag to infra
settings:

<img width="1887" alt="image"
src="https://github.com/elastic/kibana/assets/14139027/018aae99-a488-49dd-87ba-db0bcbc4caf6">


## Testing
- Go to infra settings page and check if the custom dashboards flag is
enabled
- Go to the hosts view and select a host: the dashboards tab should be
visible
- Compare the flags with advanced settings 
- Disable the flag, go to the hosts view and select a host: the
dashboards tab should not be visible
- Enable the flag, go to the hosts view and select a host: the
dashboards tab should be visible



https://github.com/elastic/kibana/assets/14139027/f788c019-4fdb-416b-8fdb-b5cb39b8a2fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:ObsHosts Hosts feature within Observability Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants