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

[APM] Removes the apm_oss plugin and deprecates related configs #113364

Merged
merged 26 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
af64ec4
[APM] Removes the apm_oss plugin and deprecates related configs (#108…
ogupte Sep 29, 2021
7483967
removes commented lines
ogupte Sep 29, 2021
1c191a6
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 1, 2021
d8d6a4e
fixes typescript errors
ogupte Oct 1, 2021
a5d2013
performs start up migration on the saved objects mapping for apm-indices
ogupte Oct 1, 2021
b763ccd
removes all references to the deprecated apm_oss.* config paths in APM
ogupte Oct 1, 2021
2925f27
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 2, 2021
dd4452d
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 4, 2021
3f99b3b
fixes missing bundle error
ogupte Oct 4, 2021
e962bff
fixes type error
ogupte Oct 4, 2021
ed2a100
fixes eslint error with disabled rules
ogupte Oct 4, 2021
52b9da0
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 4, 2021
96ca96b
fixes saved object mappings for es_archvices for tests
ogupte Oct 4, 2021
2f0ac0b
fixes eslint error
ogupte Oct 5, 2021
06d401c
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 6, 2021
66953af
Updates default index values to include the more general apm-*. Fixes…
ogupte Oct 7, 2021
82aa5b0
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 7, 2021
0122390
removing unused configs from the config path migration: apm_oss.index…
ogupte Oct 7, 2021
cbb5944
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 7, 2021
72c4e18
- replaces full index configuration paths with references in the `xpa…
ogupte Oct 12, 2021
45814dc
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 12, 2021
d9d27b8
fixes proxy mock object in unit test
ogupte Oct 12, 2021
7965f99
fixes linting issues
ogupte Oct 12, 2021
e79e90f
PR feedback and failed test
ogupte Oct 12, 2021
2812cca
changes the configs at `xpack.apm.indices.*` from plural to singular …
ogupte Oct 13, 2021
57d955d
Merge branch 'master' into apm-109104-hardcoded-data-streams
ogupte Oct 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ allowing users to configure their advanced settings, also known
as uiSettings within the code.


|{kib-repo}blob/{branch}/src/plugins/apm_oss/README.asciidoc[apmOss]
|undefined


|{kib-repo}blob/{branch}/src/plugins/bfetch/README.md[bfetch]
|bfetch allows to batch HTTP requests and streams responses back.

Expand Down
1 change: 0 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pageLoadAssetSize:
advancedSettings: 27596
alerting: 106936
apm: 64385
apmOss: 18996
bfetch: 51874
canvas: 1066647
charts: 95000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ kibana_vars=(
xpack.alerts.invalidateApiKeysTask.interval
xpack.alerts.invalidateApiKeysTask.removalDelay
xpack.apm.enabled
xpack.apm.indices.errors
xpack.apm.indices.metrics
xpack.apm.indices.onboarding
xpack.apm.indices.sourcemaps
xpack.apm.indices.spans
xpack.apm.indices.transactions
xpack.apm.maxServiceEnvironments
xpack.apm.searchAggregatedTransactions
xpack.apm.serviceMapEnabled
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/apm_oss/README.asciidoc

This file was deleted.

13 changes: 0 additions & 13 deletions src/plugins/apm_oss/kibana.json

This file was deleted.

16 changes: 0 additions & 16 deletions src/plugins/apm_oss/public/index.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/plugins/apm_oss/public/plugin.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/plugins/apm_oss/public/types.ts

This file was deleted.

40 changes: 0 additions & 40 deletions src/plugins/apm_oss/server/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/plugins/apm_oss/server/plugin.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/plugins/apm_oss/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
/* eslint-disable @typescript-eslint/naming-convention */

const apmIndicesSaveURL = '/internal/apm/settings/apm-indices/save';

Expand All @@ -20,12 +19,12 @@ describe('No data screen', () => {
url: apmIndicesSaveURL,
method: 'POST',
body: {
'apm_oss.sourcemapIndices': 'foo-*',
'apm_oss.errorIndices': 'foo-*',
'apm_oss.onboardingIndices': 'foo-*',
'apm_oss.spanIndices': 'foo-*',
'apm_oss.transactionIndices': 'foo-*',
'apm_oss.metricsIndices': 'foo-*',
sourcemaps: 'foo-*',
errors: 'foo-*',
onboarding: 'foo-*',
spans: 'foo-*',
transactions: 'foo-*',
metrics: 'foo-*',
},
headers: {
'kbn-xsrf': true,
Expand All @@ -50,12 +49,12 @@ describe('No data screen', () => {
url: apmIndicesSaveURL,
method: 'POST',
body: {
'apm_oss.sourcemapIndices': '',
'apm_oss.errorIndices': '',
'apm_oss.onboardingIndices': '',
'apm_oss.spanIndices': '',
'apm_oss.transactionIndices': '',
'apm_oss.metricsIndices': '',
sourcemaps: '',
errors: '',
onboarding: '',
spans: '',
transactions: '',
metrics: '',
},
headers: { 'kbn-xsrf': true },
auth: { user: 'apm_power_user', pass: 'changeme' },
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/apm/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"version": "8.0.0",
"kibanaVersion": "kibana",
"requiredPlugins": [
"apmOss",
"data",
"embeddable",
"features",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,40 @@ import {

const APM_INDEX_LABELS = [
{
configurationName: 'apm_oss.sourcemapIndices',
configurationName: 'sourcemap',
label: i18n.translate(
'xpack.apm.settings.apmIndices.sourcemapIndicesLabel',
{ defaultMessage: 'Sourcemap Indices' }
),
},
{
configurationName: 'apm_oss.errorIndices',
configurationName: 'error',
label: i18n.translate('xpack.apm.settings.apmIndices.errorIndicesLabel', {
defaultMessage: 'Error Indices',
}),
},
{
configurationName: 'apm_oss.onboardingIndices',
configurationName: 'onboarding',
label: i18n.translate(
'xpack.apm.settings.apmIndices.onboardingIndicesLabel',
{ defaultMessage: 'Onboarding Indices' }
),
},
{
configurationName: 'apm_oss.spanIndices',
configurationName: 'span',
label: i18n.translate('xpack.apm.settings.apmIndices.spanIndicesLabel', {
defaultMessage: 'Span Indices',
}),
},
{
configurationName: 'apm_oss.transactionIndices',
configurationName: 'transaction',
label: i18n.translate(
'xpack.apm.settings.apmIndices.transactionIndicesLabel',
{ defaultMessage: 'Transaction Indices' }
),
},
{
configurationName: 'apm_oss.metricsIndices',
configurationName: 'metric',
label: i18n.translate('xpack.apm.settings.apmIndices.metricsIndicesLabel', {
defaultMessage: 'Metrics Indices',
}),
Expand Down Expand Up @@ -145,7 +145,7 @@ export function ApmIndices() {
}
),
});
} catch (error) {
} catch (error: any) {
notifications.toasts.addDanger({
title: i18n.translate(
'xpack.apm.settings.apmIndices.applyChanges.failed.title',
Expand Down Expand Up @@ -215,7 +215,10 @@ export function ApmIndices() {
{
defaultMessage:
'Overrides {configurationName}: {defaultValue}',
values: { configurationName, defaultValue },
values: {
configurationName: `xpack.apm.indices.${configurationName}`,
defaultValue,
},
}
)}
fullWidth
Expand Down
28 changes: 12 additions & 16 deletions x-pack/plugins/apm/public/utils/testHelpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,12 @@ interface MockSetup {
config: APMConfig;
uiFilters: UxUIFilters;
indices: {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': string;
'apm_oss.errorIndices': string;
'apm_oss.onboardingIndices': string;
'apm_oss.spanIndices': string;
'apm_oss.transactionIndices': string;
'apm_oss.metricsIndices': string;
/* eslint-enable @typescript-eslint/naming-convention */
sourcemaps: string;
errors: string;
onboarding: string;
spans: string;
transactions: string;
metrics: string;
apmAgentConfigurationIndex: string;
apmCustomLinkIndex: string;
};
Expand Down Expand Up @@ -178,14 +176,12 @@ export async function inspectSearchParams(
) as APMConfig,
uiFilters: {},
indices: {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': 'myIndex',
'apm_oss.errorIndices': 'myIndex',
'apm_oss.onboardingIndices': 'myIndex',
'apm_oss.spanIndices': 'myIndex',
'apm_oss.transactionIndices': 'myIndex',
'apm_oss.metricsIndices': 'myIndex',
/* eslint-enable @typescript-eslint/naming-convention */
sourcemaps: 'myIndex',
errors: 'myIndex',
onboarding: 'myIndex',
spans: 'myIndex',
transactions: 'myIndex',
metrics: 'myIndex',
apmAgentConfigurationIndex: 'myIndex',
apmCustomLinkIndex: 'myIndex',
},
Expand Down
14 changes: 6 additions & 8 deletions x-pack/plugins/apm/scripts/shared/read-kibana-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ export const readKibanaConfig = () => {
};

return {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.transactionIndices': 'apm-*',
'apm_oss.metricsIndices': 'apm-*',
'apm_oss.errorIndices': 'apm-*',
'apm_oss.spanIndices': 'apm-*',
'apm_oss.onboardingIndices': 'apm-*',
'apm_oss.sourcemapIndices': 'apm-*',
/* eslint-enable @typescript-eslint/naming-convention */
'xpack.apm.indices.transaction': 'traces-apm*,apm-*',
'xpack.apm.indices.metric': 'metrics-apm*,apm-*',
'xpack.apm.indices.error': 'logs-apm*,apm-*',
'xpack.apm.indices.span': 'traces-apm*,apm-*',
'xpack.apm.indices.onboarding': 'apm-*',
'xpack.apm.indices.sourcemap': 'apm-*',
'elasticsearch.hosts': 'http://localhost:9200',
...loadedKibanaConfig,
...cliEsCredentials,
Expand Down
7 changes: 6 additions & 1 deletion x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ async function uploadData() {
collectTelemetryParams: {
logger: console as unknown as Logger,
indices: {
...config,
transaction: config['xpack.apm.indices.transaction'],
metric: config['xpack.apm.indices.metric'],
error: config['xpack.apm.indices.error'],
span: config['xpack.apm.indices.span'],
onboarding: config['xpack.apm.indices.onboarding'],
sourcemap: config['xpack.apm.indices.sourcemap'],
apmCustomLinkIndex: '.apm-custom-links',
apmAgentConfigurationIndex: '.apm-agent-configuration',
},
Expand Down
Loading