-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix alias field generation in docs #9269
Conversation
@dedemorton This is a fix for the aliases but I think we need a bigger overhaul on how we represent / show fields. @karenzone Perhaps if we figure it out for ECS, we can also use it here. |
filebeat/docs/fields.asciidoc
Outdated
+ | ||
-- | ||
type: alias | ||
|
||
path: agent.type |
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.
I find this literal output of path:
a bit dry. I understand that this is the terminology used inside ElasticSearch.
But I think we could output something a bit more human friendly here:
*`beat.name`*::
+
--
type: alias
alias to: agent.type
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.
changed, PR will be updated in a minute.
@ruflin I agree. The headings in particular are not very helpful and the repetition of headings looks odd. The structure looks especially bad when the descriptions in the source yml are cryptic. It works a bit better when the descriptions are more complete. I think we should come up with a good design for the reference content and work back from there. @karenzone Let's work on this together. |
Yeah the context is that all of these field being aliased are now replaced by more canonical fields. Most of them are ECS fields, but not necessarily. So there's a few things we can do, in addition to my simple suggestion above, if we think it's worth it:
One final note, the presence of an alias does not absolutely mean that this is a migration for 7.0, or caused by ECS. So perhaps all of these suggestions above need to be triggered by an additional field in the yml files. Such field migrations can keep happening in 8.0 and later, and we may want to be able to differentiate them. |
I don't like the idea of an asciidoc link because I don't want to force users to go to a different page to find a field description. I think the 3rd option is best because it helps users understand why we've created the aliases. At any rate, we should pull in the description of ECS fields from a single source of truth and use those descriptions wherever we describe the fields. I hope that we can make the descriptions generic enough so that they make sense wherever the description might show up. |
This PR is here to fix the current bug. As mentioned in my initial comment, we need to have a broader discussion but this should not hold back this PR. @dedemorton What is the best place we can continue this discussion? |
I'm good with splitting off the perfect representation of aliases to later. This PR addresses some foundational stuff. Perhaps open a GH issue specifically about the visual representation of aliases, and port the discussion there? |
Alias fields documented in the fields list were not correct. The reason is that `path` was used in our generation of the docs for a different puprose. This one was renamed and reporting of path was added for field alias.
799310e
to
82cab64
Compare
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.
Yes, LGTM
Alias fields documented in the fields list were not correct. The reason is that `path` was used in our generation of the docs for a different puprose. This one was renamed and reporting of path was added for field alias. (cherry picked from commit 753566b)
Alias fields documented in the fields list were not correct. The reason is that `path` was used in our generation of the docs for a different puprose. This one was renamed and reporting of path was added for field alias. (cherry picked from commit 753566b)
Alias fields documented in the fields list were not correct. The reason is that `path` was used in our generation of the docs for a different puprose. This one was renamed and reporting of path was added for field alias.
Alias fields documented in the fields list were not correct. The reason is that
path
was used in our generation of the docs for a different puprose. This one was renamed and reporting of path was added for field alias.