Skip to content

Commit

Permalink
Add ObservedTimestamp to LogRecord
Browse files Browse the repository at this point in the history
This implements the log data model specification change open-telemetry/opentelemetry-specification#2184
  • Loading branch information
tigrannajaryan committed Jan 7, 2022
1 parent 8ba33cc commit 56ac974
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions opentelemetry/proto/logs/v1/logs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,23 @@ message LogRecord {
// Value of 0 indicates unknown or missing timestamp.
fixed64 time_unix_nano = 1;

// Time when the event was observed by the collection system.
// For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
// this timestamp is typically set at the generation time and is equal to Timestamp.
// For events originating externally and collected by OpenTelemetry (e.g. using
// Collector) this is the time when OpenTelemetry's code observed the event measured
// by the clock of the OpenTelemetry code. This field SHOULD be set once the event is
// observed by OpenTelemetry.
//
// For converting OpenTelemetry log data to formats that support only one timestamp or
// when receiving OpenTelemetry log data by recipients that support only one timestamp
// internally the following logic is recommended:
// - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
// Value of 0 indicates unknown or missing timestamp.
fixed64 observed_time_unix_nano = 11;

// Numerical value of the severity, normalized to values described in Log Data Model.
// [Optional].
SeverityNumber severity_number = 2;
Expand Down

0 comments on commit 56ac974

Please sign in to comment.