File tree 15 files changed +96
-16
lines changed
15 files changed +96
-16
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # Ignore everything
3
+ *
4
+
5
+ # But not these files:
6
+ ! .gitignore
7
+ ! * .mod
8
+ ! * .sum
9
+ ! README.md
10
+ ! Variables.mk
11
+ ! variables.env
12
+
13
+ * tmp.mod
Original file line number Diff line number Diff line change
1
+ # Project Development Dependencies.
2
+
3
+ This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo .
4
+
5
+ * Run ` bingo get ` to install all tools having each own module file in this directory.
6
+ * Run ` bingo get <tool> ` to install <tool > that have own module file in this directory.
7
+ * For Makefile: Make sure to put ` include .bingo/Variables.mk ` in your Makefile, then use $(<upper case tool name >) variable where <tool > is the .bingo/<tool >.mod.
8
+ * For shell: Run ` source .bingo/variables.env ` to source all environment variable for each tool.
9
+ * For go: Import ` .bingo/variables.go ` to for variable names.
10
+ * See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
11
+
12
+ ## Requirements
13
+
14
+ * Go 1.14+
Original file line number Diff line number Diff line change
1
+ # Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
2
+ # All tools are designed to be build inside $GOBIN.
3
+ BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST ) ) )
4
+ GOPATH ?= $(shell go env GOPATH)
5
+ GOBIN ?= $(firstword $(subst :, ,${GOPATH}) ) /bin
6
+ GO ?= $(shell which go)
7
+
8
+ # Below generated variables ensure that every time a tool under each variable is invoked, the correct version
9
+ # will be used; reinstalling only if needed.
10
+ # For example for goimports variable:
11
+ #
12
+ # In your main Makefile (for non array binaries):
13
+ #
14
+ # include .bingo/Variables.mk # Assuming -dir was set to .bingo .
15
+ #
16
+ # command: $(GOIMPORTS)
17
+ # @echo "Running goimports"
18
+ # @$(GOIMPORTS) <flags/args..>
19
+ #
20
+ GOIMPORTS := $(GOBIN ) /goimports-v0.9.3
21
+ $(GOIMPORTS ) : $(BINGO_DIR ) /goimports.mod
22
+ @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
23
+ @echo " (re)installing $( GOBIN) /goimports-v0.9.3"
24
+ @cd $(BINGO_DIR ) && GOWORK=off $(GO ) build -mod=mod -modfile=goimports.mod -o=$(GOBIN ) /goimports-v0.9.3 " golang.org/x/tools/cmd/goimports"
25
+
Original file line number Diff line number Diff line change
1
+ module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.
Original file line number Diff line number Diff line change
1
+ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
2
+
3
+ go 1.20
4
+
5
+ require golang.org/x/tools v0.9.3 // cmd/goimports
Original file line number Diff line number Diff line change
1
+ golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
2
+ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
3
+ golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
4
+ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5
+ golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
6
+ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
Original file line number Diff line number Diff line change
1
+ # Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
2
+ # All tools are designed to be build inside $GOBIN.
3
+ # Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
4
+ GOBIN = ${ GOBIN:=$(go env GOBIN) }
5
+
6
+ if [ -z "$GOBIN" ]; then
7
+ GOBIN = " $( go env GOPATH) /bin"
8
+ fi
9
+
10
+
11
+ GOIMPORTS = " ${ GOBIN } /goimports-v0.9.3"
12
+
Original file line number Diff line number Diff line change 37
37
env :
38
38
CI : true
39
39
40
- - name : Run lint
41
- run : make lint
42
-
43
40
- name : Run style and unused
44
41
if : ${{ matrix.go_version == '1.20' }}
45
42
run : make style unused
Original file line number Diff line number Diff line change 32
32
run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
33
33
if : github.repository == 'prometheus/snmp_exporter'
34
34
- name : Lint
35
- uses : golangci/golangci-lint-action@v3.2 .0
35
+ uses : golangci/golangci-lint-action@v3.4 .0
36
36
with :
37
- version : v1.45.2
37
+ args : --verbose
38
+ version : v1.51.2
Original file line number Diff line number Diff line change 1
1
## Unreleased
2
2
3
- ## 1.15.0 / 2023-04-13
4
-
5
- ## What's Changed
3
+ ## 1.15.1 / 2023-05-3
6
4
7
5
* [ BUGFIX] Fixed promhttp.Instrument* handlers wrongly trying to attach exemplar to unsupported metrics (e.g. summary), \
8
6
causing panics #1253
9
7
10
- ## What's Changed
8
+ ## 1.15.0 / 2023-04-13
11
9
12
10
* [ BUGFIX] Fix issue with atomic variables on ppc64le #1171
13
11
* [ BUGFIX] Support for multiple samples within same metric #1181
Original file line number Diff line number Diff line change 11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
+ include .bingo/Variables.mk
14
15
include Makefile.common
15
16
16
17
.PHONY : test
@@ -26,3 +27,8 @@ generate-go-collector-test-files:
26
27
docker run --rm -v $(PWD ) :/workspace -w /workspace golang:$$GO_VERSION go run prometheus/gen_go_collector_metrics_set.go; \
27
28
mv -f go_collector_metrics* prometheus; \
28
29
done
30
+
31
+ .PHONY : fmt
32
+ fmt : common-format
33
+ $(GOIMPORTS ) -local github.com/prometheus/client_golang -w .
34
+
Original file line number Diff line number Diff line change 1
1
# Prometheus Go client library
2
2
3
- [ ![ CI] ( https://github.com/prometheus/client_golang/actions/workflows/ci .yml/badge.svg )] ( https://github.com/prometheus/client_golang/actions/workflows/ci.yml )
4
- [[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/prometheus/client_golang )] ( https://goreportcard.com/report/github.com/prometheus/client_golang )
3
+ [ ![ CI] ( https://github.com/prometheus/client_golang/actions/workflows/go .yml/badge.svg )] ( https://github.com/prometheus/client_golang/actions/workflows/ci.yml )
4
+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/prometheus/client_golang )] ( https://goreportcard.com/report/github.com/prometheus/client_golang )
5
5
[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/prometheus/client_golang.svg )] ( https://pkg.go.dev/github.com/prometheus/client_golang )
6
6
[ ![ Slack] ( https://img.shields.io/badge/join%20slack-%23prometheus--client_golang-brightgreen.svg )] ( https://slack.cncf.io/ )
7
7
@@ -79,7 +79,7 @@ To cut a minor version:
79
79
3 . Change the ` VERSION ` file.
80
80
4 . Update ` CHANGELOG ` (only user-impacting changes to mention).
81
81
5 . Create PR, and get it reviewed.
82
- 6 . Once merged, create a release with the ` release-<major>.<minor> ` tag on GitHub with the ` <version> / <date> ` title.
82
+ 6 . Once merged, create a release with the ` release-<major>.<minor> ` tag on GitHub with the ` <version> ` title.
83
83
7 . Announce on the prometheus-announce mailing list, slack and Twitter.
84
84
8 . Merge the release branch back to the ` main ` using the "merge without squashing" approach (!).
85
85
Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ import (
18
18
"sort"
19
19
"strings"
20
20
21
- "github.com/prometheus/client_golang/prometheus/internal"
22
-
23
21
"github.com/cespare/xxhash/v2"
24
22
dto "github.com/prometheus/client_model/go"
25
23
"github.com/prometheus/common/model"
26
24
"google.golang.org/protobuf/proto"
25
+
26
+ "github.com/prometheus/client_golang/prometheus/internal"
27
27
)
28
28
29
29
// Desc is the descriptor used by every Prometheus Metric. It is essentially
Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ import (
31
31
"github.com/efficientgo/core/errcapture"
32
32
"github.com/efficientgo/core/errors"
33
33
"github.com/oklog/run"
34
+ "github.com/prometheus/common/model"
35
+
34
36
"github.com/prometheus/client_golang/api"
35
37
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
36
38
"github.com/prometheus/client_golang/prometheus"
37
39
"github.com/prometheus/client_golang/tutorial/internal"
38
- "github.com/prometheus/common/model"
39
40
)
40
41
41
42
func main () {
Original file line number Diff line number Diff line change @@ -31,14 +31,15 @@ import (
31
31
"github.com/efficientgo/core/errcapture"
32
32
"github.com/efficientgo/core/errors"
33
33
"github.com/oklog/run"
34
+ "github.com/prometheus/common/model"
35
+
34
36
"github.com/prometheus/client_golang/api"
35
37
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
36
38
"github.com/prometheus/client_golang/prometheus"
37
39
"github.com/prometheus/client_golang/prometheus/collectors"
38
40
"github.com/prometheus/client_golang/prometheus/promauto"
39
41
"github.com/prometheus/client_golang/prometheus/promhttp"
40
42
"github.com/prometheus/client_golang/tutorial/internal"
41
- "github.com/prometheus/common/model"
42
43
)
43
44
44
45
func main () {
You can’t perform that action at this time.
0 commit comments