Skip to content

Unexpected default Timestamp in logs #193

@duncanpo

Description

@duncanpo

There are two timestamps in a log record, Timestamp and ObservedTimestamp. For details about what the two mean and how are they different, see documentation of the log data model.
If Timestamp option is not passed in when emitting a log record, ObservedTimestamp defaults to the current time as expected, but Timestamp defaults to the start of the epoch January 1st, 1970. This is unexpected and probably impractical. A more useful default would be to set both Timestamp and ObservedTimestamp to the current time.

It appears in otel-cpp, if Timestamp is not supplied, Timestamp property is left unset, which would take the default value of 0 time since epoch.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions