Skip to content

Conversation

@mdbirnstiehl
Copy link
Contributor

I did a run through of the current logs docs and updated to make sure things were consistent and logical.

@mdbirnstiehl mdbirnstiehl added backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify labels Aug 29, 2023
@mdbirnstiehl mdbirnstiehl requested a review from a team as a code owner August 29, 2023 23:45
@mdbirnstiehl mdbirnstiehl self-assigned this Aug 29, 2023
@github-actions
Copy link
Contributor

A documentation preview will be available soon:

=== Use an ingest pipeline to extract the `@timestamp`

To extract the `@timestamp` field from the example log, use an ingest pipeline with a dissect processor. Ingest pipelines in {es} are used to process incoming documents. The {ref}/dissect-processor.html[dissect processor] is one of the available processors that extracts structured fields from your unstructured log message based the pattern you set. In the following example command, the dissect processor extracts the timestamp to the `@timestamp` field.
Ingest pipelines consist of a series of processors that perform common transformations on incoming documents before they are indexed. To extract the `@timestamp` field from the example log, you can use an ingest pipeline with a dissect processor. The {ref}/dissect-processor.html[dissect processor] extracts structured fields from unstructured log messages based on a pattern you set.
Copy link
Member

Choose a reason for hiding this comment

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

I could be wrong about this. @dedemorton will know.

I wouldn't say:

To extract the @timestamp field from the example log, you can use an ingest pipeline with a dissect processor.

I would say:

To extract the @timestamp field from the example log, use an ingest pipeline with a dissect processor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right here, and this may have been a blind spot in my writing.

At least for Microsoft:

When you see can in your writing, consider deleting it. Can implies ability but not action. Rewrite to describe the action if possible. When ability is what you need to express, it's OK to use can to describe actions or tasks that the reader or program is able to do.

I'm putting this can in the trash can.

Copy link
Member

Choose a reason for hiding this comment

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

Microsoft said it much better than I ever could have.

- `tag` – Identifier for the processor that you can use for debugging and metrics. In the example, that tag is set to `high_severity_logs`.
- `if` – Conditionally runs the processor. In the example, ` "if" : "$('log.level', '') == 'WARN' || $('log.level', '') == 'ERROR'"` means the processor runs when the `log.level` field is `WARN` or `ERROR`.
- `tag` – Identifier for the processor that you can use for debugging and metrics. In the example, the tag is set to `high_severity_logs`.
- `if` – Conditionally runs the processor. In the example, `"ctx.log?.level == 'WARN' || ctx.log?.level == 'ERROR'",` means the processor runs when the `log.level` field is `WARN` or `ERROR`.
Copy link
Member

Choose a reason for hiding this comment

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

Is there an issue for updating this eventually? 👀

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

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

Generally looks good. I have a few suggestions. I'd love for @dedemorton to take a look if she has time.

@mdbirnstiehl mdbirnstiehl merged commit 6a5abf3 into elastic:main Aug 31, 2023
@mdbirnstiehl mdbirnstiehl deleted the log-stream-review branch August 31, 2023 15:10
mergify bot pushed a commit that referenced this pull request Aug 31, 2023
* Update logs docs for consistency and formatting

* more updates

* review updates

(cherry picked from commit 6a5abf3)
mergify bot pushed a commit that referenced this pull request Aug 31, 2023
* Update logs docs for consistency and formatting

* more updates

* review updates

(cherry picked from commit 6a5abf3)
mdbirnstiehl added a commit that referenced this pull request Aug 31, 2023
(cherry picked from commit 6a5abf3)

Co-authored-by: Mike Birnstiehl <[email protected]>
mdbirnstiehl added a commit that referenced this pull request Aug 31, 2023
(cherry picked from commit 6a5abf3)

Co-authored-by: Mike Birnstiehl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants