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

[8.12] [APM] Remove usage of internal client when fetching agent config etags metrics (#173001) | [APM] Unskip apm api test suite (#173055) #173120

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Dec 11, 2023

…s metrics (elastic#173001)

Closes: elastic#170031
Replaces: elastic/elasticsearch#101467

**Problem**
We need to know if an agent config has been applied at the edge (by APM
agents). This is determined by comparing the etag (hash) of the config,
with the etag applied at the edges.

Previously the agent config itself contained this information
(`config.applied_by_agent`) but when running with fleet this will
instead be captured in `agent_config` metric documents.

Currently the internal kibana user retrieves the `agent_config` metric
documents from the APM metric index (`metrics-apm-*` by default). This
index is configurable by the end-user so can be changed to something the
internal user doesn't have access to. This is a problem.

**Solution**

This PR replaces the calls made by the internal client with calls made
by the authenticated end user (via `APMEventClient`). This approach
works for requests made from the browser/UI but doesn't work for
background tasks made by fleet. To work around this we only
conditionally query the metric index if the `APMEventClient` is
available.
If `APMEventClient` is not available `applied_by_agent` will be
`undefined`

(cherry picked from commit 58c7958)
APM api test suite was accidentally skipped in
elastic#172772.
This unskips the suite and instead skips just the flaky tests

Blocking: elastic#173038
(cherry picked from commit cd0648c)

# Conflicts:
#	x-pack/test/apm_api_integration/tests/index.ts
@sorenlouv sorenlouv enabled auto-merge (squash) December 11, 2023 22:22
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Dec 11, 2023
@elasticmachine
Copy link
Contributor

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

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

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #80 / aiops log pattern analysis loads the log pattern analysis flyout and shows patterns in discover
  • [job] [logs] FTR Configs #26 / Serverless Common UI - Management Index Templates Create index template "after all" hook for "Creates index template"
  • [job] [logs] FTR Configs #26 / Serverless Common UI - Management Index Templates Create index template Creates index template

Metrics [docs]

✅ unchanged

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

@sorenlouv sorenlouv merged commit 837ecf8 into elastic:8.12 Dec 12, 2023
44 checks passed
@sorenlouv sorenlouv deleted the backport/8.12/pr-173001_pr-173055 branch December 12, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants