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

Improve Grok function docs #5243

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Improve Grok function docs #5243

merged 3 commits into from
Sep 11, 2024

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Aug 22, 2024

A recent community Slack thread inspired me to finish a long standing to-do to improve these Grok function docs.

If you'd like to review by seeing it rendered, I've got it on a personal staging site at:

https://66c760c8bd7394547de20d6c--spiffy-gnome-8f2834.netlify.app/docs/next/language/functions/grok

@philrz philrz requested a review from a team August 22, 2024 16:05
@philrz philrz self-assigned this Aug 22, 2024
that can be referenced in any pattern. The included named patterns can be seen
[here](https://raw.githubusercontent.com/brimdata/zed/main/pkg/grok/base.go).

### Comparison to Other Implementations
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 know this section is long, but it's my best attempt to deal with the fact that web searches for "grok parsing" and such will reveal tons of examples that, taken unmodified, will not work in our implementation. Since we collectively don't have the cycles or stomach to build full compatibility with Logstash, I figure the next best thing is just disclose as much as we can and hope users are patient.

@philrz philrz requested review from mattnibs and nwt August 28, 2024 15:55
@mattnibs
Copy link
Collaborator

I think my problem with this change is it basically reads like here are the features we don't have that logstash has when docs usually read like here are the features. It also assumes that user looking at this doc is familiar with logstash's implementation of grok which probably is true but also might now be. I do think we could add example showing how to capture nested fields using nest_dotted and an example of how to do type conversion after the function is applied. I do think it would be ok to place a section called "differences from logstash" at the bottom of the docs after the examples.

Copy link
Member

@nwt nwt left a comment

Choose a reason for hiding this comment

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

I spoke with @mattnibs about this today. We agreed that working through his suggestions comes second to work he and I are focused on now, so we should merge this as is (and possibly revisit the suggestions later).

@philrz
Copy link
Contributor Author

philrz commented Sep 11, 2024

Thanks @nwt and @mattnibs! If we're lucky, some users may actually work off these docs by the time the topic next comes around and we'll have the benefit of their input as well. I'll go ahead and merge this for now.

@philrz philrz merged commit 94c2630 into main Sep 11, 2024
4 checks passed
@philrz philrz deleted the grok-docs-improve branch September 11, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants