Skip to content

feat(om2): clarify Timestamp and Start Timestamp semantics#2929

Open
krajorama wants to merge 3 commits intomainfrom
krajo/om2-timestamp-semantics
Open

feat(om2): clarify Timestamp and Start Timestamp semantics#2929
krajorama wants to merge 3 commits intomainfrom
krajo/om2-timestamp-semantics

Conversation

@krajorama
Copy link
Copy Markdown
Member

@krajorama krajorama commented Mar 26, 2026

Summary

  • Adds a paragraph under Timestamps distinguishing the two kinds of Timestamps and their naming conventions used in this standard
  • Expands the Sample section to explain what each Timestamp type represents and how Start Timestamp helps detect counter resets even when the counter value has not decreased
  • Specifies that a zero Start Timestamp MUST be treated as equivalent to no Start Timestamp
  • Removes redundant Start Timestamp explanations from Counter, Histogram, Summary sections (now covered once in Sample)
  • Fixes "timestamp of the reset" → "approximate reset time" in the Counter section

Test plan

  • Verify the change renders correctly in the docs site

Signed-off-by: György Krajcsovits gyorgy.krajcsovits@grafana.com

🤖 Coded with Claude Sonnet 4.6. Generated with Claude Code

- Add paragraph to Timestamps section distinguishing explicit Timestamp
  from Start Timestamp and clarifying naming conventions
- Expand Sample section to explain what Timestamp and Start Timestamp
  represent, and how Start Timestamp helps detect counter resets
- Remove redundant Start Timestamp explanations from Counter and
  Histogram sections since they are now covered in Sample
- Fix "timestamp of the reset" -> "approximate reset time" in Counter

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
- "specifies" -> "SHOULD specify" to allow edge cases where exact
  measurement start is not known
- "is equivalent to" -> "MUST be treated as equivalent to" to make
  zero Start Timestamp handling a normative requirement on ingestors

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
@krajorama krajorama requested review from bwplotka, dashpole and ywwg March 26, 2026 09:02
Align with Counter and Histogram sections by using "SHOULD have a
Start Timestamp" consistently.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
A Sample is a single data point within a Metric. It MUST have a Value, MAY have a Timestamp. It MAY include Exemplars and MAY have a start timestamp, depending on the MetricFamily Type.
A Sample is a single data point within a Metric. It MUST have a Value, MAY have a Timestamp. It MAY include Exemplars and MAY have a Start Timestamp, depending on the MetricFamily Type.

Samples SHOULD NOT have Timestamps. If present, a Sample's Timestamp specifies when the value was observed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Samples SHOULD NOT have Timestamps. If present, a Sample's Timestamp specifies when the value was observed.
Samples SHOULD NOT have Timestamps. See [Exposing Timestamps](#exposing-timestamps) for why this is not recommended. If present, a Sample's Timestamp specifies when the value was observed.

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.

3 participants