diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e65635c..26a9c8b8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - uses: ./.github/actions/setup_environment - run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1 - run: go test ./tsdb/ -test.tsdb-isolation=false + - run: GOARCH=386 go test ./cmd/prometheus - run: make -C documentation/examples/remote_storage - run: make -C documentation/examples - uses: ./.github/actions/check_proto diff --git a/CHANGELOG.md b/CHANGELOG.md index bb99ef410..0ecbc91e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 2.40.1 / 2022-11-09 + +* [BUGFIX] TSDB: Fix alignment for atomic int64 for 32 bit architecture. #11547 +* [BUGFIX] Scrape: Fix accept headers. #11552 + +## 2.40.0 / 2022-11-08 + +This release introduces an experimental, native way of representing and storing histograms. + +It can be enabled in Prometheus via `--enable-feature=native-histograms` to accept native histograms. +Enabling native histograms will also switch the preferred exposition format to protobuf. + +To instrument your application with native histograms, use the `main` branch of `client_golang` (this will change for the final release when v1.14.0 of client_golang will be out), and set the `NativeHistogramBucketFactor` in your `HistogramOpts` (`1.1` is a good starting point). +Your existing histograms won't switch to native histograms until `NativeHistogramBucketFactor` is set. + +* [FEATURE] Add **experimental** support for native histograms. Enable with the flag `--enable-feature=native-histograms`. #11447 +* [FEATURE] SD: Add service discovery for OVHcloud. #10802 +* [ENHANCEMENT] Kubernetes SD: Use protobuf encoding. #11353 +* [ENHANCEMENT] TSDB: Use golang.org/x/exp/slices for improved sorting speed. #11054 #11318 #11380 +* [ENHANCEMENT] Consul SD: Add enterprise admin partitions. Adds `__meta_consul_partition` label. Adds `partition` config in `consul_sd_config`. #11482 +* [BUGFIX] API: Fix API error codes for `/api/v1/labels` and `/api/v1/series`. #11356 + ## 2.39.1 / 2022-10-07 * [BUGFIX] Rules: Fix notifier relabel changing the labels on active alerts. #11427 diff --git a/VERSION b/VERSION index ec1282255..0e1a032a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.39.1 +2.40.1 diff --git a/scrape/scrape.go b/scrape/scrape.go index 8a664bf73..04375ab56 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -773,8 +773,8 @@ type targetScraper struct { var errBodySizeLimit = errors.New("body size limit exceeded") const ( - scrapeAcceptHeader = `encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` - scrapeAcceptHeaderWithProtobuf = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` + scrapeAcceptHeader = `application/openmetrics-text;version=1.0.0,application/openmetrics-text;version=0.0.1;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` + scrapeAcceptHeaderWithProtobuf = `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.8,application/openmetrics-text;version=0.0.1;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` ) var UserAgent = fmt.Sprintf("Prometheus/%s", version.Version) diff --git a/tsdb/head.go b/tsdb/head.go index 85baad680..be4b3b6a9 100644 --- a/tsdb/head.go +++ b/tsdb/head.go @@ -132,6 +132,9 @@ type HeadOptions struct { // https://pkg.go.dev/sync/atomic#pkg-note-BUG MaxExemplars atomic.Int64 + OutOfOrderTimeWindow atomic.Int64 + OutOfOrderCapMax atomic.Int64 + // EnableNativeHistograms enables the ingestion of native histograms. EnableNativeHistograms atomic.Bool @@ -141,8 +144,6 @@ type HeadOptions struct { ChunkPool chunkenc.Pool ChunkWriteBufferSize int ChunkWriteQueueSize int - OutOfOrderTimeWindow atomic.Int64 - OutOfOrderCapMax atomic.Int64 // StripeSize sets the number of entries in the hash map, it must be a power of 2. // A larger StripeSize will allocate more memory up-front, but will increase performance when handling a large number of series. diff --git a/web/ui/module/codemirror-promql/package.json b/web/ui/module/codemirror-promql/package.json index 88c171fe7..34f8e676d 100644 --- a/web/ui/module/codemirror-promql/package.json +++ b/web/ui/module/codemirror-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/codemirror-promql", - "version": "0.39.1", + "version": "0.40.1", "description": "a CodeMirror mode for the PromQL language", "types": "dist/esm/index.d.ts", "module": "dist/esm/index.js", @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md", "dependencies": { - "@prometheus-io/lezer-promql": "^0.39.1", + "@prometheus-io/lezer-promql": "^0.40.1", "lru-cache": "^6.0.0" }, "devDependencies": { diff --git a/web/ui/module/lezer-promql/package.json b/web/ui/module/lezer-promql/package.json index 5f3fc43fb..0edb55e0e 100644 --- a/web/ui/module/lezer-promql/package.json +++ b/web/ui/module/lezer-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/lezer-promql", - "version": "0.39.1", + "version": "0.40.1", "description": "lezer-based PromQL grammar", "main": "index.cjs", "type": "module", diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json index edbf019fb..ea1261c72 100644 --- a/web/ui/package-lock.json +++ b/web/ui/package-lock.json @@ -28,10 +28,10 @@ }, "module/codemirror-promql": { "name": "@prometheus-io/codemirror-promql", - "version": "0.39.1", + "version": "0.40.1", "license": "Apache-2.0", "dependencies": { - "@prometheus-io/lezer-promql": "^0.39.1", + "@prometheus-io/lezer-promql": "^0.40.1", "lru-cache": "^6.0.0" }, "devDependencies": { @@ -61,7 +61,7 @@ }, "module/lezer-promql": { "name": "@prometheus-io/lezer-promql", - "version": "0.39.1", + "version": "0.40.1", "license": "Apache-2.0", "devDependencies": { "@lezer/generator": "^1.1.1", @@ -20674,7 +20674,7 @@ }, "react-app": { "name": "@prometheus-io/app", - "version": "0.39.1", + "version": "0.40.1", "dependencies": { "@codemirror/autocomplete": "^6.2.0", "@codemirror/commands": "^6.1.2", @@ -20692,7 +20692,7 @@ "@lezer/lr": "^1.2.3", "@nexucis/fuzzy": "^0.4.1", "@nexucis/kvsearch": "^0.8.1", - "@prometheus-io/codemirror-promql": "^0.39.1", + "@prometheus-io/codemirror-promql": "^0.40.1", "bootstrap": "^4.6.2", "css.escape": "^1.5.1", "downshift": "^7.0.1", @@ -23321,7 +23321,7 @@ "@lezer/lr": "^1.2.3", "@nexucis/fuzzy": "^0.4.1", "@nexucis/kvsearch": "^0.8.1", - "@prometheus-io/codemirror-promql": "^0.39.1", + "@prometheus-io/codemirror-promql": "^0.40.1", "@testing-library/react-hooks": "^7.0.2", "@types/enzyme": "^3.10.12", "@types/flot": "0.0.32", @@ -23372,7 +23372,7 @@ "@lezer/common": "^1.0.1", "@lezer/highlight": "^1.1.2", "@lezer/lr": "^1.2.3", - "@prometheus-io/lezer-promql": "^0.39.1", + "@prometheus-io/lezer-promql": "^0.40.1", "@types/lru-cache": "^5.1.1", "isomorphic-fetch": "^3.0.0", "lru-cache": "^6.0.0", diff --git a/web/ui/react-app/package.json b/web/ui/react-app/package.json index cc9ed7e6f..f9463a691 100644 --- a/web/ui/react-app/package.json +++ b/web/ui/react-app/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/app", - "version": "0.39.1", + "version": "0.40.1", "private": true, "dependencies": { "@codemirror/autocomplete": "^6.2.0", @@ -19,7 +19,7 @@ "@lezer/common": "^1.0.1", "@nexucis/fuzzy": "^0.4.1", "@nexucis/kvsearch": "^0.8.1", - "@prometheus-io/codemirror-promql": "^0.39.1", + "@prometheus-io/codemirror-promql": "^0.40.1", "bootstrap": "^4.6.2", "css.escape": "^1.5.1", "downshift": "^7.0.1",