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

Documenting metrics messages in Beats logs #36163

Merged
merged 16 commits into from
Aug 1, 2023

Conversation

ycombinator
Copy link
Contributor

What does this PR do?

This PR documents the metrics that are periodically emitted by Beats in their logs.

Why is it important?

To understand what the metrics mean and how they could be used for troubleshooting.

@ycombinator ycombinator requested a review from a team as a code owner July 26, 2023 19:06
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 26, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @ycombinator? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

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

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 26, 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-07-31T23:40:02.663+0000

  • Duration: 9 min 16 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 and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

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

@ycombinator ycombinator added Team:Docs Label for the Observability docs team Team:Elastic-Agent Label for the Agent team backport-skip Skip notification from the automated backport with mergify labels Jul 26, 2023
@elasticmachine
Copy link
Collaborator

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2023
@kilfoyle
Copy link
Contributor

kilfoyle commented Jul 26, 2023

@ycombinator Thanks for opening this!
A couple of questions:

  1. Would it be okay with you if I commit directly to your branch? To get this showing up in the docs I'd add an include statement to the troubleshooting.asciidoc source file for each beat, basically copying how the debug docs page is set up.
  2. Does this look okay to you as a place in the table of contents for the new page to go (using Functionbeat as an example)?

Screenshot 2023-07-26 at 4 12 41 PM

@ycombinator
Copy link
Contributor Author

Would it be okay with you if I commit directly to your branch?

Yes, please! There are a number of things that will need fixing / improving in this PR and I'd be grateful if you could help with that by directly pushing commits to my branch. I'll add some PR comments in the areas I'd like your help.

Does this look okay to you as a place in the table of contents for the new page to go (using Functionbeat as an example)?

Yes, I think that's fine, although if you think we should shorten that tile so it fits better with the rest of its sibling nav items, feel free to make the necessary edits.

Thanks!

@kilfoyle kilfoyle requested review from a team as code owners July 26, 2023 22:47

[id="understand-{beatname_lc}-logs"]
[role="xpack"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just curious: what does this line do?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it doesn't do anything, and rather it's just a leftover from when we had to identified X-pack content. I left it in when I copied the content over from the other docs page just because I'm not 100% sure it's not used anymore.

@kilfoyle
Copy link
Contributor

kilfoyle commented Jul 26, 2023

Sounds good @ycombinator
I've reworked the structure slightly so that:

  • The new page now shows up in all of the Beats docs.
  • The format and location of metrics-in-logs.asciidoc and the files that embed it completely matches that of the "Debug" page, debugging.asciidoc.
  • The sections that you mention are specific to Filebeat will show up only in the Filebeat docs (that's accomplished by wrapping the sections in ifeval::["{beatname_lc}"=="filebeat"] and endif::[] tags).
  • The full page title is still Understand metrics in {beatname} logs, but in the table of contents the name is shortened to Understand logged metrics. Let me know if the shortened version doesn't really work.

I'll still have some suggestions for the wording so I'll add those probably later in the day tomorrow.

@kilfoyle
Copy link
Contributor

Here's a preview showing Filebeat versus non-Filebeat:

@kilfoyle kilfoyle self-assigned this Jul 26, 2023
Copy link
Contributor

@faec faec 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 great thank you for writing this up!

@ycombinator ycombinator enabled auto-merge (squash) August 1, 2023 20:14
@ycombinator ycombinator enabled auto-merge (squash) August 1, 2023 20:14
@cmacknz cmacknz disabled auto-merge August 1, 2023 20:52
@cmacknz cmacknz merged commit 90cd631 into elastic:main Aug 1, 2023
21 checks passed
@ycombinator ycombinator deleted the doc-metrics-in-logs branch August 2, 2023 06:32
@cmacknz
Copy link
Member

cmacknz commented Aug 2, 2023

@lucabelluccini FYI this is likely helpful for support.

@ycombinator
Copy link
Contributor Author

@lucabelluccini FYI this is likely helpful for support.

The published version is at https://www.elastic.co/guide/en/beats/filebeat/master/understand-filebeat-logs.html

@lucabelluccini
Copy link
Contributor

Lovely @ycombinator ! Thank you for the notification @cmacknz

Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
## What does this PR do?

This PR documents the metrics that are periodically emitted by Beats in
their logs.

<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT:
patterns used, algorithms implemented, design architecture, message
processing, etc.
-->

## Why is it important?

To understand what the metrics mean and how they could be used for
troubleshooting.
<!-- Mandatory
Explain here the WHY, or the rationale/motivation for the changes.
-->

---------

Co-authored-by: David Kilfoyle <[email protected]>
Co-authored-by: David Kilfoyle <[email protected]>
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-skip Skip notification from the automated backport with mergify docs Team:Docs Label for the Observability docs team Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants