Skip to content

Commit

Permalink
[Telemetry] Filter unwanted fields from the kibana.os telemetry payload
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Apr 6, 2020
1 parent fd36ace commit cc04a95
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export function handleKibanaStats(
...kibanaStats.os,
};
const formattedOsStats = Object.entries(os).reduce((acc, [key, value]) => {
if (typeof value !== 'string') {
// There are new fields reported now from the "os" property like "load", "memory", etc. They are objects.
return acc;
}
return {
...acc,
[`${key}s`]: [{ [key]: value, count: 1 }],
Expand Down

0 comments on commit cc04a95

Please sign in to comment.