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

* [APM] Removes the apm_oss plugin and deprecates related configs (#108160)

* removes commented lines

* fixes typescript errors

* performs start up migration on the saved objects mapping for apm-indices

* removes all references to the deprecated apm_oss.* config paths in APM

* fixes missing bundle error

* fixes type error

* fixes eslint error with disabled rules

* fixes saved object mappings for es_archvices for tests

* fixes eslint error

* Updates default index values to include the more general apm-*. Fixes broken tests.

* removing unused configs from the config path migration: apm_oss.indexPattern and apm_oss.fleetMode

* - replaces full index configuration paths with references in the `xpack.apm.indices` namespace
- removes mergeConfig function and test

* fixes proxy mock object in unit test

* fixes linting issues

* PR feedback and failed test

* changes the configs at `xpack.apm.indices.*` from plural to singular to match `processor.event` values
This commit is contained in:
Oliver Gupte 2021-10-13 03:16:21 -04:00 committed by GitHub
parent 935ba166f9
commit 3d75154368
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 884 additions and 1298 deletions

View file

@ -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.

View file

@ -2,7 +2,6 @@ pageLoadAssetSize:
advancedSettings: 27596
alerting: 106936
apm: 64385
apmOss: 18996
bfetch: 51874
canvas: 1066647
charts: 95000

View file

@ -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

View file

@ -1,5 +0,0 @@
# APM OSS plugin
OSS plugin for APM. Includes index configuration and tutorial resources.
See <<../../x-pack/plugins/apm/readme.md,the X-Pack APM plugin README>> for information about the main APM plugin.

View file

@ -1,13 +0,0 @@
{
"id": "apmOss",
"owner": {
"name": "APM UI",
"githubTeam": "apm-ui"
},
"version": "8.0.0",
"server": true,
"kibanaVersion": "kibana",
"configPath": ["apm_oss"],
"ui": true,
"requiredPlugins": ["home"]
}

View file

@ -1,16 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ApmOssPlugin } from './plugin';
// This exports static code and TypeScript types,
// as well as, Kibana Platform `plugin()` initializer.
export function plugin() {
return new ApmOssPlugin();
}
export { ApmOssPluginSetup, ApmOssPluginStart } from './types';

View file

@ -1,22 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { CoreSetup, CoreStart, Plugin } from 'kibana/public';
import { ApmOssPluginSetup, ApmOssPluginStart } from './types';
export class ApmOssPlugin implements Plugin<ApmOssPluginSetup, ApmOssPluginStart> {
public setup(core: CoreSetup): ApmOssPluginSetup {
return {};
}
public start(core: CoreStart): ApmOssPluginStart {
return {};
}
public stop() {}
}

View file

@ -1,16 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ApmOssPluginSetup {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ApmOssPluginStart {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AppPluginStartDependencies {}

View file

@ -1,40 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { schema, TypeOf } from '@kbn/config-schema';
import { ConfigDeprecationProvider, PluginInitializerContext } from '../../../core/server';
import { APMOSSPlugin } from './plugin';
const deprecations: ConfigDeprecationProvider = ({ deprecate, unused }) => [
deprecate('enabled', '8.0.0'),
unused('fleetMode'),
unused('indexPattern'),
];
export const config = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
transactionIndices: schema.string({ defaultValue: 'apm-*' }),
spanIndices: schema.string({ defaultValue: 'apm-*' }),
errorIndices: schema.string({ defaultValue: 'apm-*' }),
metricsIndices: schema.string({ defaultValue: 'apm-*' }),
sourcemapIndices: schema.string({ defaultValue: 'apm-*' }),
onboardingIndices: schema.string({ defaultValue: 'apm-*' }),
indexPattern: schema.string({ defaultValue: 'apm-*' }),
fleetMode: schema.boolean({ defaultValue: true }),
}),
deprecations,
};
export function plugin(initializerContext: PluginInitializerContext) {
return new APMOSSPlugin(initializerContext);
}
export type APMOSSConfig = TypeOf<typeof config.schema>;
export { APMOSSPluginSetup } from './plugin';

View file

@ -1,30 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { Observable } from 'rxjs';
import { Plugin, PluginInitializerContext } from 'src/core/server';
import { APMOSSConfig } from './';
export class APMOSSPlugin implements Plugin<APMOSSPluginSetup> {
constructor(private readonly initContext: PluginInitializerContext) {
this.initContext = initContext;
}
public setup() {
const config$ = this.initContext.config.create<APMOSSConfig>();
const config = this.initContext.config.get<APMOSSConfig>();
return { config, config$ };
}
start() {}
stop() {}
}
export interface APMOSSPluginSetup {
config: APMOSSConfig;
config$: Observable<APMOSSConfig>;
}

View file

@ -1,17 +0,0 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
// have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636
"server/tutorial/index_pattern.json"
],
"references": [{ "path": "../../core/tsconfig.json" }, { "path": "../home/tsconfig.json" }]
}

View file

@ -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';
@ -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,
@ -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' },

View file

@ -8,7 +8,6 @@
"version": "8.0.0",
"kibanaVersion": "kibana",
"requiredPlugins": [
"apmOss",
"data",
"embeddable",
"features",

View file

@ -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',
}),
@ -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',
@ -215,7 +215,10 @@ export function ApmIndices() {
{
defaultMessage:
'Overrides {configurationName}: {defaultValue}',
values: { configurationName, defaultValue },
values: {
configurationName: `xpack.apm.indices.${configurationName}`,
defaultValue,
},
}
)}
fullWidth

View file

@ -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;
};
@ -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',
},

View file

@ -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,

View file

@ -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',
},

View file

@ -1,40 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import { APMOSSConfig } from 'src/plugins/apm_oss/server';
import { APMXPackConfig } from '.';
import { mergeConfigs } from './index';
describe('mergeConfigs', () => {
it('merges the configs', () => {
const apmOssConfig = {
transactionIndices: 'apm-*-transaction-*',
spanIndices: 'apm-*-span-*',
errorIndices: 'apm-*-error-*',
metricsIndices: 'apm-*-metric-*',
} as APMOSSConfig;
const apmConfig = {
ui: { enabled: false },
enabled: true,
metricsInterval: 2000,
agent: { migrations: { enabled: true } },
} as APMXPackConfig;
expect(mergeConfigs(apmOssConfig, apmConfig)).toEqual({
'apm_oss.errorIndices': 'logs-apm*,apm-*-error-*',
'apm_oss.metricsIndices': 'metrics-apm*,apm-*-metric-*',
'apm_oss.spanIndices': 'traces-apm*,apm-*-span-*',
'apm_oss.transactionIndices': 'traces-apm*,apm-*-transaction-*',
'xpack.apm.metricsInterval': 2000,
'xpack.apm.ui.enabled': false,
'xpack.apm.agent.migrations.enabled': true,
});
});
});

View file

