mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Infrastructure UI] Track host cloud provider on table entry click (#150685)
## 📓 Summary Closes #150681 The tracked event when clicking an entry from the Hosts table was not applying correctly the default `unknow` string for the `cloud_provider` parameter. Now it defaults to it in case the value is not passed or is null. ## 🧪 Testing - Navigate to the Hosts view - Open the console dev tools - Click on a host name from the table and navigate to the host detail. - Verify the following error does not appear in the log ``` Uncaught Error: Failed to validate payload coming from "Event Type 'Host Entry Clicked'": [cloud_provider]: {"expected":"string","actual":"object","value":null} ``` Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
This commit is contained in:
parent
1f03570126
commit
26eddec708
1 changed files with 2 additions and 2 deletions
|
@ -22,11 +22,11 @@ export class TelemetryClient implements ITelemetryClient {
|
|||
|
||||
public reportHostEntryClicked = ({
|
||||
hostname,
|
||||
cloud_provider: cloudProvider = 'unknown',
|
||||
cloud_provider: cloudProvider,
|
||||
}: HostEntryClickedParams) => {
|
||||
this.analytics.reportEvent(InfraTelemetryEventTypes.HOSTS_ENTRY_CLICKED, {
|
||||
hostname,
|
||||
cloud_provider: cloudProvider,
|
||||
cloud_provider: cloudProvider ?? 'unknown',
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue