Skip to content

es_index_from_timestamp behavior #528

@deric

Description

@deric

The documentation for es_index_from_timestamp says

Boolean flag, if true then any time interpolation (often used to generate the
ElasticSeach index) will use the timestamp from the processed message rather
than the system time.

But when looking at the code:

local ns
if cfg.es_index_from_timestamp then ns = tbl.Timestamp end
tbl.Timestamp = mi.get_timestamp_ms(ns)

it seems that also using system time vs. using time from log (message) depends on this flag. When ns is nil, mi.get_timestamp_ms(ns) will be computed based on current system time? Or am I missing something?

It might be better to call the parameter something like use_message_timestamp?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions