Skip to content

[APM] Don't read APM index names directly from config #49620

@sorenlouv

Description

@sorenlouv

In #48079 APM added support for overriding index names defined in kibana.yml via the UI. This means that reading a config value directly from the config might give a stale result, since it's being overridden by the UI settings.

Instead of reading directly from the config file one should read both from the config file and the UI settings and merge the result. Fortunately this is already taken care of by getApmIndices.

Example: apm_oss.transactionIndices
Instead of getting apm_oss.transactionIndices via config.get('apm_oss.transactionIndices') one should instead get it like:

import { getApmIndices } from 'x-pack/legacy/plugins/apm/server/lib/settings/apm_indices/get_apm_indices'

const apmIndices = getApmIndices(server)
const transactionIndices = apmIndices['apm_oss.transactionIndices']

Fix in

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions