Skip to content

Update naming.md to clarify 'duration' definition#3543

Open
lahabana wants to merge 5 commits intoopen-telemetry:mainfrom
lahabana:patch-1
Open

Update naming.md to clarify 'duration' definition#3543
lahabana wants to merge 5 commits intoopen-telemetry:mainfrom
lahabana:patch-1

Conversation

@lahabana
Copy link
Copy Markdown

Part of #816

Changes

time and duration are close but slightly different ways to instrument times.

There are plenty of examples in this doc with duration yet it wasn't defined in the instrument naming section.

@jack-berg explained in this comment clearly the difference between time and duration.

This attempts to update the documentation to persist this information by documenting duration and explaining when to use it compared to time.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

**time** and **duration** are close but slightly different ways to instrument times.

There are plenty of examples in this doc with **duration** yet it wasn't defined in the instrument naming section.

@jack-berg explained in [this comment](open-telemetry#816 (comment)) clearly the difference between **time** and **duration**.

This attempts to update the documentation to persist this information by documenting **duration** and explaining when to use it compared to **time**.

Part of open-telemetry#816
Copy link
Copy Markdown
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

Thanks for the clarification, it makes sense, just left some comments to make it more precise

Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
@lahabana
Copy link
Copy Markdown
Author

Thanks for clarifying @lmolkova I've included your suggestions.

Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
@lahabana
Copy link
Copy Markdown
Author

@lmolkova updated. Changelog fails does it really make sense to add an entry in the Changelog for this?

@lmolkova lmolkova moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Mar 25, 2026
lahabana added 2 commits April 1, 2026 10:12
Signed-off-by: Charly Molter <charly.molter@konghq.com>
@lahabana lahabana requested review from kamphaus and lmolkova April 1, 2026 08:15
should be called `{operation name}.duration`.
For example, `http.server.request.duration` for the time taken to process each HTTP request.
The difference with `time` is that `time` is used to measure monotonically increasing total time,
whereas `duration` captures the aggregated elapsed time.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the word "aggregated" is a bit confusing here, maybe something like

Suggested change
whereas `duration` captures the aggregated elapsed time.
whereas `duration` captures the elapsed time of discrete operations

@lmolkova lmolkova added the Skip Changelog Label to skip the changelog check label Apr 3, 2026
@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented Apr 3, 2026

Changelog fails does it really make sense to add an entry in the Changelog for this?

@lahabana no need, I added label to skip changelog, adding [chore] to the title would also do the job

@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog Label to skip the changelog check

Projects

Status: Ready to be Merged

Development

Successfully merging this pull request may close these issues.

4 participants