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

Fix APM server not being available in cloud. #1781

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Nov 24, 2022

Cloud monitoring is hard coded to look for /processes/apm-server using the processes API. Force us to always use that name for reporting when APM server is running.

This is can certainly be considered a hack, but it's simple and it should work.

  • Relates elastic/ingest-dev#1418

@cmacknz cmacknz added skip-changelog backport-v8.6.0 Automated backport with mergify labels Nov 24, 2022
@cmacknz cmacknz requested a review from axw November 24, 2022 02:34
@cmacknz cmacknz self-assigned this Nov 24, 2022
@cmacknz cmacknz requested a review from a team as a code owner November 24, 2022 02:34
@cmacknz cmacknz requested review from michalpristas and blakerouse and removed request for a team November 24, 2022 02:34
Cloud monitoring is hard coded to look for /processes/apm-server using
the processes API. Force us to always use that name for reporting when
APM server is running.
@cmacknz cmacknz force-pushed the fix-apm-server-process-name branch from 7b23813 to 6cf409a Compare November 24, 2022 02:37
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 24, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-11-24T03:03:25.187+0000

  • Duration: 19 min 34 sec

Test stats 🧪

Test Results
Failed 0
Passed 4517
Skipped 13
Total 4530

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 24, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.305% (58/59) 👍
Files 71.066% (140/197) 👍
Classes 70.557% (266/377) 👍
Methods 54.828% (795/1450) 👍
Lines 40.303% (8587/21306) 👍
Conditionals 100.0% (0/0) 💚

@@ -50,7 +50,15 @@ func processesHandler(coord *coordinator.Coordinator) func(http.ResponseWriter,

for _, c := range state.Components {
if c.Component.InputSpec != nil {
procs = append(procs, process{c.Component.ID, c.Component.InputSpec.BinaryName,
displayID := c.Component.ID
if strings.Contains(displayID, "apm") {
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this might do unexpected things if we ever have another APM related input. Going to switch to looking at the actual binary name.

Also fix the PID and binary fields being swapped when constructing a
process to display.
@cmacknz cmacknz merged commit b4002e9 into elastic:main Nov 24, 2022
mergify bot pushed a commit that referenced this pull request Nov 24, 2022
@cmacknz cmacknz deleted the fix-apm-server-process-name branch November 24, 2022 03:30
cmacknz added a commit that referenced this pull request Nov 24, 2022
(cherry picked from commit b4002e9)

Co-authored-by: Craig MacKenzie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.6.0 Automated backport with mergify skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants