Skip to content

Conversation

@smith
Copy link
Contributor

@smith smith commented Dec 17, 2025

In all of the APM static dashboards that use ES|QL queries, replace FROM *:metrics... with FROM {{indexPattern}}.

When the dashboards load, the index pattern is replaced by the value from the APM data view.

Fixes #246757

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.8MB 2.8MB -258.0B
Unknown metric groups

References to deprecated APIs

id before after diff
apm 26 27 +1

History

@crespocarlos crespocarlos marked this pull request as ready for review December 23, 2025 08:55
@crespocarlos crespocarlos requested a review from a team as a code owner December 23, 2025 08:55
@crespocarlos crespocarlos added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v8.19.0 v9.2.0 v9.3.0 v9.4.0 Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation labels Dec 23, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@crespocarlos
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@miloszmarcinkowski miloszmarcinkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apm index configuration is applied to dashboards.

Image

// Replace indexPattern placeholder
const dashboardStringWithReplacements = Mustache.render(dashboardString, {
indexPattern: dataView.title,
indexPattern: apmIndices?.metric ?? dataView.title,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
indexPattern: apmIndices?.metric ?? dataView.title,
indexPattern: apmIndices?.metric ?? dataView.getIndexPattern(),

Unrelated to changes but we can replace deprecated direct usage of title property

https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/data_views/common/data_views/abstract_data_views.ts#L61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v8.19.0 v9.2.0 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[APM] Make APM Runtime metrics dashboards use indices setting

4 participants