vectordotdev / vectordotdev/vector
Automatic timestamp extraction
Nobody has claimed this yet.
- 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:
- 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.
- 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.
- Is this better off as an explicit transform? Is this too magical?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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