-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add temporality option to readers #2944
Comments
Possible implementation: package metric
// Temporality is a measurement intervals relationship to time.
type Temporality uint8
const (
// CumulativeTemporality defines a measurement interval that continues to
// expand forward in time from a starting point. New measurements are
// added to all previous measurements since a start time.
CumulativeTemporality Temporality = iota
// DeltaTemporality defines a measurement interval that resets each cycle.
// Measurements from one cycle are recorded independently, measurements
// from other cycles do not affect them.
DeltaTemporality
)
// WithTemporality uses the selector to determine the Temporality measurements
// from instrument should be recorded with.
func WithTemporality(selector func(instrument view.Instrument) Temporality) PeriodicReaderOption {
/* ... */
}
// Add a similar option for a manual reader. |
Blocked on the |
I think there will also need to be a way for the |
We should be careful how we define constants to represent these options and consider keeping them in line with the OTLP definitions, which would be: const (
undefinedTemporality Temporality = iota
DeltaTemporality
CumulativeTemporality
) We would probably want to leave |
Closed #2949 |
Measurement temporality is defined at the reader level in the specification:
The manual and periodic readers need to accept an option to configure this.
The text was updated successfully, but these errors were encountered: