-
Notifications
You must be signed in to change notification settings - Fork 431
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
Introducing doc section for the expected values in reserved fields #684
Conversation
@webmat |
@benskelker here's a scoping estimate:
|
Thanks @MikePaquette |
@webmat Here is some feedback:
I think this layout looks great. See next comment for questions about examples.
Yes. I think we should draw a distinction between allowed and expected throughout the categorization section. For example, the values that ECS defines for these fields should be called allowed values, as they are the only ones that can be used for ECS compatibility. However, the subset of allowed values of
👍
Sounds like a good idea, but I think the examples section (see next comment) might obviate the need for explicit details in this section
Not sure. Linkable from where? |
@webmat I think that detailed examples are going to be important for ECS users who are creating their own custom mappings. Have you given some thought as to where we might put the examples? I see two options:
I would vote for option 2.@ |
@benskelker re: #684 (comment)
I think this sounds good, but would like to see an example of how it looks. Also, need to consider the examples discussion #684 (comment) as well. |
@MikePaquette Yes, excellent point about making room for examples, thanks for the reminder. How would you envision them? A single "examples" section at the bottom of each page (once at the bottom of event.kind, once at the bottom of event.category, etc)? Or do you think we'll need one per value (e.g. one for category "authentication", one for category "process", etc)? I'd like to start with one example section per page (total of 4 example sections), because the other alternative requires coming up with 50 or so examples. This is something we would need to build over time, as it's going to require a lot more effort. In the meantime, I'll see if I can write the code to support both, when examples are available at either level (TBD). @benskelker I like your suggestion to list each acceptable value directly in the field definition without details. It'll be good for experienced users who just need to remember the exact wording they're looking for. However this listing is not going to be enough, we do need new pages to fully explain this. Here's how each set of values (4 groups of values, for each of the fields) will work:
I'm not opposed to the field definition actually listing each valid value without details, that actually sounds like a good idea. But we will need the new documentation sections to fully flesh out and document the points above. |
@webmat |
@benskelker Thanks for clarifying, and yes this is a great idea. If you could come up with the appropriate asciidoc snippet to generate this list, I will incorporate it here. |
Sure @nik9000 is working on transforming docs straight to HTML. This would make our lives easier and should be completely transparent. Is it ok if I ask Nik if we can use direct HTML for the ECS docs? |
Yeah Nik already opened elastic/docs#1559 but with the time pressure for next week's release, I'm not looking at that until the release is out. I don't think that's gonna change the format of the asciidoc we're writing though, right? Can you share the snippet that would let me include the list side by side like you demonstrated above? I'd love to include it in the PR ASAP. I think it looks good :-) |
@webmat sent via slack. let me know if you have any problems. |
Ok, I'm satisfied with the state of the generator to merge. Can I get a sanity check please? :-) We need to follow up with some additional work on it, but can be done as a separate PR. I've moved these items in the "Follow-up work" section in the issue body. Merging this PR will let me continue following the plan outlined in meta-issue #691. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we can cross-link individually specified field expected values in the docs, i.e. in:
Important: The field value must be one of the following:
alert event
link alert and event each individually to something like event-kind.html#alert
and event-kind.html#event
Might make the ergonomics a bit easier when navigating rather than clicking on the subsequent link and scrolling down the page to find the value you're looking for, especially as we deal with things like event.category
which have more valid expected values to list out on one page.
I'm assuming the above could be implemented in a subsequent PR if you like the idea, so approving.
Yeah that's what I meant above, with
I'll keep a note to address later. Not a blocker for 1.4 & initial introduction, but may indeed prove useful, especially if the value descriptions end up being pretty long. |
Thanks @andrewstucki, I'll merge this soon. Anybody reviewing this after merge, keep in mind that master is just a dev branch. Any feedback on this is still welcome and up for discussion. I'll address further feedback in the next steps |
Please note that this PR is not focused on the actual values that belong in these fields. Feedback on those will be requested separately. This PR is solely focused on the structure of the documentation pages and implementing the plumbing driving this.
Preview: http://ecs_684.docs-preview.app.elstc.co/diff
TODO
Open questions
event.type
values for eachevent.category
? Yesevent.kind
?)event.type
under a given category come with additional contextual details, when used within that category?Follow-up work
cc @MikePaquette @benskelker