@@ -1867,15 +1867,6 @@ func validateCount(sum float64, count uint64, negativeBuckets, positiveBuckets m
1867
1867
return nil
1868
1868
}
1869
1869
1870
- func validateExemplars (exemplars []* dto.Exemplar ) error {
1871
- for _ , e := range exemplars {
1872
- if ! e .GetTimestamp ().IsValid () {
1873
- return fmt .Errorf ("invalid timestamp found in exemplars" )
1874
- }
1875
- }
1876
- return nil
1877
- }
1878
-
1879
1870
// NewConstNativeHistogram returns a metric representing a Prometheus Nativehistogram with
1880
1871
// fixed values for the count, sum, and positive/negative/zero bucket counts. As those parameters
1881
1872
// cannot be changed, the returned value does not implement the Histogram
@@ -1905,7 +1896,6 @@ func NewConstNativeHistogram(
1905
1896
schema int32 ,
1906
1897
zeroThreshold float64 ,
1907
1898
createdTimestamp time.Time ,
1908
- exemplars []* dto.Exemplar ,
1909
1899
labelValues ... string ,
1910
1900
) (Metric , error ) {
1911
1901
if desc .err != nil {
@@ -1920,9 +1910,6 @@ func NewConstNativeHistogram(
1920
1910
if err := validateCount (sum , count , negativeBuckets , positiveBuckets , zeroBucket ); err != nil {
1921
1911
return nil , err
1922
1912
}
1923
- if err := validateExemplars (exemplars ); err != nil {
1924
- return nil , err
1925
- }
1926
1913
1927
1914
NegativeSpan , NegativeDelta := makeBucketsFromMap (negativeBuckets )
1928
1915
PositiveSpan , PositiveDelta := makeBucketsFromMap (positiveBuckets )
@@ -1932,7 +1919,6 @@ func NewConstNativeHistogram(
1932
1919
CreatedTimestamp : timestamppb .New (createdTimestamp ),
1933
1920
Schema : & schema ,
1934
1921
ZeroThreshold : & zeroThreshold ,
1935
- Exemplars : exemplars ,
1936
1922
SampleCount : & count ,
1937
1923
SampleSum : & sum ,
1938
1924
@@ -1964,7 +1950,6 @@ func MustNewConstNativeHistogram(
1964
1950
nativeHistogramSchema int32 ,
1965
1951
nativeHistogramZeroThreshold float64 ,
1966
1952
createdTimestamp time.Time ,
1967
- exemplars []* dto.Exemplar ,
1968
1953
labelValues ... string ,
1969
1954
) Metric {
1970
1955
nativehistogram , err := NewConstNativeHistogram (desc ,
@@ -1976,7 +1961,6 @@ func MustNewConstNativeHistogram(
1976
1961
nativeHistogramSchema ,
1977
1962
nativeHistogramZeroThreshold ,
1978
1963
createdTimestamp ,
1979
- exemplars ,
1980
1964
labelValues ... )
1981
1965
if err != nil {
1982
1966
panic (err )
0 commit comments