open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.76k stars 890 forks source link

Clarify: the timestamp when a metric collection system started #3576

Open pellared opened 1 year ago

pellared commented 1 year ago

What are you trying to achieve?

Set appropriate value of start_time_unix_nano for gauge: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#gauge

(optional) A timestamp (start_time_unix_nano) which best represents the first possible moment a measurement could be recorded. This is commonly set to the timestamp when a metric collection system started.

What did you expect to see?

A more clear definition or at least recommendation what "the timestamp when a metric collection system started" is.

Is it the time when:

  1. meter provider is created,
  2. instrument is created,
  3. first collect occurs,
  4. application starts,
  5. other?

Additional context.

Related issue in OTel Go: https://github.com/open-telemetry/opentelemetry-go/issues/4269

pellared commented 1 year ago

@jsuereth @jmacd Any insights as I think you were involved in this area?

reyang commented 1 year ago

"the first possible moment a measurement could be recorded" sounds very accurate to me.

MrAlias commented 1 year ago

"the first possible moment a measurement could be recorded" sounds very accurate to me.

Which of the times @pellared mentioned above do you interpret this to mean?

reyang commented 1 year ago

"the first possible moment a measurement could be recorded" sounds very accurate to me.

Which of the times @pellared mentioned above do you interpret this to mean?

5.

MrAlias commented 1 year ago

"the first possible moment a measurement could be recorded" sounds very accurate to me.

Which of the times @pellared mentioned above do you interpret this to mean?

5.

Can you elaborate? When could a measurement possibly be recorded other than times listed?

pellared commented 1 year ago

Personally I propose

  1. meter provider is created

as meter's can be created before meter provider is created. I think it could be also more meaningful if there would be more metric providers.

pellared commented 1 year ago

SIG meeting:

It is still unclear what is the expected value. This is also discussed in https://github.com/open-telemetry/opentelemetry-specification/pull/3540

CC @jmacd @jack-berg