Skip to content

[otel]: Add e2e test for monitoring metrics in otel mode #8009

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

Merged
merged 38 commits into from
May 30, 2025

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Apr 28, 2025

What does this PR do?

This PR adds e2e tests for self-monitoring metrics exposed using beatreceivers. It also asserts document equivalency for metrics exposed by normal mode vs otel mode.

Why is it important?

Required to safely transition running elastic-agent in otel mode.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Related issues

@khushijain21 khushijain21 requested a review from a team as a code owner April 28, 2025 16:31
@khushijain21 khushijain21 marked this pull request as draft April 28, 2025 16:31
Copy link
Contributor

mergify bot commented Apr 28, 2025

This pull request does not have a backport label. Could you fix it @khushijain21? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@cmacknz
Copy link
Member

cmacknz commented Apr 28, 2025

Does this overlap with what #7622 intends to do?

@khushijain21
Copy link
Contributor Author

khushijain21 commented Apr 29, 2025

Does this overlap with what #7622 intends to do?

#7622 adds test for metric inputs whereas this is for monitoring metrics collected by elastic-agent.

@khushijain21 khushijain21 added skip-changelog backport-8.x Automated backport to the 8.x branch with mergify backport-8.19 Automated backport to the 8.19 branch backport-9.0 Automated backport to the 9.0 branch and removed backport-8.x Automated backport to the 8.x branch with mergify labels Apr 29, 2025
@khushijain21 khushijain21 changed the title [Draft]: Add e2e test for monitoring metrics in otel mode [Draft][otel]: Add e2e test for monitoring metrics in otel mode Apr 29, 2025
Copy link
Contributor

mergify bot commented Apr 30, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b e2emetrics upstream/e2emetrics
git merge upstream/main
git push upstream e2emetrics

@cmacknz
Copy link
Member

cmacknz commented May 1, 2025

Thanks for clarifying!

@khushijain21 khushijain21 marked this pull request as ready for review May 5, 2025 11:26
@khushijain21 khushijain21 changed the title [Draft][otel]: Add e2e test for monitoring metrics in otel mode [otel]: Add e2e test for monitoring metrics in otel mode May 5, 2025
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

This looks like it is for agent monitoring. We really want this test to be for something that isn't agent monitoring. So a different Metricbeat module that would be a different config.

@khushijain21
Copy link
Contributor Author

khushijain21 commented May 28, 2025

This looks like it is for agent monitoring. We really want this test to be for something that isn't agent monitoring. So a different Metricbeat module that would be a different config.

I am not sure I understand. This test is intended for agent monitoring so

@khushijain21
Copy link
Contributor Author

This changeset seems to drop libbeat.output/* and libbeat.pipeline.* Currently in investigation before this PR can be merged

leehinman
leehinman previously approved these changes May 29, 2025
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

one small change, otherwise lets merge and I'll have one more round of adding to this test for https://github.com/elastic/ingest-dev/issues/4876

@khushijain21
Copy link
Contributor Author

/test

Copy link

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @khushijain21

@khushijain21 khushijain21 requested a review from leehinman May 30, 2025 15:21
@khushijain21 khushijain21 enabled auto-merge (squash) May 30, 2025 15:23
@khushijain21 khushijain21 merged commit 3b0c227 into elastic:main May 30, 2025
12 checks passed
mergify bot pushed a commit that referenced this pull request May 30, 2025
* Add e2e test for monitoring metrics in otel mode

(cherry picked from commit 3b0c227)
mergify bot pushed a commit that referenced this pull request May 30, 2025
* Add e2e test for monitoring metrics in otel mode

(cherry picked from commit 3b0c227)
ebeahan pushed a commit that referenced this pull request May 30, 2025
* Add e2e test for monitoring metrics in otel mode

(cherry picked from commit 3b0c227)

Co-authored-by: Khushi Jain <[email protected]>
ebeahan pushed a commit that referenced this pull request May 30, 2025
* Add e2e test for monitoring metrics in otel mode

(cherry picked from commit 3b0c227)

Co-authored-by: Khushi Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.19 Automated backport to the 8.19 branch backport-9.0 Automated backport to the 9.0 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants