Skip to content

Commit d698336

Browse files
committed
Merge branch 'master' into beorn7/histogram
2 parents 08104a0 + 17e98a7 commit d698336

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2981
-431
lines changed

.circleci/config.yml

Lines changed: 45 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
---
21
version: 2.1
3-
42
orbs:
53
go: circleci/[email protected]
6-
4+
prometheus: prometheus/[email protected]
75
jobs:
86
test:
97
parameters:
108
go_version:
119
type: string
12-
run_style:
10+
run_style_and_unused:
1311
type: boolean
1412
default: false
1513
run_lint:
@@ -19,56 +17,52 @@ jobs:
1917
type: boolean
2018
default: true
2119
docker:
22-
- image: circleci/golang:<< parameters.go_version >>
20+
- image: circleci/golang:<< parameters.go_version >>
2321
working_directory: /go/src/github.com/prometheus/client_golang
2422
steps:
25-
- checkout
26-
- when:
27-
condition: << parameters.use_gomod_cache >>
28-
steps:
29-
- go/load-cache:
30-
key: v1-go<< parameters.go_version >>
31-
- run: make check_license unused test
32-
- when:
33-
condition: << parameters.run_lint >>
34-
steps:
35-
- run: make lint
36-
- when:
37-
condition: << parameters.run_style >>
38-
steps:
39-
- run: make style
40-
- when:
41-
condition: << parameters.use_gomod_cache >>
42-
steps:
43-
- go/save-cache:
44-
key: v1-go<< parameters.go_version >>
45-
- store_test_results:
46-
path: test-results
47-
23+
- checkout
24+
- when:
25+
condition: << parameters.use_gomod_cache >>
26+
steps:
27+
- go/load-cache:
28+
key: v1-go<< parameters.go_version >>
29+
- run: make check_license test
30+
- when:
31+
condition: << parameters.run_lint >>
32+
steps:
33+
- run: make lint
34+
- when:
35+
condition: << parameters.run_style_and_unused >>
36+
steps:
37+
- run: make style unused
38+
- when:
39+
condition: << parameters.use_gomod_cache >>
40+
steps:
41+
- go/save-cache:
42+
key: v1-go<< parameters.go_version >>
43+
- store_test_results:
44+
path: test-results
4845
workflows:
4946
version: 2
5047
client_golang:
5148
jobs:
52-
# Refer to README.md for the currently supported versions.
53-
- test:
54-
name: go-1-9
55-
go_version: "1.9"
56-
use_gomod_cache: false
57-
- test:
58-
name: go-1-10
59-
go_version: "1.10"
60-
use_gomod_cache: false
61-
- test:
62-
name: go-1-11
63-
go_version: "1.11"
64-
run_lint: true
65-
- test:
66-
name: go-1-12
67-
go_version: "1.12"
68-
run_lint: true
69-
- test:
70-
name: go-1-13
71-
go_version: "1.13"
72-
run_lint: true
73-
# Style is only checked against the latest supported Go version.
74-
run_style: true
49+
# Refer to README.md for the currently supported versions.
50+
- test:
51+
name: go-1-13
52+
go_version: "1.13"
53+
run_lint: true
54+
- test:
55+
name: go-1-14
56+
go_version: "1.14"
57+
run_lint: true
58+
- test:
59+
name: go-1-15
60+
go_version: "1.15"
61+
run_lint: true
62+
- test:
63+
name: go-1-16
64+
go_version: "1.16"
65+
run_lint: true
66+
# Style and unused/missing packages are only checked against
67+
# the latest supported Go version.
68+
run_style_and_unused: true

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
## 1.10.0 / 2021-03-18
2+
3+
* [CHANGE] Minimum required Go version is now 1.13.
4+
* [CHANGE] API client: Add matchers to `LabelNames` and `LabesValues`. #828
5+
* [FEATURE] API client: Add buildinfo call. #841
6+
* [BUGFIX] Fix build on riscv64. #833
7+
8+
## 1.9.0 / 2020-12-17
9+
10+
* [FEATURE] `NewPidFileFn` helper to create process collectors for processes whose PID is read from a file. #804
11+
* [BUGFIX] promhttp: Prevent endless loop in `InstrumentHandler...` middlewares with invalid metric or label names. #823
12+
13+
## 1.8.0 / 2020-10-15
14+
15+
* [CHANGE] API client: Use `time.Time` rather than `string` for timestamps in `RuntimeinfoResult`. #777
16+
* [FEATURE] Export `MetricVec` to facilitate implementation of vectors of custom `Metric` types. #803
17+
* [FEATURE API client: Support `/status/tsdb` endpoint. #773
18+
* [ENHANCEMENT] API client: Enable GET fallback on status code 501. #802
19+
* [ENHANCEMENT] Remove `Metric` references after reslicing to free up more memory. #784
20+
21+
## 1.7.1 / 2020-06-23
22+
23+
* [BUGFIX] API client: Actually propagate start/end parameters of `LabelNames` and `LabelValues`. #771
24+
25+
## 1.7.0 / 2020-06-17
26+
27+
* [CHANGE] API client: Add start/end parameters to `LabelNames` and `LabelValues`. #767
28+
* [FEATURE] testutil: Add `GatherAndCount` and enable filtering in `CollectAndCount` #753
29+
* [FEATURE] API client: Add support for `status` and `runtimeinfo` endpoints. #755
30+
* [ENHANCEMENT] Wrapping `nil` with a `WrapRegistererWith...` function creates a no-op `Registerer`. #764
31+
* [ENHANCEMENT] promlint: Allow Kelvin as a base unit for cases like color temperature. #761
32+
* [BUGFIX] push: Properly handle empty job and label values. #752
33+
34+
## 1.6.0 / 2020-04-28
35+
36+
* [FEATURE] testutil: Add lint checks for metrics, including a sub-package `promlint` to expose the linter engine for external usage. #739 #743
37+
* [ENHANCEMENT] API client: Improve error messages. #731
38+
* [BUGFIX] process collector: Fix `process_resident_memory_bytes` on 32bit MS Windows. #734
39+
40+
## 1.5.1 / 2020-03-14
41+
42+
* [BUGFIX] promhttp: Remove another superfluous `WriteHeader` call. #726
43+
144
## 1.5.0 / 2020-03-03
245

346
* [FEATURE] promauto: Add a factory to allow automatic registration with a local registry. #713

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Prometheus Community Code of Conduct
2+
3+
Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313

1414
include Makefile.common
1515

16-
# http.CloseNotifier is deprecated but we don't want to remove support
17-
# from client_golang to not break anybody still using it.
18-
STATICCHECK_IGNORE = \
19-
github.com/prometheus/client_golang/prometheus/promhttp/delegator*.go:SA1019 \
20-
github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go:SA1019 \
21-
github.com/prometheus/client_golang/prometheus/http.go:SA1019
22-
2316
.PHONY: test
2417
test: deps common-test
2518

Makefile.common

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ ifneq ($(shell which gotestsum),)
7878
endif
7979
endif
8080

81-
PROMU_VERSION ?= 0.5.0
81+
PROMU_VERSION ?= 0.11.1
8282
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
8383

8484
GOLANGCI_LINT :=
8585
GOLANGCI_LINT_OPTS ?=
86-
GOLANGCI_LINT_VERSION ?= v1.18.0
86+
GOLANGCI_LINT_VERSION ?= v1.36.0
8787
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
8888
# windows isn't included here because of the path separator being different.
8989
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
@@ -150,6 +150,17 @@ else
150150
$(GO) get $(GOOPTS) -t ./...
151151
endif
152152

153+
.PHONY: update-go-deps
154+
update-go-deps:
155+
@echo ">> updating Go dependencies"
156+
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
157+
$(GO) get $$m; \
158+
done
159+
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
160+
ifneq (,$(wildcard vendor))
161+
GO111MODULE=$(GO111MODULE) $(GO) mod vendor
162+
endif
163+
153164
.PHONY: common-test-short
154165
common-test-short: $(GOTEST_DIR)
155166
@echo ">> running short tests"
@@ -234,10 +245,12 @@ common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
234245
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
235246
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)"
236247

248+
DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
237249
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
238250
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
239251
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
240252
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
253+
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
241254

242255
.PHONY: common-docker-manifest
243256
common-docker-manifest:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is the [Go](http://golang.org) client library for
99
instrumenting application code, and one for creating clients that talk to the
1010
Prometheus HTTP API.
1111

12-
__This library requires Go1.9 or later.__ The minimum required patch releases for older Go versions are Go1.9.7 and Go1.10.3.
12+
__This library requires Go1.13 or later.__
1313

1414
## Important note about releases and stability
1515

SECURITY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reporting a security issue
2+
3+
The Prometheus security policy, including how to report vulnerabilities, can be
4+
found here:
5+
6+
https://prometheus.io/docs/operating/security/

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.0
1+
1.10.0

0 commit comments

Comments
 (0)