@ -10,11 +10,12 @@ import {
PluginConfigDescriptor,
PluginInitializerContext,
} from 'src/core/server';
import { APMOSSConfig } from 'src/plugins/apm_oss/server';
import { maxSuggestions } from '../../observability/common';
import { SearchAggregatedTransactionSetting } from '../common/aggregated_transactions';
import { APMPlugin } from './plugin';
// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/master/docs/settings/apm-settings.asciidoc
// and be included on cloud allow list unless there are specific reasons not to
const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
serviceMapEnabled: schema.boolean({ defaultValue: true }),
@ -47,12 +48,37 @@ const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),
}),
indices: schema.object({
transaction: schema.string({ defaultValue: 'traces-apm*,apm-*' }),
span: schema.string({ defaultValue: 'traces-apm*,apm-*' }),
error: schema.string({ defaultValue: 'logs-apm*,apm-*' }),
metric: schema.string({ defaultValue: 'metrics-apm*,apm-*' }),
sourcemap: schema.string({ defaultValue: 'apm-*' }),
onboarding: schema.string({ defaultValue: 'apm-*' }),
}),
});
// plugin config
export const config: PluginConfigDescriptor<APMXPackConfig> = {
deprecations: ({ deprecate, renameFromRoot }) => [
export const config: PluginConfigDescriptor<APMConfig> = {
deprecations: ({
deprecate,
renameFromRoot,
deprecateFromRoot,
unusedFromRoot,
}) => [
deprecate('enabled', '8.0.0'),
renameFromRoot(
'apm_oss.transactionIndices',
'xpack.apm.indices.transaction'
),
renameFromRoot('apm_oss.spanIndices', 'xpack.apm.indices.span'),
renameFromRoot('apm_oss.errorIndices', 'xpack.apm.indices.error'),
renameFromRoot('apm_oss.metricsIndices', 'xpack.apm.indices.metric'),
renameFromRoot('apm_oss.sourcemapIndices', 'xpack.apm.indices.sourcemap'),
renameFromRoot('apm_oss.onboardingIndices', 'xpack.apm.indices.onboarding'),
deprecateFromRoot('apm_oss.enabled', '8.0.0'),
unusedFromRoot('apm_oss.fleetMode'),
unusedFromRoot('apm_oss.indexPattern'),
renameFromRoot(
'xpack.apm.maxServiceEnvironments',
`uiSettings.overrides[${maxSuggestions}]`
@ -70,69 +96,8 @@ export const config: PluginConfigDescriptor<APMXPackConfig> = {
schema: configSchema,
};
export type APMXPackConfig = TypeOf<typeof configSchema>;
export type APMConfig = ReturnType<typeof mergeConfigs>;
// plugin config and ui indices settings
// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/master/docs/settings/apm-settings.asciidoc
// and be included on cloud allow list unless there are specific reasons not to
export function mergeConfigs(
apmOssConfig: APMOSSConfig,
apmConfig: APMXPackConfig
) {
const mergedConfig = {
/* eslint-disable @typescript-eslint/naming-convention */
// TODO: Remove all apm_oss options by 8.0
'apm_oss.transactionIndices': apmOssConfig.transactionIndices,
'apm_oss.spanIndices': apmOssConfig.spanIndices,
'apm_oss.errorIndices': apmOssConfig.errorIndices,
'apm_oss.metricsIndices': apmOssConfig.metricsIndices,
'apm_oss.sourcemapIndices': apmOssConfig.sourcemapIndices,
'apm_oss.onboardingIndices': apmOssConfig.onboardingIndices,
/* eslint-enable @typescript-eslint/naming-convention */
'xpack.apm.serviceMapEnabled': apmConfig.serviceMapEnabled,
'xpack.apm.serviceMapFingerprintBucketSize':
apmConfig.serviceMapFingerprintBucketSize,
'xpack.apm.serviceMapTraceIdBucketSize':
apmConfig.serviceMapTraceIdBucketSize,
'xpack.apm.serviceMapFingerprintGlobalBucketSize':
apmConfig.serviceMapFingerprintGlobalBucketSize,
'xpack.apm.serviceMapTraceIdGlobalBucketSize':
apmConfig.serviceMapTraceIdGlobalBucketSize,
'xpack.apm.serviceMapMaxTracesPerRequest':
apmConfig.serviceMapMaxTracesPerRequest,
'xpack.apm.ui.enabled': apmConfig.ui.enabled,
'xpack.apm.ui.maxTraceItems': apmConfig.ui.maxTraceItems,
'xpack.apm.ui.transactionGroupBucketSize':
apmConfig.ui.transactionGroupBucketSize,
'xpack.apm.autocreateApmIndexPattern': apmConfig.autocreateApmIndexPattern,
'xpack.apm.telemetryCollectionEnabled':
apmConfig.telemetryCollectionEnabled,
'xpack.apm.searchAggregatedTransactions':
apmConfig.searchAggregatedTransactions,
'xpack.apm.metricsInterval': apmConfig.metricsInterval,
'xpack.apm.agent.migrations.enabled': apmConfig.agent.migrations.enabled,
};
// Add data stream indices to list of configured values
mergedConfig[
'apm_oss.transactionIndices'
] = `traces-apm*,${mergedConfig['apm_oss.transactionIndices']}`;
mergedConfig[
'apm_oss.spanIndices'
] = `traces-apm*,${mergedConfig['apm_oss.spanIndices']}`;
mergedConfig[
'apm_oss.errorIndices'
] = `logs-apm*,${mergedConfig['apm_oss.errorIndices']}`;
mergedConfig[
'apm_oss.metricsIndices'
] = `metrics-apm*,${mergedConfig['apm_oss.metricsIndices']}`;
return mergedConfig;
}
export type APMConfig = TypeOf<typeof configSchema>;
export type ApmIndicesConfigName = keyof APMConfig['indices'];
export const plugin = (initContext: PluginInitializerContext) =>
new APMPlugin(initContext);

View file

@ -99,7 +99,7 @@ export function registerErrorCountAlertType({
});
const searchParams = {
index: indices['apm_oss.errorIndices'],
index: indices.error,
size: 0,
body: {
query: {

View file

@ -115,12 +115,12 @@ export function registerTransactionDurationAlertType({
// to prevent (likely) unnecessary blocking request
// in rule execution
const searchAggregatedTransactions =
config['xpack.apm.searchAggregatedTransactions'] !==
config.searchAggregatedTransactions !==
SearchAggregatedTransactionSetting.never;
const index = searchAggregatedTransactions
? indices['apm_oss.metricsIndices']
: indices['apm_oss.transactionIndices'];
? indices.metric
: indices.transaction;
const field = getTransactionDurationFieldForAggregatedTransactions(
searchAggregatedTransactions

View file

@ -110,12 +110,12 @@ export function registerTransactionErrorRateAlertType({
// to prevent (likely) unnecessary blocking request
// in rule execution
const searchAggregatedTransactions =
config['xpack.apm.searchAggregatedTransactions'] !==
config.searchAggregatedTransactions !==
SearchAggregatedTransactionSetting.never;
const index = searchAggregatedTransactions
? indices['apm_oss.metricsIndices']
: indices['apm_oss.transactionIndices'];
? indices.metric
: indices.transaction;
const searchParams = {
index,

View file

@ -17,10 +17,10 @@ export const createRuleTypeMocks = () => {
let alertExecutor: (...args: any[]) => Promise<any>;
const mockedConfig$ = of({
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.errorIndices': 'apm-*',
'apm_oss.transactionIndices': 'apm-*',
/* eslint-enable @typescript-eslint/naming-convention */
indices: {
error: 'apm-*',
transaction: 'apm-*',
},
} as APMConfig);
const loggerMock = {

View file

@ -50,7 +50,7 @@ export async function createAnomalyDetectionJobs(
`Creating ML anomaly detection jobs for environments: [${uniqueMlJobEnvs}].`
);
const indexPatternName = indices['apm_oss.metricsIndices'];
const indexPatternName = indices.metric;
const responses = await Promise.all(
uniqueMlJobEnvs.map((environment) =>
createAnomalyDetectionJob({ ml, environment, indexPatternName })

View file

@ -14,12 +14,10 @@ import {
describe('data telemetry collection tasks', () => {
const indices = {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.errorIndices': 'apm-8.0.0-error',
'apm_oss.metricsIndices': 'apm-8.0.0-metric',
'apm_oss.spanIndices': 'apm-8.0.0-span',
'apm_oss.transactionIndices': 'apm-8.0.0-transaction',
/* eslint-enable @typescript-eslint/naming-convention */
error: 'apm-8.0.0-error',
metric: 'apm-8.0.0-metric',
span: 'apm-8.0.0-span',
transaction: 'apm-8.0.0-transaction',
} as ApmIndicesConfig;
describe('environments', () => {

View file

@ -78,7 +78,7 @@ export const tasks: TelemetryTask[] = [
};
const params = {
index: [indices['apm_oss.transactionIndices']],
index: [indices.transaction],
body: {
size: 0,
timeout,
@ -138,7 +138,7 @@ export const tasks: TelemetryTask[] = [
// fixed date range for reliable results
const lastTransaction = (
await search({
index: indices['apm_oss.transactionIndices'],
index: indices.transaction,
body: {
query: {
bool: {
@ -253,10 +253,10 @@ export const tasks: TelemetryTask[] = [
const response = await search({
index: [
indices['apm_oss.errorIndices'],
indices['apm_oss.metricsIndices'],
indices['apm_oss.spanIndices'],
indices['apm_oss.transactionIndices'],
indices.error,
indices.metric,
indices.span,
indices.transaction,
],
body: {
size: 0,
@ -310,10 +310,10 @@ export const tasks: TelemetryTask[] = [
const response = await search({
index: [
indices['apm_oss.errorIndices'],
indices['apm_oss.metricsIndices'],
indices['apm_oss.spanIndices'],
indices['apm_oss.transactionIndices'],
indices.error,
indices.metric,
indices.span,
indices.transaction,
],
body: {
size: 0,
@ -345,7 +345,7 @@ export const tasks: TelemetryTask[] = [
name: 'environments',
executor: async ({ indices, search }) => {
const response = await search({
index: [indices['apm_oss.transactionIndices']],
index: [indices.transaction],
body: {
query: {
bool: {
@ -426,12 +426,12 @@ export const tasks: TelemetryTask[] = [
name: 'processor_events',
executor: async ({ indices, search }) => {
const indicesByProcessorEvent = {
error: indices['apm_oss.errorIndices'],
metric: indices['apm_oss.metricsIndices'],
span: indices['apm_oss.spanIndices'],
transaction: indices['apm_oss.transactionIndices'],
onboarding: indices['apm_oss.onboardingIndices'],
sourcemap: indices['apm_oss.sourcemapIndices'],
error: indices.error,
metric: indices.metric,
span: indices.span,
transaction: indices.transaction,
onboarding: indices.onboarding,
sourcemap: indices.sourcemap,
};
type ProcessorEvent = keyof typeof indicesByProcessorEvent;
@ -549,10 +549,10 @@ export const tasks: TelemetryTask[] = [
return prevJob.then(async (data) => {
const response = await search({
index: [
indices['apm_oss.errorIndices'],
indices['apm_oss.spanIndices'],
indices['apm_oss.metricsIndices'],
indices['apm_oss.transactionIndices'],
indices.error,
indices.span,
indices.metric,
indices.transaction,
],
body: {
size: 0,
@ -598,11 +598,7 @@ export const tasks: TelemetryTask[] = [
name: 'versions',
executor: async ({ search, indices }) => {
const response = await search({
index: [
indices['apm_oss.transactionIndices'],
indices['apm_oss.spanIndices'],
indices['apm_oss.errorIndices'],
],
index: [indices.transaction, indices.span, indices.error],
terminateAfter: 1,
body: {
query: {
@ -647,7 +643,7 @@ export const tasks: TelemetryTask[] = [
executor: async ({ search, indices }) => {
const errorGroupsCount = (
await search({
index: indices['apm_oss.errorIndices'],
index: indices.error,
body: {
size: 0,
timeout,
@ -683,7 +679,7 @@ export const tasks: TelemetryTask[] = [
const transactionGroupsCount = (
await search({
index: indices['apm_oss.transactionIndices'],
index: indices.transaction,
body: {
size: 0,
timeout,
@ -719,7 +715,7 @@ export const tasks: TelemetryTask[] = [
const tracesPerDayCount = (
await search({
index: indices['apm_oss.transactionIndices'],
index: indices.transaction,
body: {
query: {
bool: {
@ -741,11 +737,7 @@ export const tasks: TelemetryTask[] = [
const servicesCount = (
await search({
index: [
indices['apm_oss.transactionIndices'],
indices['apm_oss.errorIndices'],
indices['apm_oss.metricsIndices'],
],
index: [indices.transaction, indices.error, indices.metric],
body: {
size: 0,
timeout,
@ -811,11 +803,7 @@ export const tasks: TelemetryTask[] = [
const data = await prevJob;
const response = await search({
index: [
indices['apm_oss.errorIndices'],
indices['apm_oss.metricsIndices'],
indices['apm_oss.transactionIndices'],
],
index: [indices.error, indices.metric, indices.transaction],
body: {
size: 0,
timeout,
@ -1006,12 +994,12 @@ export const tasks: TelemetryTask[] = [
const response = await indicesStats({
index: [
indices.apmAgentConfigurationIndex,
indices['apm_oss.errorIndices'],
indices['apm_oss.metricsIndices'],
indices['apm_oss.onboardingIndices'],
indices['apm_oss.sourcemapIndices'],
indices['apm_oss.spanIndices'],
indices['apm_oss.transactionIndices'],
indices.error,
indices.metric,
indices.onboarding,
indices.sourcemap,
indices.span,
indices.transaction,
],
});

View file

@ -43,14 +43,12 @@ describe('get buckets', () => {
}
) as APMConfig,
indices: {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': 'apm-*',
'apm_oss.errorIndices': 'apm-*',
'apm_oss.onboardingIndices': 'apm-*',
'apm_oss.spanIndices': 'apm-*',
'apm_oss.transactionIndices': 'apm-*',
'apm_oss.metricsIndices': 'apm-*',
/* eslint-enable @typescript-eslint/naming-convention */
sourcemap: 'apm-*',
error: 'apm-*',
onboarding: 'apm-*',
span: 'apm-*',
transaction: 'apm-*',
metric: 'apm-*',
apmAgentConfigurationIndex: '.apm-agent-configuration',
apmCustomLinkIndex: '.apm-custom-link',
},

View file

@ -58,8 +58,7 @@ describe('getIsUsingTransactionEvents', () => {
describe('with config xpack.apm.searchAggregatedTransactions: never', () => {
const config = {
'xpack.apm.searchAggregatedTransactions':
SearchAggregatedTransactionSetting.never,
searchAggregatedTransactions: SearchAggregatedTransactionSetting.never,
};
it('should be false', async () => {
@ -81,8 +80,7 @@ describe('getIsUsingTransactionEvents', () => {
describe('with config xpack.apm.searchAggregatedTransactions: always', () => {
const config = {
'xpack.apm.searchAggregatedTransactions':
SearchAggregatedTransactionSetting.always,
searchAggregatedTransactions: SearchAggregatedTransactionSetting.always,
};
it('should be false when kuery is empty', async () => {
mock = await inspectSearchParams(
@ -164,8 +162,7 @@ describe('getIsUsingTransactionEvents', () => {
describe('with config xpack.apm.searchAggregatedTransactions: auto', () => {
const config = {
'xpack.apm.searchAggregatedTransactions':
SearchAggregatedTransactionSetting.auto,
searchAggregatedTransactions: SearchAggregatedTransactionSetting.auto,
};
it('should query for data once if metrics data found', async () => {

View file

@ -23,8 +23,7 @@ export async function getIsUsingTransactionEvents({
start?: number;
end?: number;
}): Promise<boolean> {
const searchAggregatedTransactions =
config['xpack.apm.searchAggregatedTransactions'];
const searchAggregatedTransactions = config.searchAggregatedTransactions;
if (
searchAggregatedTransactions === SearchAggregatedTransactionSetting.never

View file

@ -63,8 +63,7 @@ export async function getSearchAggregatedTransactions({
apmEventClient: APMEventClient;
kuery: string;
}): Promise<boolean> {
const searchAggregatedTransactions =
config['xpack.apm.searchAggregatedTransactions'];
const searchAggregatedTransactions = config.searchAggregatedTransactions;
if (
kuery ||

View file

@ -5,7 +5,6 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import { APMEventESSearchRequest } from '.';
import { ApmIndicesConfig } from '../../../settings/apm_indices/get_apm_indices';
import { unpackProcessorEvents } from './unpack_processor_events';
@ -19,12 +18,12 @@ describe('unpackProcessorEvents', () => {
} as APMEventESSearchRequest;
const indices = {
'apm_oss.transactionIndices': 'my-apm-*-transaction-*',
'apm_oss.metricsIndices': 'my-apm-*-metric-*',
'apm_oss.errorIndices': 'my-apm-*-error-*',
'apm_oss.spanIndices': 'my-apm-*-span-*',
'apm_oss.onboardingIndices': 'my-apm-*-onboarding-',
'apm_oss.sourcemapIndices': 'my-apm-*-sourcemap-*',
transaction: 'my-apm-*-transaction-*',
metric: 'my-apm-*-metric-*',
error: 'my-apm-*-error-*',
span: 'my-apm-*-span-*',
onboarding: 'my-apm-*-onboarding-*',
sourcemap: 'my-apm-*-sourcemap-*',
} as ApmIndicesConfig;
res = unpackProcessorEvents(request, indices);

View file

@ -13,19 +13,16 @@ import {
ESFilter,
} from '../../../../../../../../src/core/types/elasticsearch';
import { APMEventESSearchRequest, APMEventESTermsEnumRequest } from '.';
import {
ApmIndicesConfig,
ApmIndicesName,
} from '../../../settings/apm_indices/get_apm_indices';
import { ApmIndicesConfig } from '../../../settings/apm_indices/get_apm_indices';
const processorEventIndexMap: Record<ProcessorEvent, ApmIndicesName> = {
[ProcessorEvent.transaction]: 'apm_oss.transactionIndices',
[ProcessorEvent.span]: 'apm_oss.spanIndices',
[ProcessorEvent.metric]: 'apm_oss.metricsIndices',
[ProcessorEvent.error]: 'apm_oss.errorIndices',
const processorEventIndexMap = {
[ProcessorEvent.transaction]: 'transaction',
[ProcessorEvent.span]: 'span',
[ProcessorEvent.metric]: 'metric',
[ProcessorEvent.error]: 'error',
// TODO: should have its own config setting
[ProcessorEvent.profile]: 'apm_oss.transactionIndices',
};
[ProcessorEvent.profile]: 'transaction',
} as const;
export function unpackProcessorEvents(
request: APMEventESSearchRequest | APMEventESTermsEnumRequest,

View file

@ -10,19 +10,20 @@ import { APMConfig } from '../..';
import { APMRouteHandlerResources } from '../../routes/typings';
import { ProcessorEvent } from '../../../common/processor_event';
import { PROCESSOR_EVENT } from '../../../common/elasticsearch_fieldnames';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { PromiseReturnType } from '../../../../observability/typings/common';
jest.mock('../settings/apm_indices/get_apm_indices', () => ({
getApmIndices: async () => ({
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': 'apm-*',
'apm_oss.errorIndices': 'apm-*',
'apm_oss.onboardingIndices': 'apm-*',
'apm_oss.spanIndices': 'apm-*',
'apm_oss.transactionIndices': 'apm-*',
'apm_oss.metricsIndices': 'apm-*',
/* eslint-enable @typescript-eslint/naming-convention */
apmAgentConfigurationIndex: 'apm-*',
}),
getApmIndices: async () =>
({
sourcemap: 'apm-*',
error: 'apm-*',
onboarding: 'apm-*',
span: 'apm-*',
transaction: 'apm-*',
metric: 'apm-*',
apmAgentConfigurationIndex: 'apm-*',
} as PromiseReturnType<typeof getApmIndices>),
}));
jest.mock('../index_pattern/get_dynamic_index_pattern', () => ({

View file

@ -5,7 +5,6 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import { createStaticIndexPattern } from './create_static_index_pattern';
import { Setup } from '../helpers/setup_request';
import * as HistoricalAgentData from '../../routes/historical_data/has_historical_agent_data';
@ -25,11 +24,11 @@ function getMockSavedObjectsClient(existingIndexPatternTitle: string) {
const setup = {
indices: {
'apm_oss.transactionIndices': 'apm-*-transaction-*',
'apm_oss.spanIndices': 'apm-*-span-*',
'apm_oss.errorIndices': 'apm-*-error-*',
'apm_oss.metricsIndices': 'apm-*-metrics-*',
},
transaction: 'apm-*-transaction-*',
span: 'apm-*-span-*',
error: 'apm-*-error-*',
metric: 'apm-*-metrics-*',
} as APMConfig['indices'],
} as unknown as Setup;
describe('createStaticIndexPattern', () => {
@ -37,7 +36,7 @@ describe('createStaticIndexPattern', () => {
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
await createStaticIndexPattern({
setup,
config: { 'xpack.apm.autocreateApmIndexPattern': false } as APMConfig,
config: { autocreateApmIndexPattern: false } as APMConfig,
savedObjectsClient,
spaceId: 'default',
});
@ -54,7 +53,7 @@ describe('createStaticIndexPattern', () => {
await createStaticIndexPattern({
setup,
config: { 'xpack.apm.autocreateApmIndexPattern': true } as APMConfig,
config: { autocreateApmIndexPattern: true } as APMConfig,
savedObjectsClient,
spaceId: 'default',
});
@ -71,7 +70,7 @@ describe('createStaticIndexPattern', () => {
await createStaticIndexPattern({
setup,
config: { 'xpack.apm.autocreateApmIndexPattern': true } as APMConfig,
config: { autocreateApmIndexPattern: true } as APMConfig,
savedObjectsClient,
spaceId: 'default',
});
@ -91,9 +90,7 @@ describe('createStaticIndexPattern', () => {
await createStaticIndexPattern({
setup,
config: {
'xpack.apm.autocreateApmIndexPattern': true,
} as APMConfig,
config: { autocreateApmIndexPattern: true } as APMConfig,
savedObjectsClient,
spaceId: 'default',
});
@ -120,9 +117,7 @@ describe('createStaticIndexPattern', () => {
await createStaticIndexPattern({
setup,
config: {
'xpack.apm.autocreateApmIndexPattern': true,
} as APMConfig,
config: { autocreateApmIndexPattern: true } as APMConfig,
savedObjectsClient,
spaceId: 'default',
});

View file

@ -34,7 +34,7 @@ export async function createStaticIndexPattern({
}): Promise<boolean> {
return withApmSpan('create_static_index_pattern', async () => {
// don't autocreate APM index pattern if it's been disabled via the config
if (!config['xpack.apm.autocreateApmIndexPattern']) {
if (!config.autocreateApmIndexPattern) {
return false;
}

View file

@ -5,18 +5,16 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices';
import { getApmIndexPatternTitle } from './get_apm_index_pattern_title';
describe('getApmIndexPatternTitle', () => {
it('returns an index pattern title by combining existing indicies', () => {
const title = getApmIndexPatternTitle({
'apm_oss.transactionIndices': 'apm-*-transaction-*',
'apm_oss.spanIndices': 'apm-*-span-*',
'apm_oss.errorIndices': 'apm-*-error-*',
'apm_oss.metricsIndices': 'apm-*-metrics-*',
transaction: 'apm-*-transaction-*',
span: 'apm-*-span-*',
error: 'apm-*-error-*',
metric: 'apm-*-metrics-*',
} as ApmIndicesConfig);
expect(title).toBe(
'apm-*-transaction-*,apm-*-span-*,apm-*-error-*,apm-*-metrics-*'
@ -25,10 +23,10 @@ describe('getApmIndexPatternTitle', () => {
it('removes duplicates', () => {
const title = getApmIndexPatternTitle({
'apm_oss.transactionIndices': 'apm-*',
'apm_oss.spanIndices': 'apm-*',
'apm_oss.errorIndices': 'apm-*',
'apm_oss.metricsIndices': 'apm-*',
transaction: 'apm-*',
span: 'apm-*',
error: 'apm-*',
metric: 'apm-*',
} as ApmIndicesConfig);
expect(title).toBe('apm-*');
});

View file

@ -10,9 +10,9 @@ import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices';
export function getApmIndexPatternTitle(apmIndicesConfig: ApmIndicesConfig) {
return uniq([
apmIndicesConfig['apm_oss.transactionIndices'],
apmIndicesConfig['apm_oss.spanIndices'],
apmIndicesConfig['apm_oss.errorIndices'],
apmIndicesConfig['apm_oss.metricsIndices'],
apmIndicesConfig.transaction,
apmIndicesConfig.span,
apmIndicesConfig.error,
apmIndicesConfig.metric,
]).join(',');
}

View file

@ -85,7 +85,7 @@ export async function fetchAndTransformGcMetrics({
date_histogram: getMetricsDateHistogramParams({
start,
end,
metricsInterval: config['xpack.apm.metricsInterval'],
metricsInterval: config.metricsInterval,
}),
aggs: {
// get the max value

View file

@ -99,7 +99,7 @@ export async function fetchAndTransformMetrics<T extends MetricAggs>({
date_histogram: getMetricsDateHistogramParams({
start,
end,
metricsInterval: config['xpack.apm.metricsInterval'],
metricsInterval: config.metricsInterval,
}),
aggs,
},

View file

@ -56,7 +56,7 @@ export async function hasRumData({
const response = await apmEventClient.search('has_rum_data', params);
return {
indices: setup.indices['apm_oss.transactionIndices']!,
indices: setup.indices.transaction,
hasData: response.hits.total.value > 0,
serviceName:
response.aggregations?.services?.mostTraffic?.buckets?.[0]?.key,
@ -65,7 +65,7 @@ export async function hasRumData({
return {
hasData: false,
serviceName: undefined,
indices: setup.indices['apm_oss.transactionIndices']!,
indices: setup.indices.transaction,
};
}
}

View file

@ -65,7 +65,7 @@ export const failedTransactionsCorrelationsSearchServiceProvider: FailedTransact
const params: FailedTransactionsCorrelationsRequestParams &
SearchStrategyServerParams = {
...searchServiceParams,
index: indices['apm_oss.transactionIndices'],
index: indices.transaction,
includeFrozen,
};

View file

@ -67,7 +67,7 @@ export const latencyCorrelationsSearchServiceProvider: LatencyCorrelationsSearch
const indices = await getApmIndices();
params = {
...searchServiceParams,
index: indices['apm_oss.transactionIndices'],
index: indices.transaction,
includeFrozen,
};

View file

@ -90,10 +90,7 @@ const clientSearchMock = (
};
const getApmIndicesMock = async () =>
({
// eslint-disable-next-line @typescript-eslint/naming-convention
'apm_oss.transactionIndices': 'apm-*',
} as ApmIndicesConfig);
({ transaction: 'apm-*' } as ApmIndicesConfig);
describe('APM Correlations search strategy', () => {
describe('strategy interface', () => {

View file

@ -53,10 +53,7 @@ async function getConnectionData({
end,
});
const chunks = chunk(
traceIds,
setup.config['xpack.apm.serviceMapMaxTracesPerRequest']
);
const chunks = chunk(traceIds, setup.config.serviceMapMaxTracesPerRequest);
const init = {
connections: [],

View file

@ -70,9 +70,7 @@ describe('getServiceMapServiceNodeInfo', () => {
indices: {},
start: 1593460053026000,
end: 1593497863217000,
config: {
'xpack.apm.metricsInterval': 30,
},
config: { metricsInterval: 30 },
uiFilters: { environment: 'test environment' },
} as unknown as Setup;
const serviceName = 'test service name';

View file

@ -60,13 +60,11 @@ export async function getTraceSampleIds({
query.bool.filter.push(...environmentQuery(environment));
const fingerprintBucketSize = serviceName
? config['xpack.apm.serviceMapFingerprintBucketSize']
: config['xpack.apm.serviceMapFingerprintGlobalBucketSize'];
? config.serviceMapFingerprintBucketSize
: config.serviceMapFingerprintGlobalBucketSize;
const traceIdBucketSize = serviceName
? config['xpack.apm.serviceMapTraceIdBucketSize']
: config['xpack.apm.serviceMapTraceIdGlobalBucketSize'];
? config.serviceMapTraceIdBucketSize
: config.serviceMapTraceIdGlobalBucketSize;
const samplerShardSize = traceIdBucketSize * 10;
const params = {
@ -137,8 +135,7 @@ export async function getTraceSampleIds({
'get_trace_sample_ids',
params
);
// make sure at least one trace per composite/connection bucket
// is queried
// make sure at least one trace per composite/connection bucket is queried
const traceIdsWithPriority =
tracesSampleResponse.aggregations?.connections.buckets.flatMap((bucket) =>
bucket.sample.trace_ids.buckets.map((sampleDocBucket, index) => ({

View file

@ -57,7 +57,7 @@ export async function getServiceTransactionGroups({
end: number;
}) {
const { apmEventClient, config } = setup;
const bucketSize = config['xpack.apm.ui.transactionGroupBucketSize'];
const bucketSize = config.ui.transactionGroupBucketSize;
const field = getTransactionDurationFieldForAggregatedTransactions(
searchAggregatedTransactions

View file

@ -5,8 +5,6 @@
* 2.0.
*/
import { merge } from 'lodash';
import { SavedObjectsClient } from 'src/core/server';
import { PromiseReturnType } from '../../../../../observability/typings/common';
import {
@ -22,8 +20,6 @@ export { ApmIndicesConfig };
type ISavedObjectsClient = Pick<SavedObjectsClient, 'get'>;
export type ApmIndicesName = keyof ApmIndicesConfig;
async function getApmIndicesSavedObject(
savedObjectsClient: ISavedObjectsClient
) {
@ -38,14 +34,12 @@ async function getApmIndicesSavedObject(
export function getApmIndicesConfig(config: APMConfig): ApmIndicesConfig {
return {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': config['apm_oss.sourcemapIndices'],
'apm_oss.errorIndices': config['apm_oss.errorIndices'],
'apm_oss.onboardingIndices': config['apm_oss.onboardingIndices'],
'apm_oss.spanIndices': config['apm_oss.spanIndices'],
'apm_oss.transactionIndices': config['apm_oss.transactionIndices'],
'apm_oss.metricsIndices': config['apm_oss.metricsIndices'],
/* eslint-enable @typescript-eslint/naming-convention */
sourcemap: config.indices.sourcemap,
error: config.indices.error,
onboarding: config.indices.onboarding,
span: config.indices.span,
transaction: config.indices.transaction,
metric: config.indices.metric,
// system indices, not configurable
apmAgentConfigurationIndex: '.apm-agent-configuration',
apmCustomLinkIndex: '.apm-custom-link',
@ -64,21 +58,12 @@ export async function getApmIndices({
savedObjectsClient
);
const apmIndicesConfig = getApmIndicesConfig(config);
return merge({}, apmIndicesConfig, apmIndicesSavedObject);
return { ...apmIndicesConfig, ...apmIndicesSavedObject };
} catch (error) {
return getApmIndicesConfig(config);
}
}
const APM_UI_INDICES: ApmIndicesName[] = [
'apm_oss.sourcemapIndices',
'apm_oss.errorIndices',
'apm_oss.onboardingIndices',
'apm_oss.spanIndices',
'apm_oss.transactionIndices',
'apm_oss.metricsIndices',
];
export async function getApmIndexSettings({
context,
config,
@ -88,7 +73,7 @@ export async function getApmIndexSettings({
apmIndicesSavedObject = await getApmIndicesSavedObject(
context.core.savedObjects.client
);
} catch (error) {
} catch (error: any) {
if (error.output && error.output.statusCode === 404) {
apmIndicesSavedObject = {};
} else {
@ -97,7 +82,11 @@ export async function getApmIndexSettings({
}
const apmIndicesConfig = getApmIndicesConfig(config);
return APM_UI_INDICES.map((configurationName) => ({
const apmIndices = Object.keys(config.indices) as Array<
keyof typeof config.indices
>;
return apmIndices.map((configurationName) => ({
configurationName,
defaultValue: apmIndicesConfig[configurationName], // value defined in kibana[.dev].yml
savedValue: apmIndicesSavedObject[configurationName], // value saved via Saved Objects service

View file

@ -37,7 +37,7 @@ Object {
},
},
},
"size": "myIndex",
"size": 1000,
},
}
`;

View file

@ -24,7 +24,7 @@ export async function getTraceItems(
end: number
) {
const { apmEventClient, config } = setup;
const maxTraceItems = config['xpack.apm.ui.maxTraceItems'];
const maxTraceItems = config.ui.maxTraceItems;
const excludedLogLevels = ['debug', 'info', 'warning'];
const errorResponsePromise = apmEventClient.search('get_errors_docs', {
@ -80,9 +80,5 @@ export async function getTraceItems(
const traceDocs = traceResponse.hits.hits.map((hit) => hit._source);
const errorDocs = errorResponse.hits.hits.map((hit) => hit._source);
return {
exceedsMax,
traceDocs,
errorDocs,
};
return { exceedsMax, traceDocs, errorDocs };
}

View file

@ -11,16 +11,15 @@ import noDataResponse from './mock_responses/no_data.json';
import dataResponse from './mock_responses/data.json';
import { APMConfig } from '../../..';
import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values';
import { ApmIndicesConfig } from '../../settings/apm_indices/get_apm_indices';
const mockIndices = {
/* 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 */
const mockIndices: ApmIndicesConfig = {
sourcemap: 'myIndex',
error: 'myIndex',
onboarding: 'myIndex',
span: 'myIndex',
transaction: 'myIndex',
metric: 'myIndex',
apmAgentConfigurationIndex: 'myIndex',
apmCustomLinkIndex: 'myIndex',
};

View file

@ -124,7 +124,7 @@ export async function getTransactionBreakdown({
date_histogram: getMetricsDateHistogramParams({
start,
end,
metricsInterval: config['xpack.apm.metricsInterval'],
metricsInterval: config.metricsInterval,
}),
aggs: subAggs,
},

View file

@ -5,8 +5,7 @@
* 2.0.
*/
import { combineLatest } from 'rxjs';
import { map, take } from 'rxjs/operators';
import { take } from 'rxjs/operators';
import {
CoreSetup,
CoreStart,
@ -19,8 +18,7 @@ import { isEmpty, mapValues } from 'lodash';
import { SavedObjectsClient } from '../../../../src/core/server';
import { mappingFromFieldMap } from '../../rule_registry/common/mapping_from_field_map';
import { Dataset } from '../../rule_registry/server';
import { APMConfig, APMXPackConfig, APM_SERVER_FEATURE_ID } from '.';
import { mergeConfigs } from './index';
import { APMConfig, APM_SERVER_FEATURE_ID } from '.';
import { UI_SETTINGS } from '../../../../src/plugins/data/common';
import { APM_FEATURE, registerFeaturesUsage } from './feature';
import { registerApmAlerts } from './lib/alerts/register_apm_alerts';
@ -73,29 +71,23 @@ export class APMPlugin
plugins: Omit<APMPluginSetupDependencies, 'core'>
) {
this.logger = this.initContext.logger.get();
const config$ = this.initContext.config.create<APMXPackConfig>();
const mergedConfig$ = combineLatest(plugins.apmOss.config$, config$).pipe(
map(([apmOssConfig, apmConfig]) => mergeConfigs(apmOssConfig, apmConfig))
);
const config$ = this.initContext.config.create<APMConfig>();
core.savedObjects.registerType(apmIndices);
core.savedObjects.registerType(apmTelemetry);
core.savedObjects.registerType(apmServerSettings);
const currentConfig = mergeConfigs(
plugins.apmOss.config,
this.initContext.config.get<APMXPackConfig>()
);
const currentConfig = this.initContext.config.get<APMConfig>();
this.currentConfig = currentConfig;
if (
plugins.taskManager &&
plugins.usageCollection &&
currentConfig['xpack.apm.telemetryCollectionEnabled']
currentConfig.telemetryCollectionEnabled
) {
createApmTelemetry({
core,
config$: mergedConfig$,
config$,
usageCollector: plugins.usageCollection,
taskManager: plugins.taskManager,
logger: this.logger,
@ -156,7 +148,7 @@ export class APMPlugin
const boundGetApmIndices = async () =>
getApmIndices({
savedObjectsClient: await getInternalSavedObjectsClient(core),
config: await mergedConfig$.pipe(take(1)).toPromise(),
config: await config$.pipe(take(1)).toPromise(),
});
boundGetApmIndices().then((indices) => {
@ -193,7 +185,7 @@ export class APMPlugin
ruleDataClient,
alerting: plugins.alerting,
ml: plugins.ml,
config$: mergedConfig$,
config$,
logger: this.logger!.get('rule'),
});
}
@ -231,7 +223,7 @@ export class APMPlugin
});
return {
config$: mergedConfig$,
config$,
getApmIndices: boundGetApmIndices,
createApmEventClient: async ({
request,

View file

@ -129,8 +129,7 @@ const getMigrationCheckRoute = createApmServerRoute({
options: { tags: ['access:apm'] },
handler: async (resources) => {
const { plugins, context, config, request } = resources;
const cloudApmMigrationEnabled =
config['xpack.apm.agent.migrations.enabled'];
const cloudApmMigrationEnabled = config.agent.migrations.enabled;
if (!plugins.fleet || !plugins.security) {
throw Boom.internal(FLEET_SECURITY_REQUIRED_MESSAGE);
}
@ -158,8 +157,7 @@ const createCloudApmPackagePolicyRoute = createApmServerRoute({
options: { tags: ['access:apm', 'access:apm_write'] },
handler: async (resources) => {
const { plugins, context, config, request, logger } = resources;
const cloudApmMigrationEnabled =
config['xpack.apm.agent.migrations.enabled'];
const cloudApmMigrationEnabled = config.agent.migrations.enabled;
if (!plugins.fleet || !plugins.security) {
throw Boom.internal(FLEET_SECURITY_REQUIRED_MESSAGE);
}

View file

@ -33,7 +33,7 @@ const serviceMapRoute = createApmServerRoute({
options: { tags: ['access:apm'] },
handler: async (resources) => {
const { config, context, params, logger } = resources;
if (!config['xpack.apm.serviceMapEnabled']) {
if (!config.serviceMapEnabled) {
throw Boom.notFound();
}
if (!isActivePlatinumLicense(context.licensing.license)) {
@ -81,7 +81,7 @@ const serviceMapServiceNodeRoute = createApmServerRoute({
handler: async (resources) => {
const { config, context, params } = resources;
if (!config['xpack.apm.serviceMapEnabled']) {
if (!config.serviceMapEnabled) {
throw Boom.notFound();
}
if (!isActivePlatinumLicense(context.licensing.license)) {
@ -125,7 +125,7 @@ const serviceMapBackendNodeRoute = createApmServerRoute({
handler: async (resources) => {
const { config, context, params } = resources;
if (!config['xpack.apm.serviceMapEnabled']) {
if (!config.serviceMapEnabled) {
throw Boom.notFound();
}
if (!isActivePlatinumLicense(context.licensing.license)) {

View file

@ -13,6 +13,7 @@ import {
getApmIndexSettings,
} from '../../lib/settings/apm_indices/get_apm_indices';
import { saveApmIndices } from '../../lib/settings/apm_indices/save_apm_indices';
import { APMConfig } from '../..';
// get list of apm indices and values
const apmIndexSettingsRoute = createApmServerRoute({
@ -37,6 +38,10 @@ const apmIndicesRoute = createApmServerRoute({
},
});
type SaveApmIndicesBodySchema = {
[Property in keyof APMConfig['indices']]: t.StringC;
};
// save ui indices
const saveApmIndicesRoute = createApmServerRoute({
endpoint: 'POST /internal/apm/settings/apm-indices/save',
@ -45,15 +50,13 @@ const saveApmIndicesRoute = createApmServerRoute({
},
params: t.type({
body: t.partial({
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': t.string,
'apm_oss.errorIndices': t.string,
'apm_oss.onboardingIndices': t.string,
'apm_oss.spanIndices': t.string,
'apm_oss.transactionIndices': t.string,
'apm_oss.metricsIndices': t.string,
/* eslint-enable @typescript-eslint/naming-convention */
}),
sourcemap: t.string,
error: t.string,
onboarding: t.string,
span: t.string,
transaction: t.string,
metric: t.string,
} as SaveApmIndicesBodySchema),
}),
handler: async (resources) => {
const { params, context } = resources;

View file

@ -7,34 +7,24 @@
import { SavedObjectsType } from 'src/core/server';
import { i18n } from '@kbn/i18n';
import { updateApmOssIndexPaths } from './migrations/update_apm_oss_index_paths';
import { ApmIndicesConfigName } from '..';
const properties: { [Property in ApmIndicesConfigName]: { type: 'keyword' } } =
{
sourcemap: { type: 'keyword' },
error: { type: 'keyword' },
onboarding: { type: 'keyword' },
span: { type: 'keyword' },
transaction: { type: 'keyword' },
metric: { type: 'keyword' },
};
export const apmIndices: SavedObjectsType = {
name: 'apm-indices',
hidden: false,
namespaceType: 'agnostic',
mappings: {
properties: {
/* eslint-disable @typescript-eslint/naming-convention */
'apm_oss.sourcemapIndices': {
type: 'keyword',
},
'apm_oss.errorIndices': {
type: 'keyword',
},
'apm_oss.onboardingIndices': {
type: 'keyword',
},
'apm_oss.spanIndices': {
type: 'keyword',
},
'apm_oss.transactionIndices': {
type: 'keyword',
},
'apm_oss.metricsIndices': {
type: 'keyword',
},
},
},
mappings: { properties },
management: {
importableAndExportable: true,
icon: 'apmApp',
@ -43,4 +33,10 @@ export const apmIndices: SavedObjectsType = {
defaultMessage: 'APM Settings - Index',
}),
},
migrations: {
'7.16.0': (doc) => {
const attributes = updateApmOssIndexPaths(doc.attributes);
return { ...doc, attributes };
},
},
};

View file

@ -0,0 +1,36 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
const apmIndexConfigs = [
['sourcemap', 'apm_oss.sourcemapIndices'],
['error', 'apm_oss.errorIndices'],
['onboarding', 'apm_oss.onboardingIndices'],
['span', 'apm_oss.spanIndices'],
['transaction', 'apm_oss.transactionIndices'],
['metric', 'apm_oss.metricsIndices'],
] as const;
type ApmIndexConfigs = typeof apmIndexConfigs[number][0];
type ApmIndicesSavedObjectAttributes = Partial<{
[Property in ApmIndexConfigs]: string;
}>;
type DeprecatedApmIndexConfigPaths = typeof apmIndexConfigs[number][1];
type DeprecatedApmIndicesSavedObjectAttributes = Partial<{
[Property in DeprecatedApmIndexConfigPaths]: string;
}>;
export function updateApmOssIndexPaths(
attributes: DeprecatedApmIndicesSavedObjectAttributes
) {
return apmIndexConfigs.reduce((attrs, [configPath, deprecatedConfigPath]) => {
const indexConfig: string | undefined = attributes[deprecatedConfigPath];
if (indexConfig) {
attrs[configPath] = indexConfig;
}
return attrs;
}, {} as ApmIndicesSavedObjectAttributes);
}

View file

@ -37,13 +37,7 @@ export function onPremInstructions({
apmConfig,
isFleetPluginEnabled,
}: {
apmConfig: Pick<
APMConfig,
| 'apm_oss.errorIndices'
| 'apm_oss.transactionIndices'
| 'apm_oss.metricsIndices'
| 'apm_oss.onboardingIndices'
>;
apmConfig: APMConfig;
isFleetPluginEnabled: boolean;
}): InstructionsSchema {
const EDIT_CONFIG = createEditConfig();
@ -149,7 +143,7 @@ export function onPremInstructions({
}
),
esHitsCheck: {
index: apmConfig['apm_oss.onboardingIndices'],
index: apmConfig.indices.onboarding,
query: {
bool: {
filter: [
@ -242,9 +236,9 @@ export function onPremInstructions({
),
esHitsCheck: {
index: [
apmConfig['apm_oss.errorIndices'],
apmConfig['apm_oss.transactionIndices'],
apmConfig['apm_oss.metricsIndices'],
apmConfig.indices.error,
apmConfig.indices.transaction,
apmConfig.indices.metric,
],
query: {
bool: {

View file

@ -67,7 +67,7 @@ export const tutorialProvider =
],
};
if (apmConfig['xpack.apm.ui.enabled']) {
if (apmConfig.ui.enabled) {
// @ts-expect-error artifacts.application is readonly
artifacts.application = {
path: '/app/apm',

View file

@ -16,7 +16,6 @@ import {
PluginStart as DataPluginStart,
} from '../../../../src/plugins/data/server';
import { SpacesPluginSetup, SpacesPluginStart } from '../../spaces/server';
import { APMOSSPluginSetup } from '../../../../src/plugins/apm_oss/server';
import {
HomeServerPluginSetup,
HomeServerPluginStart,
@ -71,10 +70,6 @@ interface DependencyMap {
setup: SpacesPluginSetup;
start: SpacesPluginStart;
};
apmOss: {
setup: APMOSSPluginSetup;
start: undefined;
};
home: {
setup: HomeServerPluginSetup;
start: HomeServerPluginStart;
@ -135,7 +130,6 @@ interface DependencyMap {
const requiredDependencies = [
'features',
'apmOss',
'data',
'licensing',
'triggersActionsUi',

View file

@ -12,6 +12,7 @@ import {
ESSearchResponse,
} from '../../../../../src/core/types/elasticsearch';
import { UxUIFilters } from '../../typings/ui_filters';
import { ApmIndicesConfig } from '../lib/settings/apm_indices/get_apm_indices';
interface Options {
mockResponse?: (
@ -26,18 +27,7 @@ interface MockSetup {
internalClient: any;
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 */
apmAgentConfigurationIndex: string;
apmCustomLinkIndex: string;
};
indices: ApmIndicesConfig;
}
export async function inspectSearchParams(
@ -61,6 +51,16 @@ export async function inspectSearchParams(
let response;
let error;
const mockApmIndices: {
[Property in keyof APMConfig['indices']]: string;
} = {
sourcemap: 'myIndex',
error: 'myIndex',
onboarding: 'myIndex',
span: 'myIndex',
transaction: 'myIndex',
metric: 'myIndex',
};
const mockSetup = {
apmEventClient: { search: spy } as any,
internalClient: { search: spy } as any,
@ -76,8 +76,15 @@ export async function inspectSearchParams(
switch (key) {
default:
return 'myIndex';
case 'xpack.apm.metricsInterval':
case 'indices':
return mockApmIndices;
case 'ui':
return {
enabled: true,
transactionGroupBucketSize: 1000,
maxTraceItems: 1000,
};
case 'metricsInterval':
return 30;
}
},
@ -85,14 +92,7 @@ export async function inspectSearchParams(
) as APMConfig,
uiFilters: options?.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 */
...mockApmIndices,
apmAgentConfigurationIndex: 'myIndex',
apmCustomLinkIndex: 'myIndex',
},

View file

@ -19,7 +19,6 @@
],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/apm_oss/tsconfig.json" },
{ "path": "../../../src/plugins/data/tsconfig.json" },
{ "path": "../../../src/plugins/embeddable/tsconfig.json" },
{ "path": "../../../src/plugins/home/tsconfig.json" },

View file

@ -16,14 +16,12 @@ export const alertWorkflowStatusRt = t.keyof({
export type AlertWorkflowStatus = t.TypeOf<typeof alertWorkflowStatusRt>;
export interface ApmIndicesConfig {
/* 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 */
sourcemap: string;
error: string;
onboarding: string;
span: string;
transaction: string;
metric: string;
apmAgentConfigurationIndex: string;
apmCustomLinkIndex: string;
}

View file

@ -65,7 +65,7 @@ export function IndexPatternContextProvider({ children }: ProviderProps) {
case 'mobile':
const resultApm = await getDataHandler('apm')?.hasData();
hasDataT = Boolean(resultApm?.hasData);
indices = resultApm?.indices['apm_oss.transactionIndices'];
indices = resultApm?.indices.transaction;
break;
}
setHasAppData((prevState) => ({ ...prevState, [dataType]: hasDataT }));

View file

@ -24,10 +24,7 @@ import { act } from '@testing-library/react';
const relativeStart = '2020-10-08T06:00:00.000Z';
const relativeEnd = '2020-10-08T07:00:00.000Z';
const sampleAPMIndices = {
// eslint-disable-next-line @typescript-eslint/naming-convention
'apm_oss.transactionIndices': 'apm-*',
} as ApmIndicesConfig;
const sampleAPMIndices = { transaction: 'apm-*' } as ApmIndicesConfig;
function wrapper({ children }: { children: React.ReactElement }) {
const history = createMemoryHistory();

View file

@ -9,10 +9,7 @@ import { registerDataHandler, getDataHandler } from './data_handler';
import moment from 'moment';
import { ApmIndicesConfig } from '../common/typings';
const sampleAPMIndices = {
// eslint-disable-next-line @typescript-eslint/naming-convention
'apm_oss.transactionIndices': 'apm-*',
} as ApmIndicesConfig;
const sampleAPMIndices = { transaction: 'apm-*' } as ApmIndicesConfig;
const params = {
absoluteTime: {

View file

@ -36,10 +36,7 @@ function unregisterAll() {
unregisterDataHandler({ appName: 'synthetics' });
}
const sampleAPMIndices = {
// eslint-disable-next-line @typescript-eslint/naming-convention
'apm_oss.transactionIndices': 'apm-*',
} as ApmIndicesConfig;
const sampleAPMIndices = { transaction: 'apm-*' } as ApmIndicesConfig;
const withCore = makeDecorator({
name: 'withCore',

View file

@ -189,27 +189,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -216,27 +216,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -214,27 +214,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -206,27 +206,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -202,27 +202,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -198,27 +198,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -229,27 +229,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -199,27 +199,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -254,27 +254,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},
@ -2720,4 +2716,4 @@
}
}
}
}
}

View file

@ -260,27 +260,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},
@ -2864,4 +2860,4 @@
}
}
}
}
}

View file

@ -261,27 +261,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},
@ -2951,4 +2947,4 @@
}
}
}
}
}

View file

@ -275,27 +275,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -169,27 +169,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -198,27 +198,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -199,27 +199,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -199,27 +199,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -199,27 +199,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -198,27 +198,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -198,27 +198,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -198,27 +198,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -189,27 +189,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -181,27 +181,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -196,27 +196,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -193,27 +193,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -214,27 +214,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -170,27 +170,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -172,27 +172,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},
@ -2028,4 +2024,4 @@
}
}
}
}
}

View file

@ -272,27 +272,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -276,27 +276,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},

View file

@ -273,27 +273,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},
@ -3089,4 +3085,4 @@
}
}
}
}
}

View file

@ -254,27 +254,23 @@
},
"apm-indices": {
"properties": {
"apm_oss": {
"properties": {
"errorIndices": {
"type": "keyword"
},
"metricsIndices": {
"type": "keyword"
},
"onboardingIndices": {
"type": "keyword"
},
"sourcemapIndices": {
"type": "keyword"
},
"spanIndices": {
"type": "keyword"
},
"transactionIndices": {
"type": "keyword"
}
}
"errors": {
"type": "keyword"
},
"metrics": {
"type": "keyword"
},
"onboarding": {
"type": "keyword"
},
"sourcemaps": {
"type": "keyword"
},
"spans": {
"type": "keyword"
},
"transactions": {
"type": "keyword"
}
}
},