Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LogRecord observed timestamp field #5367

Closed
wants to merge 1 commit into from

Conversation

jack-berg
Copy link
Member

The log data model differentiates between timestamp and observed timestamp.

Timestamp is the time at which the log occurred. Observed timestamp is the time at which the log was recorded in the collection system.

Timestamp is different than observed timestamp if the logs are being processed asynchronously. For example, maybe the logs are being read from a file, or are being processed on a different thread than where they occur. These will be very frequently the same for the SDK, but occasionally they will be different.

We could wait to add setters in the API until users request it, but we really should minimally be including getters on LogRecordData, and we really should populate the LogRecord#observed_time_unix_nano when serializing OTLP payloads.

IMO, we might as well go all the way and add the API setters.

@jack-berg jack-berg requested a review from a team April 10, 2023 20:40
@jack-berg jack-berg closed this Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant