Skip to content

Commit

Permalink
[Log Explorer] Convert log explorer profile into standalone app (#164493
Browse files Browse the repository at this point in the history
)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
  • Loading branch information
3 people committed Aug 31, 2023
1 parent 5a30e4d commit ad59308
Show file tree
Hide file tree
Showing 161 changed files with 1,493 additions and 746 deletions.
2 changes: 1 addition & 1 deletion .buildkite/ftr_configs.yml
Expand Up @@ -279,7 +279,6 @@ enabled:
- x-pack/test/functional/apps/data_views/config.ts
- x-pack/test/functional/apps/dev_tools/config.ts
- x-pack/test/functional/apps/discover/config.ts
- x-pack/test/functional/apps/discover_log_explorer/config.ts
- x-pack/test/functional/apps/graph/config.ts
- x-pack/test/functional/apps/grok_debugger/config.ts
- x-pack/test/functional/apps/home/config.ts
Expand Down Expand Up @@ -313,6 +312,7 @@ enabled:
- x-pack/test/functional/apps/ml/short_tests/config.ts
- x-pack/test/functional/apps/ml/stack_management_jobs/config.ts
- x-pack/test/functional/apps/monitoring/config.ts
- x-pack/test/functional/apps/observability_log_explorer/config.ts
- x-pack/test/functional/apps/remote_clusters/config.ts
- x-pack/test/functional/apps/reporting_management/config.ts
- x-pack/test/functional/apps/rollup_job/config.ts
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/storybooks/build_and_upload.ts
Expand Up @@ -26,7 +26,7 @@ const STORYBOOKS = [
'dashboard_enhanced',
'dashboard',
'data',
'discover_log_explorer',
'log_explorer',
'embeddable',
'expression_error',
'expression_image',
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -329,7 +329,6 @@ packages/kbn-dev-utils @elastic/kibana-operations
examples/developer_examples @elastic/appex-sharedux
examples/discover_customization_examples @elastic/kibana-data-discovery
x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery
x-pack/plugins/discover_log_explorer @elastic/infra-monitoring-ui
src/plugins/discover @elastic/kibana-data-discovery
packages/kbn-discover-utils @elastic/kibana-data-discovery
packages/kbn-doc-links @elastic/docs
Expand Down Expand Up @@ -472,6 +471,7 @@ packages/kbn-lint-ts-projects-cli @elastic/kibana-operations
x-pack/plugins/lists @elastic/security-detection-engine
examples/locator_examples @elastic/kibana-app-services
examples/locator_explorer @elastic/kibana-app-services
x-pack/plugins/log_explorer @elastic/infra-monitoring-ui
packages/kbn-logging @elastic/kibana-core
packages/kbn-logging-mocks @elastic/kibana-core
x-pack/plugins/logs_shared @elastic/infra-monitoring-ui
Expand Down Expand Up @@ -524,6 +524,7 @@ packages/kbn-object-versioning @elastic/appex-sharedux
x-pack/plugins/observability_ai_assistant @elastic/obs-ai-assistant
x-pack/packages/observability/alert_details @elastic/actionable-observability
x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops
x-pack/plugins/observability_log_explorer @elastic/infra-monitoring-ui
x-pack/plugins/observability_onboarding @elastic/apm-ui
x-pack/plugins/observability @elastic/actionable-observability
x-pack/plugins/observability_shared @elastic/observability-ui
Expand Down
1 change: 0 additions & 1 deletion config/serverless.oblt.yml
Expand Up @@ -10,7 +10,6 @@ xpack.serverless.observability.enabled: true

## Configure plugins
xpack.infra.logs.app_target: discover
xpack.discoverLogExplorer.featureFlags.deepLinkVisible: true

## Set the home route
uiSettings.overrides.defaultRoute: /app/observability/landing
Expand Down
12 changes: 8 additions & 4 deletions docs/developer/plugin-list.asciidoc
Expand Up @@ -520,10 +520,6 @@ Plugin server-side only. Plugin has three main functions:
|Contains the enhancements to the OSS discover app.
|{kib-repo}blob/{branch}/x-pack/plugins/discover_log_explorer/README.md[discoverLogExplorer]
|This plugin registers a log-explorer profile using the Discover customization framework, offering several affordances specifically designed for log consumption.
|{kib-repo}blob/{branch}/x-pack/plugins/ecs_data_quality_dashboard/README.md[ecsDataQualityDashboard]
|This plugin implements (server) APIs used to render the content of the Data Quality dashboard.
Expand Down Expand Up @@ -632,6 +628,10 @@ the infrastructure monitoring use-case within Kibana.
using the CURL scripts in the scripts folder.
|{kib-repo}blob/{branch}/x-pack/plugins/log_explorer/README.md[logExplorer]
|This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption.
|{kib-repo}blob/{branch}/x-pack/plugins/logs_shared/README.md[logsShared]
|Exposes the shared components and APIs to access and visualize logs.
Expand Down Expand Up @@ -669,6 +669,10 @@ Elastic.
|This document gives an overview of the features of the Observability AI Assistant at the time of writing, and how to use them. At a high level, the Observability AI Assistant offers contextual insights, and a chat functionality that we enrich with function calling, allowing the LLM to hook into the user's data. We also allow the LLM to store things it considers new information as embeddings into Elasticsearch, and query this knowledge base when it decides it needs more information, using ELSER.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_log_explorer/README.md[observabilityLogExplorer]
|This plugin provides an app based on the LogExplorer component from the log_explorer plugin, but adds observability-specific affordances.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_onboarding/README.md[observabilityOnboarding]
|This plugin provides an onboarding framework for observability solutions: Logs and APM.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -374,7 +374,6 @@
"@kbn/developer-examples-plugin": "link:examples/developer_examples",
"@kbn/discover-customization-examples-plugin": "link:examples/discover_customization_examples",
"@kbn/discover-enhanced-plugin": "link:x-pack/plugins/discover_enhanced",
"@kbn/discover-log-explorer-plugin": "link:x-pack/plugins/discover_log_explorer",
"@kbn/discover-plugin": "link:src/plugins/discover",
"@kbn/discover-utils": "link:packages/kbn-discover-utils",
"@kbn/doc-links": "link:packages/kbn-doc-links",
Expand Down Expand Up @@ -494,6 +493,7 @@
"@kbn/lists-plugin": "link:x-pack/plugins/lists",
"@kbn/locator-examples-plugin": "link:examples/locator_examples",
"@kbn/locator-explorer-plugin": "link:examples/locator_explorer",
"@kbn/log-explorer-plugin": "link:x-pack/plugins/log_explorer",
"@kbn/logging": "link:packages/kbn-logging",
"@kbn/logging-mocks": "link:packages/kbn-logging-mocks",
"@kbn/logs-shared-plugin": "link:x-pack/plugins/logs_shared",
Expand Down Expand Up @@ -543,6 +543,7 @@
"@kbn/observability-ai-assistant-plugin": "link:x-pack/plugins/observability_ai_assistant",
"@kbn/observability-alert-details": "link:x-pack/packages/observability/alert_details",
"@kbn/observability-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/observability",
"@kbn/observability-log-explorer-plugin": "link:x-pack/plugins/observability_log_explorer",
"@kbn/observability-onboarding-plugin": "link:x-pack/plugins/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/plugins/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_shared",
Expand Down
2 changes: 2 additions & 0 deletions packages/deeplinks/observability/constants.ts
Expand Up @@ -8,6 +8,8 @@

export const LOGS_APP_ID = 'logs';

export const OBSERVABILITY_LOG_EXPLORER = 'observability-log-explorer';

export const OBSERVABILITY_OVERVIEW_APP_ID = 'observability-overview';

export const METRICS_APP_ID = 'metrics';
Expand Down
7 changes: 3 additions & 4 deletions packages/deeplinks/observability/deep_links.ts
Expand Up @@ -5,31 +5,31 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { DISCOVER_APP_ID } from '@kbn/deeplinks-analytics';

import {
LOGS_APP_ID,
OBSERVABILITY_LOG_EXPLORER,
OBSERVABILITY_OVERVIEW_APP_ID,
METRICS_APP_ID,
APM_APP_ID,
OBSERVABILITY_ONBOARDING_APP_ID,
} from './constants';

type LogsApp = typeof LOGS_APP_ID;
type ObservabilityLogExplorerApp = typeof OBSERVABILITY_LOG_EXPLORER;
type ObservabilityOverviewApp = typeof OBSERVABILITY_OVERVIEW_APP_ID;
type MetricsApp = typeof METRICS_APP_ID;
type ApmApp = typeof APM_APP_ID;
type ObservabilityOnboardingApp = typeof OBSERVABILITY_ONBOARDING_APP_ID;

export type AppId =
| LogsApp
| ObservabilityLogExplorerApp
| ObservabilityOverviewApp
| ObservabilityOnboardingApp
| ApmApp
| MetricsApp;

export type DiscoverLogExplorerId = `${typeof DISCOVER_APP_ID}:log-explorer`;

export type LogsLinkId = 'log-categories' | 'settings' | 'anomalies' | 'stream';

export type ObservabilityOverviewLinkId =
Expand All @@ -55,7 +55,6 @@ export type LinkId = LogsLinkId | ObservabilityOverviewLinkId | MetricsLinkId |

export type DeepLinkId =
| AppId
| DiscoverLogExplorerId
| `${LogsApp}:${LogsLinkId}`
| `${ObservabilityOverviewApp}:${ObservabilityOverviewLinkId}`
| `${MetricsApp}:${MetricsLinkId}`
Expand Down
1 change: 0 additions & 1 deletion packages/deeplinks/observability/tsconfig.json
Expand Up @@ -16,6 +16,5 @@
"target/**/*"
],
"kbn_references": [
"@kbn/deeplinks-analytics",
]
}
5 changes: 3 additions & 2 deletions packages/kbn-optimizer/limits.yml
Expand Up @@ -28,15 +28,14 @@ pageLoadAssetSize:
dashboard: 82025
dashboardEnhanced: 65646
data: 454087
dataViewEditor: 13000
dataViewEditor: 28082
dataViewFieldEditor: 27000
dataViewManagement: 5000
dataViews: 47000
dataVisualizer: 27530
devTools: 38637
discover: 99999
discoverEnhanced: 42730
discoverLogExplorer: 39045
embeddable: 87309
embeddableEnhanced: 22107
enterpriseSearch: 50858
Expand Down Expand Up @@ -87,6 +86,7 @@ pageLoadAssetSize:
licenseManagement: 41817
licensing: 29004
lists: 22900
logExplorer: 39045
logsShared: 281060
logstash: 53548
management: 46112
Expand All @@ -99,6 +99,7 @@ pageLoadAssetSize:
noDataPage: 5000
observability: 115443
observabilityAIAssistant: 25000
observabilityLogExplorer: 23686
observabilityOnboarding: 19573
observabilityShared: 52256
osquery: 107090
Expand Down
2 changes: 1 addition & 1 deletion src/dev/storybook/aliases.ts
Expand Up @@ -27,7 +27,7 @@ export const storybookAliases = {
dashboard: 'src/plugins/dashboard/.storybook',
data: 'src/plugins/data/.storybook',
discover: 'src/plugins/discover/.storybook',
discover_log_explorer: 'x-pack/plugins/discover_log_explorer/.storybook',
log_explorer: 'x-pack/plugins/log_explorer/.storybook',
embeddable: 'src/plugins/embeddable/.storybook',
es_ui_shared: 'src/plugins/es_ui_shared/.storybook',
expression_error: 'src/plugins/expression_error/.storybook',
Expand Down
Expand Up @@ -154,6 +154,7 @@ export const applicationUsageSchema = {
maps: commonSchema,
ml: commonSchema,
monitoring: commonSchema,
'observability-log-explorer': commonSchema,
'observability-overview': commonSchema,
observabilityOnboarding: commonSchema,
observabilityAIAssistant: commonSchema,
Expand Down
131 changes: 131 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Expand Up @@ -4587,6 +4587,137 @@
}
}
},
"observability-log-explorer": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"observability-overview": {
"properties": {
"appId": {
Expand Down
5 changes: 1 addition & 4 deletions test/plugin_functional/test_suites/core_plugins/rendering.ts
Expand Up @@ -293,10 +293,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.observability.unsafe.alertDetails.observability.enabled (boolean)',
'xpack.observability.unsafe.thresholdRule.enabled (boolean)',
'xpack.observability_onboarding.ui.enabled (boolean)',
/**
* xpack.discoverLogExplorer.featureFlags is conditional and will never resolve if used in non-serverless environment
*/
'xpack.discoverLogExplorer.featureFlags.deepLinkVisible (any)',
'xpack.observabilityLogExplorer.navigation.showAppLink (any)', // conditional, is actually a boolean
];
// We don't assert that actualExposedConfigKeys and expectedExposedConfigKeys are equal, because test failure messages with large
// arrays are hard to grok. Instead, we take the difference between the two arrays and assert them separately, that way it's
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.base.json
Expand Up @@ -652,8 +652,6 @@
"@kbn/discover-customization-examples-plugin/*": ["examples/discover_customization_examples/*"],
"@kbn/discover-enhanced-plugin": ["x-pack/plugins/discover_enhanced"],
"@kbn/discover-enhanced-plugin/*": ["x-pack/plugins/discover_enhanced/*"],
"@kbn/discover-log-explorer-plugin": ["x-pack/plugins/discover_log_explorer"],
"@kbn/discover-log-explorer-plugin/*": ["x-pack/plugins/discover_log_explorer/*"],
"@kbn/discover-plugin": ["src/plugins/discover"],
"@kbn/discover-plugin/*": ["src/plugins/discover/*"],
"@kbn/discover-utils": ["packages/kbn-discover-utils"],
Expand Down Expand Up @@ -938,6 +936,8 @@
"@kbn/locator-examples-plugin/*": ["examples/locator_examples/*"],
"@kbn/locator-explorer-plugin": ["examples/locator_explorer"],
"@kbn/locator-explorer-plugin/*": ["examples/locator_explorer/*"],
"@kbn/log-explorer-plugin": ["x-pack/plugins/log_explorer"],
"@kbn/log-explorer-plugin/*": ["x-pack/plugins/log_explorer/*"],
"@kbn/logging": ["packages/kbn-logging"],
"@kbn/logging/*": ["packages/kbn-logging/*"],
"@kbn/logging-mocks": ["packages/kbn-logging-mocks"],
Expand Down Expand Up @@ -1042,6 +1042,8 @@
"@kbn/observability-alert-details/*": ["x-pack/packages/observability/alert_details/*"],
"@kbn/observability-fixtures-plugin": ["x-pack/test/cases_api_integration/common/plugins/observability"],
"@kbn/observability-fixtures-plugin/*": ["x-pack/test/cases_api_integration/common/plugins/observability/*"],
"@kbn/observability-log-explorer-plugin": ["x-pack/plugins/observability_log_explorer"],
"@kbn/observability-log-explorer-plugin/*": ["x-pack/plugins/observability_log_explorer/*"],
"@kbn/observability-onboarding-plugin": ["x-pack/plugins/observability_onboarding"],
"@kbn/observability-onboarding-plugin/*": ["x-pack/plugins/observability_onboarding/*"],
"@kbn/observability-plugin": ["x-pack/plugins/observability"],
Expand Down

0 comments on commit ad59308

Please sign in to comment.