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

Add component.{id, binary} to monitoring metrics #3626

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented Oct 18, 2023

What does this PR do?

This PR adds component.id and component.binary to the monitoring metrics, those fields are necessary to create unique TSDB entries.

Why is it important?

It fixes metrics collection.

Checklist

  • 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

Author's Checklist

  • This PR works with Logstash output

How to test this PR locally

See the "How to test this PR locally" section from the integrations PR: elastic/integrations#8238

Related issues

## Use cases
## Screenshots
## Logs

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@mergify
Copy link
Contributor

mergify bot commented Oct 18, 2023

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

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 18, 2023

💚 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: 2023-11-03T15:06:26.259+0000

  • Duration: 72 min 23 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 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 Oct 18, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.824% (84/85) 👍
Files 66.885% (204/305) 👍
Classes 66.071% (370/560) 👍
Methods 53.339% (1174/2201) 👍
Lines 39.639% (13818/34860) 👍 0.107
Conditionals 100.0% (0/0) 💚

@belimawr belimawr force-pushed the fix-tsdb-metrics branch 2 times, most recently from ff20b95 to 9b230de Compare October 19, 2023 17:11
@belimawr belimawr added the Team:Elastic-Agent Label for the Agent team label Oct 19, 2023
@belimawr belimawr marked this pull request as ready for review October 19, 2023 17:11
@belimawr belimawr requested a review from a team as a code owner October 19, 2023 17:11
@belimawr belimawr requested review from blakerouse and pchila October 19, 2023 17:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

LGTM

@cmacknz cmacknz added the backport-v8.11.0 Automated backport with mergify label Oct 27, 2023
@cmacknz
Copy link
Member

cmacknz commented Oct 27, 2023

We should backport to v8.11 as this is part of the bug fix for duplicated TSDB documents in the elastic agent integration.

@mergify mergify bot removed the backport-skip label Oct 27, 2023
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Changes looks good!

This commit adds `component.id` and `component.binary` to the
monitoring metrics, those fields are necessary to create unique TSDB
entries.
Copy link

@belimawr belimawr merged commit c4462d2 into elastic:main Nov 6, 2023
7 checks passed
@belimawr belimawr deleted the fix-tsdb-metrics branch November 6, 2023 07:46
mergify bot pushed a commit that referenced this pull request Nov 6, 2023
This commit adds `component.id` and `component.binary` to the
monitoring metrics, those fields are necessary to create unique TSDB
entries.

(cherry picked from commit c4462d2)
belimawr added a commit that referenced this pull request Nov 7, 2023
This commit adds `component.id` and `component.binary` to the
monitoring metrics, those fields are necessary to create unique TSDB
entries.

(cherry picked from commit c4462d2)

Co-authored-by: Tiago Queiroz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.11.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Elastic Agent] TSDB metrics dimensions do not create unique time series
5 participants