1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-15 01:04:25 +02:00

Use uint64 Count consistently in metric aggregation (#1430)

* Use uint64 Count consistently

* Number
This commit is contained in:
Joshua MacDonald
2021-01-05 23:17:20 -08:00
committed by GitHub
parent 3a337d0b79
commit fe9d1f7ec5
16 changed files with 37 additions and 43 deletions

View File

@ -43,7 +43,7 @@ type (
// Count returns the number of values that were aggregated.
Count interface {
Aggregation
Count() (int64, error)
Count() (uint64, error)
}
// Min returns the minimum value over the set of values that were aggregated.
@ -86,16 +86,14 @@ type (
// aggregating integers.
Boundaries []float64
// Counts are floating point numbers to account for
// the possibility of sampling which allows for
// non-integer count values.
Counts []float64
// Counts holds the count in each bucket.
Counts []uint64
}
// Histogram returns the count of events in pre-determined buckets.
Histogram interface {
Aggregation
Count() (int64, error)
Count() (uint64, error)
Sum() (number.Number, error)
Histogram() (Buckets, error)
}
@ -106,7 +104,7 @@ type (
Min() (number.Number, error)
Max() (number.Number, error)
Sum() (number.Number, error)
Count() (int64, error)
Count() (uint64, error)
}
// Distribution supports the Min, Max, Sum, Count, and Quantile
@ -116,7 +114,7 @@ type (
Min() (number.Number, error)
Max() (number.Number, error)
Sum() (number.Number, error)
Count() (int64, error)
Count() (uint64, error)
Quantile(float64) (number.Number, error)
}
)