Giter VIP home page Giter VIP logo

Comments (8)

hdost avatar hdost commented on June 12, 2024 1

Is that the case ?
Start time should be the first point in time something existed
End time is usually when the datapoint was recorded.

And https://github.com/open-telemetry/opentelemetry-proto/blob/c5c8b28012583fda55b0cb16f73a820722171d49/opentelemetry/proto/metrics/v1/metrics.proto#L176

I would imagine starttime could be moved up, but that the time/endtime would need to stay under.

from opentelemetry-rust.

hdost avatar hdost commented on June 12, 2024 1

Perhaps for sum its not an issue since we are just adding all structures together, but if in a collection for a histogram you need to aggregate latencies. The observation time matters.

from opentelemetry-rust.

cijothomas avatar cijothomas commented on June 12, 2024 1

Yes I can see your point, but the current implementation in this repo does not support that - it uses same start and end for all datapoints.
Also, I don't think we ever record the precise time at which the measurement was reported (too much perf cost) - we only say it is between the start and end time. It is possible to go more precise, at the cost of more perf.

The data model has some pictures (Histograms and Sums), which is aligned with my proposal - the actual recordings occur somewhere between t1 and t2.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#histogram

Anyway, I'll send a PR with the change.

from opentelemetry-rust.

cijothomas avatar cijothomas commented on June 12, 2024

This will be a breaking change for folks authoring metric exporters, and must be done before SDK stable release.

from opentelemetry-rust.

cijothomas avatar cijothomas commented on June 12, 2024

Is that the case ?

Yes. Every datapoint/metricpoint(time-series) in the same metric has same start/end time for a collection.

from opentelemetry-rust.

hdost avatar hdost commented on June 12, 2024

Is that the case ?

Yes. Every datapoint/metricpoint(time-series) in the same metric has same start/end time for a collection.

Start time isn't intended to be based on collection time, but observations time. If a datapoint was first observed for series A at T1 then it should be T1 until the process dies. If the last observation occurs at T3 then start should be T1 and "endtime" or really just "time" should be T3.

// StartTimeUnixNano in general allows detecting when a sequence of
// observations is unbroken. This field indicates to consumers the
// start time for points with cumulative and delta
// AggregationTemporality, and it should be included whenever possible
// to support correct rate calculation. Although it may be omitted
// when the start time is truly unknown, setting StartTimeUnixNano is
// strongly encouraged.

From the proto

from opentelemetry-rust.

cijothomas avatar cijothomas commented on June 12, 2024

What does the proto tell? I am not able to follow your concern. Could you elaborate or send a unit test showing the issue?

from opentelemetry-rust.

lalitb avatar lalitb commented on June 12, 2024

Just to be clear, start-time could be moved up, and end-time/aggregation-time would remain in data point - is it so?

https://github.com/open-telemetry/opentelemetry-proto/blob/9d139c87b52669a3e2825b835dd828b57a455a55/opentelemetry/proto/metrics/v1/metrics.proto#L156C1-L157C17

// Data points with the 0 value for TimeUnixNano SHOULD be rejected
// by consumers.

from opentelemetry-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.