-
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
libbeat: add support for defining unit and metric_type field metadata in ES templates #25419
Conversation
Add Unit and MetricType properties to Field, which may be set to "standard" unit and metric type metadata values to aid in interpretation of the data.
return fmt.Errorf("no format expected for field %s, found: %s", f.Name, f.Format) | ||
} | ||
allowedFormatters = []string{"date_range"} | ||
case "boolean", "binary", "ip", "alias", "array": |
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 have moved "histogram" up to the numeric types
Pinging @elastic/agent (Team:Agent) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
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.
thank you for tackling this! I left a comment about ES compatibility, otherwise LGTM
For the record, we added this also to the package spec, I'm glad the we are using the same field names, so things are compatible between beats and packages 🎉 elastic/package-spec#42 |
… in ES templates (#25419) * libbeat/mapping: add Unit and MetricType to Field Add Unit and MetricType properties to Field, which may be set to "standard" unit and metric type metadata values to aid in interpretation of the data. * libbeat/template: add meta.{metric_type,unit} (cherry picked from commit 23c546e)
… in ES templates (#25419) (#25479) * libbeat/mapping: add Unit and MetricType to Field Add Unit and MetricType properties to Field, which may be set to "standard" unit and metric type metadata values to aid in interpretation of the data. * libbeat/template: add meta.{metric_type,unit} (cherry picked from commit 23c546e) Co-authored-by: Andrew Wilkins <axw@elastic.co>
What does this PR do?
Add optional
unit
andmetric_type
properties to fields in fields.yml, which are used to set field metadata in Elasticsearch templates. These are allowed only for numeric field types, and we check the values against those defined in the Elasticsearch docs at https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.htmlWhy is it important?
We would like to add unit/metric_type field metadata in fields defined by APM Server.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.