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

Cannot read properties of undefined (reading 'show') on Observability > Overview when certain capabilities are disabled #138213

Open
JAndritsch opened this issue Aug 5, 2022 · 1 comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Observability Team label for Observability Team (for things that are handled across all of observability)

Comments

@JAndritsch
Copy link

Kibana version: 8.2.2

Elasticsearch version: 8.2.2

Server OS version: Ubuntu 20.04.4 LTS

Browser version: Chrome 102.0.5005.63

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Using the official Docker image for Kibana, tag 8.2.2.

Describe the bug:

The Observability > Overview page crashes with the following JS error when APM (or another capability) is disabled:

image

Steps to reproduce:

  1. Disable or remove any of the following capabilities: 'logs', 'infrastructure', 'apm', 'uptime'
  2. Navigate to the Observability > Overview page
  3. Observe the page is blank and the error shown above appears in the developer console

Expected behavior:

The page should still work if APM is disabled/removed.

Screenshots (if relevant):

Errors in browser console (if relevant): See screenshot above.

Provide logs and/or server output (if relevant):

Any additional context:

It seems the logic that checks the capabilities assumes that each capability exists in the list of fetched capabilities when checking its show property. It does not account for one of those capabilities missing.

The logic in question:

const CAPABILITIES_KEYS = ['logs', 'infrastructure', 'apm', 'uptime'];

a few lines later...

CAPABILITIES_KEYS.forEach((feature) => {
  if (capabilities[feature].show === false) {
    trackMetric({
      metric: `oblt_disabled_feature_${feature === 'infrastructure' ? 'metrics' : feature}`,
    });
  }
});
@JAndritsch JAndritsch added the bug Fixes for quality problems that affect the customer experience label Aug 5, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 5, 2022
@marius-dr marius-dr added the Team:Observability Team label for Observability Team (for things that are handled across all of observability) label Aug 12, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/unified-observability (Team:Observability)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Observability Team label for Observability Team (for things that are handled across all of observability)
Projects
None yet
Development

No branches or pull requests

3 participants