Skip to content

Commit e2a8362

Browse files
docs(logs): clarify setTimestamp javadoc for event timestamp behavior (#8104)
Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com>
1 parent d14eb6c commit e2a8362

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/all/src/main/java/io/opentelemetry/api/logs/LogRecordBuilder.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ public interface LogRecordBuilder {
3131
/**
3232
* Set the epoch {@code timestamp}, using the timestamp and unit.
3333
*
34-
* <p>The {@code timestamp} is the time at which the log record occurred. If unset, it will be set
35-
* to the current time when {@link #emit()} is called.
34+
* <p>Note: If not set, the emitted log will not have a timestamp.
3635
*/
3736
LogRecordBuilder setTimestamp(long timestamp, TimeUnit unit);
3837

3938
/**
4039
* Set the epoch {@code timestamp}, using the instant.
4140
*
42-
* <p>The {@code timestamp} is the time at which the log record occurred. If unset, it will be set
43-
* to the current time when {@link #emit()} is called.
41+
* <p>Note: If not set, the emitted log will not have a timestamp.
4442
*/
4543
LogRecordBuilder setTimestamp(Instant instant);
4644

0 commit comments

Comments
 (0)