vectordotdev / vectordotdev/vector

Automatic timestamp extraction

Open
#2,255 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: parsing have: should meta: idea needs: approval
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

A very common practice for logs is to prefix them with a timestamp, and having to set up a *_parser transform to extract this feels a little clunky given that this fits squarely in the observability domain. I'd like to propose the following:

  • Vector should perform this extraction automatically during log creation. So, this would happen within each relevant source.
  • Ability to disable this on a per-source basis.
  • We should use the exact same formats defined here. In fact, these formats should be extracted so they can be shared.

Outstanding questions:

  1. What do we do when the timestamp in the log lacks sufficient precision? For example, what if the log lacks seconds? Maybe the formats detected should, at least, require seconds.
  2. How would this affect performance? If it is substantial we should discuss ways to improve this or allow the user to opt-in in such a way that would improve this. Ex: supplying an exact format.
  3. Is this better off as an explicit transform? Is this too magical?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the timestamp formats in src/types.rs at the linked lines, then inspect how relevant sources create logs and how parser transforms currently extract timestamps. Define the behavior for precision, per-source disabling, shared formats, and performance before implementation. Done means the proposal's open design questions are resolved and automatic extraction is covered for each affected source.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.