Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with upstream Prometheus #453

Merged
merged 32 commits into from Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f269077
Protect NewOOOCompactionHead from an unitialized wbl
jesusvazquez Feb 10, 2023
5c3f058
Add unit test and also protect truncateOOO
jesusvazquez Feb 10, 2023
95fc032
scrape: add benchmark for TargetsFromGroup
bboreham Feb 28, 2023
d740abf
model/labels: add Get and Range to Builder
bboreham Feb 28, 2023
11d019e
relabel: keep intermediate results in labels.Builder
bboreham Feb 28, 2023
c1dbc7b
scrape: make PopulateLabels work with Builder not Labels
bboreham Feb 28, 2023
5cfe759
scrape: make TargetsFromGroup work with Builder not []Label
bboreham Feb 28, 2023
f4fd9b0
scrape: re-use memory in TargetsFromGroup
bboreham Mar 7, 2023
36fc115
Remove unnecessary sort
damnever Mar 8, 2023
0c56e5d
Update our own dependencies, support proxy from env
roidelapluie Mar 8, 2023
57d8037
Bump Otel and dependencies from 1.11.2 to 1.14.0
bboreham Mar 8, 2023
3db98d7
Avoid unnecessary allocations in recording rule evaluation (#11812)
charleskorn Mar 8, 2023
be4a9c2
promql: disable some slow cases in TestConcurrentRangeQueries
bboreham Mar 8, 2023
1fd5979
Update tests
roidelapluie Mar 8, 2023
f2e3c9f
Merge pull request #12098 from roidelapluie/update-our-deps
roidelapluie Mar 8, 2023
9afbb23
Merge pull request #12100 from prometheus/bump-otel-1-14
roidelapluie Mar 8, 2023
435b500
remote: Convert to RecoverableError using errors.As (#12103)
aknuds1 Mar 8, 2023
5f3a02f
Update go dependencies
roidelapluie Mar 8, 2023
479fde5
Merge pull request #12106 from roidelapluie/deps243
roidelapluie Mar 9, 2023
bc9a82f
remote: Improve some comments (#12102)
aknuds1 Mar 9, 2023
d21229b
Merge pull request #12101 from bboreham/disable-slow-promql-tests
bboreham Mar 9, 2023
b96b89e
Merge pull request #12048 from bboreham/faster-targets
bboreham Mar 9, 2023
5583c77
Merge pull request #12095 from damnever/unnecessary-sort
roidelapluie Mar 9, 2023
b6d91e8
Release 2.43.0-rc.0
roidelapluie Mar 9, 2023
031fc2d
Address feedback
roidelapluie Mar 9, 2023
001ee26
Merge pull request #12114 from roidelapluie/new-release
roidelapluie Mar 9, 2023
bde3a04
build(deps): bump github.com/prometheus/prometheus from 0.37.0 to 0.4…
arukiidou Mar 11, 2023
3125e16
docs: Add signal information to getting started
hdost May 17, 2022
742979a
Merge pull request #10704 from hdost/feat/167-prometheus-docs
bwplotka Mar 12, 2023
865f474
Merge pull request #12122 from arukiidou/chore/prometheus-example-bump
roidelapluie Mar 12, 2023
6c008ec
Merge pull request #11962 from jesusvazquez/jvp/protect-new-compactio…
codesome Mar 13, 2023
7e74f73
Merge remote-tracking branch 'upstream/main' into sync-prom
codesome Mar 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,32 @@
# Changelog

## 2.43.0-rc.0 / 2023-03-09

We are working on some performance improvements in Prometheus, which are only
built into Prometheus when compiling it using the Go tag `stringlabels`
(therefore they are not shipped in the default binaries). It uses a data
structure for labels that uses a single string to hold all the label/values,
resulting in a smaller heap size and some speedups in most cases. We would like
to encourage users who are interested in these improvements to help us measure
the gains on their production architecture. Building Prometheus from source
with the `stringlabels` Go tag and providing feedback on its effectiveness in
their specific use cases would be incredibly helpful to us. #10991

* [FEATURE] Promtool: Add HTTP client configuration to query commands. #11487
* [FEATURE] Scrape: Add `include_scrape_configs` to include scrape configs from different files. #12019
* [FEATURE] HTTP client: Add `no_proxy` to exclude URLs from proxied requests. #12098
* [FEATURE] HTTP client: Add `proxy_from_enviroment` to read proxies from env variables. #12098
* [ENHANCEMENT] API: Add support for setting lookback delta per query via the API. #12088
* [ENHANCEMENT] API: Change HTTP status code from 503/422 to 499 if a request is canceled. #11897
* [ENHANCEMENT] Scrape: Allow exemplars for all metric types. #11984
* [ENHANCEMENT] TSDB: Add metrics for head chunks and WAL folders size. #12013
* [ENHANCEMENT] TSDB: Automatically remove incorrect snapshot with index that is ahead of WAL. #11859
* [ENHANCEMENT] TSDB: Improve Prometheus parser error outputs to be more comprehensible. #11682
* [ENHANCEMENT] UI: Scope `group by` labels to metric in autocompletion. #11914
* [BUGFIX] Scrape: Fix `prometheus_target_scrape_pool_target_limit` metric not set before reloading. #12002
* [BUGFIX] TSDB: Correctly update `prometheus_tsdb_head_chunks_removed_total` and `prometheus_tsdb_head_chunks` metrics when reading WAL. #11858
* [BUGFIX] TSDB: Use the correct unit (seconds) when recording out-of-order append deltas in the `prometheus_tsdb_sample_ooo_delta` metric. #12004

## 2.42.0 / 2023-01-31

This release comes with a bunch of feature coverage for native histograms and breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.42.0
2.43.0-rc.0
2 changes: 1 addition & 1 deletion cmd/prometheus/main.go
Expand Up @@ -33,6 +33,7 @@ import (
"syscall"
"time"

"github.com/alecthomas/kingpin/v2"
"github.com/alecthomas/units"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
Expand All @@ -47,7 +48,6 @@ import (
toolkit_web "github.com/prometheus/exporter-toolkit/web"
"go.uber.org/atomic"
"go.uber.org/automaxprocs/maxprocs"
"gopkg.in/alecthomas/kingpin.v2"
"k8s.io/klog"
klogv2 "k8s.io/klog/v2"

Expand Down
7 changes: 5 additions & 2 deletions cmd/promtool/main.go
Expand Up @@ -31,6 +31,7 @@ import (
"text/tabwriter"
"time"

"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/google/pprof/profile"
"github.com/prometheus/client_golang/api"
Expand All @@ -41,7 +42,6 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/common/version"
"github.com/prometheus/exporter-toolkit/web"
"gopkg.in/alecthomas/kingpin.v2"
"gopkg.in/yaml.v2"

dto "github.com/prometheus/client_model/go"
Expand Down Expand Up @@ -1261,8 +1261,11 @@ func checkTargetGroupsForAlertmanager(targetGroups []*targetgroup.Group, amcfg *
}

func checkTargetGroupsForScrapeConfig(targetGroups []*targetgroup.Group, scfg *config.ScrapeConfig) error {
var targets []*scrape.Target
lb := labels.NewBuilder(labels.EmptyLabels())
for _, tg := range targetGroups {
_, failures := scrape.TargetsFromGroup(tg, scfg, false)
var failures []error
targets, failures = scrape.TargetsFromGroup(tg, scfg, false, targets, lb)
if len(failures) > 0 {
first := failures[0]
return first
Expand Down
10 changes: 5 additions & 5 deletions cmd/promtool/sd.go
Expand Up @@ -115,22 +115,22 @@ outerLoop:

func getSDCheckResult(targetGroups []*targetgroup.Group, scrapeConfig *config.ScrapeConfig, noDefaultScrapePort bool) []sdCheckResult {
sdCheckResults := []sdCheckResult{}
lb := labels.NewBuilder(labels.EmptyLabels())
for _, targetGroup := range targetGroups {
for _, target := range targetGroup.Targets {
labelSlice := make([]labels.Label, 0, len(target)+len(targetGroup.Labels))
lb.Reset(labels.EmptyLabels())

for name, value := range target {
labelSlice = append(labelSlice, labels.Label{Name: string(name), Value: string(value)})
lb.Set(string(name), string(value))
}

for name, value := range targetGroup.Labels {
if _, ok := target[name]; !ok {
labelSlice = append(labelSlice, labels.Label{Name: string(name), Value: string(value)})
lb.Set(string(name), string(value))
}
}

targetLabels := labels.New(labelSlice...)
res, orig, err := scrape.PopulateLabels(targetLabels, scrapeConfig, noDefaultScrapePort)
res, orig, err := scrape.PopulateLabels(lb, scrapeConfig, noDefaultScrapePort)
result := sdCheckResult{
DiscoveredLabels: orig,
Labels: res,
Expand Down