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] Refactor internal es client #170733

Merged

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Nov 7, 2023

Related #170031.

The internal Elasticsearch client in APM currently takes apmIndices as a required argument. This is due to legacy reasons and no longer needed and should therefore be removed.

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@sorenlouv sorenlouv force-pushed the remove-apm-index-from-internal-client branch 2 times, most recently from 83ff9df to aff71b5 Compare November 7, 2023 23:34
@sorenlouv sorenlouv changed the title [APM] Don't fetch apmIndices when using internal es client [APM] Refactor internal es client Nov 8, 2023
@sorenlouv sorenlouv force-pushed the remove-apm-index-from-internal-client branch from aff71b5 to 503d161 Compare November 9, 2023 00:15
@sorenlouv sorenlouv marked this pull request as ready for review November 9, 2023 10:38
@sorenlouv sorenlouv requested a review from a team as a code owner November 9, 2023 10:38
) {
const params = {
index: internalESClient.apmIndices.metric,
index: apmIndices.metric,
Copy link
Contributor

@kpatticha kpatticha Nov 9, 2023

Choose a reason for hiding this comment

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

why do you need to pass the apmIndices here from the resources when you could load them from the apm-data-access-plugin ?

import { APMIndices } from '@kbn/apm-data-access-plugin/server';

Copy link
Member Author

@sorenlouv sorenlouv Nov 13, 2023

Choose a reason for hiding this comment

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

APMIndices (that you mention) is a type. apmIndices is a value (object) produced at runtime.
apmIndices is produced with:

const apmIndices = await plugins.apmDataAccess.setup.getApmIndices(
  coreContext.savedObjects.client
);

@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Nov 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Investigations - Security Solution Cypress Tests #3 / Ransomware Detection Alerts Ransomware in Timelines Renders ransomware entries in timelines table Renders ransomware entries in timelines table

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv sorenlouv added release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Nov 13, 2023
@kpatticha kpatticha enabled auto-merge (squash) November 15, 2023 06:18
@kpatticha kpatticha merged commit b710f78 into elastic:main Nov 15, 2023
35 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 15, 2023
@sorenlouv sorenlouv deleted the remove-apm-index-from-internal-client branch November 24, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants