Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/reference/mapping/params/meta.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,27 @@ than or equal to 50.

NOTE: Field metadata is updatable by submitting a mapping update. The metadata
of the update will override the metadata of the existing field.

Elastic products standardize on the following metadata, which you may use too
in order to get a better out-of-the-box experience with your data.
Comment thread
jpountz marked this conversation as resolved.
Outdated

unit::

The unit of the field. Recognizes `"byte"` as well as
<<time-units,time units>>. By default, fields are assumed to not have a unit.
This information may only be specified on numeric fields.
Comment thread
jpountz marked this conversation as resolved.
Outdated

metric_type::

The type of metric. Recognizes `"gauge"` and `"counter"`. A gauge is a
single-valued measurement that can go up or down over time, such as a
temperature. A counter is a single-valued cumulative counter that only goes
up, such as the number of requests processed by a web server. By default,
fields are assumed to not be a metric. This information may only be
specified on numeric fields.
Comment thread
jpountz marked this conversation as resolved.
Outdated

ratio::

Whether the field is a ratio. Recognizes `true` and `false` (default). The

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
Whether the field is a ratio. Recognizes `true` and `false` (default). The
Whether the field is a ratio or percent. Recognizes `true` and `false` (default). The

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My understanding was that we always use ratios in the data we produce, never percentages (ie. ratio * 100), is this assumption wrong? If we have both, do we need to be able to make the distinction via this metadata so that Kibana would know?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@roncohen @ruflin and I had a small discussion about this yesterday. We see how this can be confusing for users, so we agreed this could be the best approach:

Having only percent stored as a unit (no need for a ratio flag in meta), where the value is expected to be in the [0-1] notation. This is how Metricbeat stores percentages today.

WDYT?

Comment thread
jpountz marked this conversation as resolved.
Outdated
value should not be `true` when a `unit` is also specified. This information
may only be specified on numeric fields.
Comment thread
jpountz marked this conversation as resolved.
Outdated