-
Notifications
You must be signed in to change notification settings - Fork 419
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
For boolean values, should we recommend using tags or a boolean field? #100
Comments
I would delay this discussion until we have actual boolean values. In general I see the |
Agreed. I created the "deferred" label, and gave it a boring color so we stop noticing it :-) |
@ruflin @webmat We've got 2 PRs blocked. Let's not defer it for too long please. The proposal for Assuming reader pipeline in beats uses fields we always have to generate this:
Using tags the event would become:
The event does not exist yet in filebeat, as we're still processing the input. Having tags we're somewhat flexible, as we only need to define/add tags locally + document the tag only. Using fields we would have to pass a 'state'-struct, transform the struct the event fields, update fields.yml + documentation. My impression is that using tags would be somewhat more flexible and require less places/files to be updated (less things to forget). |
We have one similar example in ECS which is |
Boolean fields are meant to represent a binary value, but the absence of the field can add a third state to consider, making the field actually ternary (true, false, absent).
Alternately we could represent this binary value by the presence or absence of a specific tag in
tags
.Of course
tags
is largely meant to let people add free form tags to their event stream, without needing them to be documented formally. But that doesn't prevent us from documenting some commonly tags, just like we're documenting field names & types.This idea came up in elastic/beats#7991, discussing whether we should have a boolean field
log.truncated
or a tagtruncated
.If we think using tags as "true" binary booleans should be the preferred approach:
At the time of writing this issue, there are no boolean fields in ECS.
The text was updated successfully, but these errors were encountered: