Skip to content

docs(logs): clarify setTimestamp javadoc for event timestamp behavior#8104

Open
ruturajjadhav07 wants to merge 2 commits intoopen-telemetry:mainfrom
ruturajjadhav07:fix/settimestamp-javadoc
Open

docs(logs): clarify setTimestamp javadoc for event timestamp behavior#8104
ruturajjadhav07 wants to merge 2 commits intoopen-telemetry:mainfrom
ruturajjadhav07:fix/settimestamp-javadoc

Conversation

@ruturajjadhav07
Copy link

Summary

The Javadoc for LogRecordBuilder#setTimestamp previously stated:

"If unset, it will be set to the current time when emit() is called."

This is incorrect: the implementation only provides a default value for the observed timestamp,
not for the event timestamp.

This PR updates the Javadoc to clarify that:

  • Unset event timestamps are NOT automatically populated when emit() is called.
  • Only the observed timestamp receives a default value.

Related Issue

Fixes #8097


Type of Change

  • Documentation update
  • Bug fix
  • Code change

@ruturajjadhav07 ruturajjadhav07 requested a review from a team as a code owner February 19, 2026 15:50
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 19, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jack-berg / name: Jack Berg (5b0b36a)
  • ✅ login: ruturajjadhav07 / name: Ruturaj Jadhav (317aa33, 5b0b36a)

…er.java

Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com>
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.

SdkLogRecordBuilder does not properly set default timestamp

2 participants

Comments