Skip to content

[Infra][Hosts UI] OTel system metrics - Lens #226333

@crespocarlos

Description

@crespocarlos

Summary

Important

Let's align this #226749 before making the changes here

Adapt the existing Lens formulas to include OTel metrics. e.g.:

export const cpuUsage: {
  get: ({ schemas }: { schemas: Array<'ecs' | 'semconv'> }) => LensBaseLayer;
} = {
  get: ({ schemas }) => ({
    label: CPU_USAGE_LABEL,
    value: getFormulaForSchema({
      formulaBySchema: {
        ecs: 'average(system.cpu.total.norm.pct)',
        semconv: `1-(average(system.cpu.utilization,kql='attributes.state: idle') + average(system.cpu.utilization,kql='attributes.state: wait'))`,
      },
      schemas,
    }),
    format: 'percent',
    decimals: 0,
  }),
};

To achieve the above, the inventory model has to be changed to accept the schema selection.

For the formulas, we can use this PR as a reference: elastic/integrations#14400

Acceptance Criteria

  • Every metric in the Hosts UI has a semconv-based formula (including Kubernetes Node)
  • The schema selection from #226335 should affect the formula used by Lens

Metadata

Metadata

Assignees

Labels

Team:obs-ux-infra_servicesObservability Infrastructure & Services User Experience TeamenhancementNew value added to drive a business result

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions