Skip to content

Add More Customization to Relative Date Format #25815

@pickypg

Description

@pickypg

Relates to #13784, but this is a specific example.

Describe the feature:

A field formatter that took the difference from a date field versus now where now is shared (aka the Date Formatter's Relative Date formatter). As a step further though, we should be able to control how fine grained the display is. For example, it currently jumps from "a few seconds ago" to "a minute ago" then minute increments until the hour mark (et cetera). It might be nice to see "15 seconds ago" or even "1 m 15 s ago".

Describe a specific use case for the feature:

When showing log events, it would be nice to see how long ago a certain event occurred and as time passes into hours, it would be nice to get a more exact timeframe.

Elasticsearch does not support this through script fields using Kibana because Elasticsearch intentionally makes it very hard to get ahold of now dynamically (because each shard / field would see a different now, which would be wrong).

We could solve this differently by supporting script params within Kibana (#19716) and providing the ability to tell ES what "now" is at search time, which would allow the script field to do all of this, but that would be a nice to have versus direct UI support.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions