mirror of https://github.com/prometheus/prometheus
Merge pull request #761 from prometheus/fabxc/vendor
Update client_golang dependency to 0.6.0pull/763/head 0.14.0
commit
67e77411ba
|
@ -35,23 +35,23 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/prometheus/client_golang/extraction",
|
"ImportPath": "github.com/prometheus/client_golang/extraction",
|
||||||
"Comment": "0.5.0-8-gfcd2986",
|
"Comment": "0.6.0",
|
||||||
"Rev": "fcd2986466589bcf7a411ec3b52d85a8df9dcc8b"
|
"Rev": "e319516b0f97867d36151451cab8d4aefbe1786b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/prometheus/client_golang/model",
|
"ImportPath": "github.com/prometheus/client_golang/model",
|
||||||
"Comment": "0.5.0-8-gfcd2986",
|
"Comment": "0.6.0",
|
||||||
"Rev": "fcd2986466589bcf7a411ec3b52d85a8df9dcc8b"
|
"Rev": "e319516b0f97867d36151451cab8d4aefbe1786b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/prometheus/client_golang/prometheus",
|
"ImportPath": "github.com/prometheus/client_golang/prometheus",
|
||||||
"Comment": "0.5.0-8-gfcd2986",
|
"Comment": "0.6.0",
|
||||||
"Rev": "fcd2986466589bcf7a411ec3b52d85a8df9dcc8b"
|
"Rev": "e319516b0f97867d36151451cab8d4aefbe1786b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/prometheus/client_golang/text",
|
"ImportPath": "github.com/prometheus/client_golang/text",
|
||||||
"Comment": "0.5.0-8-gfcd2986",
|
"Comment": "0.6.0",
|
||||||
"Rev": "fcd2986466589bcf7a411ec3b52d85a8df9dcc8b"
|
"Rev": "e319516b0f97867d36151451cab8d4aefbe1786b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/prometheus/client_model/go",
|
"ImportPath": "github.com/prometheus/client_model/go",
|
||||||
|
|
|
@ -61,7 +61,8 @@ const (
|
||||||
QuantileLabel = "quantile"
|
QuantileLabel = "quantile"
|
||||||
)
|
)
|
||||||
|
|
||||||
var labelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$")
|
// LabelNameRE is a regular expression matching valid label names.
|
||||||
|
var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$")
|
||||||
|
|
||||||
// A LabelName is a key for a LabelSet or Metric. It has a value associated
|
// A LabelName is a key for a LabelSet or Metric. It has a value associated
|
||||||
// therewith.
|
// therewith.
|
||||||
|
@ -73,7 +74,7 @@ func (ln *LabelName) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
if err := unmarshal(&s); err != nil {
|
if err := unmarshal(&s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !labelNameRE.MatchString(s) {
|
if !LabelNameRE.MatchString(s) {
|
||||||
return fmt.Errorf("%q is not a valid label name", s)
|
return fmt.Errorf("%q is not a valid label name", s)
|
||||||
}
|
}
|
||||||
*ln = LabelName(s)
|
*ln = LabelName(s)
|
||||||
|
|
|
@ -9,16 +9,15 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/model"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
dto "github.com/prometheus/client_model/go"
|
dto "github.com/prometheus/client_model/go"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/prometheus/client_golang/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`)
|
metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`)
|
||||||
labelNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Labels represents a collection of label name -> value mappings. This type is
|
// Labels represents a collection of label name -> value mappings. This type is
|
||||||
|
@ -194,6 +193,6 @@ func (d *Desc) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkLabelName(l string) bool {
|
func checkLabelName(l string) bool {
|
||||||
return labelNameRE.MatchString(l) &&
|
return model.LabelNameRE.MatchString(l) &&
|
||||||
!strings.HasPrefix(l, model.ReservedLabelPrefix)
|
!strings.HasPrefix(l, model.ReservedLabelPrefix)
|
||||||
}
|
}
|
||||||
|
|
2
Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus/histogram.go
generated
vendored
2
Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus/histogram.go
generated
vendored
|
@ -147,7 +147,7 @@ type HistogramOpts struct {
|
||||||
// element in the slice is the upper inclusive bound of a bucket. The
|
// element in the slice is the upper inclusive bound of a bucket. The
|
||||||
// values must be sorted in strictly increasing order. There is no need
|
// values must be sorted in strictly increasing order. There is no need
|
||||||
// to add a highest bucket with +Inf bound, it will be added
|
// to add a highest bucket with +Inf bound, it will be added
|
||||||
// implicitly. The default value is DefObjectives.
|
// implicitly. The default value is DefBuckets.
|
||||||
Buckets []float64
|
Buckets []float64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,10 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
dto "github.com/prometheus/client_model/go"
|
|
||||||
|
|
||||||
"github.com/matttproud/golang_protobuf_extensions/pbutil"
|
"github.com/matttproud/golang_protobuf_extensions/pbutil"
|
||||||
|
|
||||||
|
dto "github.com/prometheus/client_model/go"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Benchmarks to show how much penalty text format parsing actually inflicts.
|
// Benchmarks to show how much penalty text format parsing actually inflicts.
|
||||||
|
|
Loading…
Reference in New Issue