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 upstream up to 5fdec3140188808bb9c2bf48e94b8533dbf75ac5 #818

Merged
merged 38 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
aa144b7
Handle custom buckets in WAL and WBL
carrieedwards Oct 16, 2024
6d413fa
Use histogram records for custom value handling
carrieedwards Oct 28, 2024
cfcd515
Remove references to custom values record
carrieedwards Oct 28, 2024
37df50a
Attempt for record type
carrieedwards Nov 13, 2024
454f6d3
Add separate handling for histograms and custom bucket histograms
carrieedwards Nov 14, 2024
6684344
Rename old histogram record type, use old names for new records
carrieedwards Nov 21, 2024
f8a3976
Update WAL doc to include native histogram encodings
carrieedwards Nov 26, 2024
6b44c14
Fix comment and histogram record string
carrieedwards Nov 27, 2024
45944c1
Extend tsdb agent tests with custom bucket histograms
carrieedwards Nov 27, 2024
a046417
Use new record type only for NHCB
carrieedwards Dec 6, 2024
1933ccc
Fix test
carrieedwards Dec 6, 2024
efdd088
Merge branch 'main' into cedwards/nhcb-wal-wbl
krajorama Dec 10, 2024
b94c87b
fix(test): TestCheckpoint segment size too low
krajorama Dec 10, 2024
8f572fe
fix(lint): linter errors
krajorama Dec 10, 2024
07276ae
fix(test): if we are dereferencing a slice we should check its len
krajorama Dec 10, 2024
a325ff1
fix(test): do not run automatic WAL truncate during test
krajorama Dec 10, 2024
d64d1c4
Benchmark encoding classic and nhcb
krajorama Dec 12, 2024
fdb1516
Fix lint errors
krajorama Dec 12, 2024
cf36792
Fix unused import
krajorama Dec 12, 2024
df88de5
Fix lint for real
krajorama Dec 12, 2024
e630ffd
TSDB: extend BenchmarkMemPostings_PostingsForLabelMatching to check m…
bboreham Jul 26, 2024
1b22242
TSDB BenchmarkMerge: run fewer sizes
bboreham Jul 26, 2024
0a8779f
TSDB: Make mergedPostings generic
bboreham Jul 26, 2024
cfa32f3
TSDB: Move merge of head postings into index
bboreham Jul 26, 2024
1508149
Update benchmark test and comment
carrieedwards Dec 27, 2024
4cbd9ff
docs: update required go version in readme to 1.22 (#15447)
tjhop Dec 30, 2024
2dfb4fd
Merge pull request #15723 from machine424/eng-clos
bboreham Dec 30, 2024
f37b5ad
OTLP receiver: Optimize by initializing regexps at program start (#15…
aknuds1 Dec 31, 2024
096e2aa
Merge pull request #14518 from bboreham/faster-listpostings-merge
bboreham Jan 2, 2025
a7ccc8e
record_test.go: avoid captures, simply return test refs
krajorama Jan 2, 2025
1e420ef
Merge branch 'main' into cedwards/nhcb-wal-wbl
krajorama Jan 2, 2025
cfcb00a
perf(nhcbparse): unroll recursion (#15776)
krajorama Jan 2, 2025
a6947a0
Merge 3.1 into main (#15775)
bboreham Jan 3, 2025
4f67a38
template: Use cases.Title instead of deprecated strings.Title (#15721)
aknuds1 Jan 3, 2025
a441ad7
Merge pull request #15467 from prometheus/cedwards/nhcb-wal-wbl
bwplotka Jan 3, 2025
5609419
[Docs] Note that scrape_timeout cannot be greater than scrape_interva…
heliapb Jan 6, 2025
5fdec31
otlp/translator: Use separate function for metric names with UTF8 cha…
ArthurSens Jan 6, 2025
d1ab530
Merge commit '5fdec3140188808bb9c2bf48e94b8533dbf75ac5' into juliendu…
julienduchesne Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,53 @@

## unreleased

* [CHANGE] Notifier: Increment the prometheus_notifications_errors_total metric by the number of affected alerts rather than by one per batch of affected alerts. #15428
* [ENHANCEMENT] OTLP receiver: Convert also metric metadata. #15416
* [BUGFIX] OTLP receiver: Allow colons in non-standard units. #15710
## 3.1.0 / 2025-01-02

* [SECURITY] upgrade golang.org/x/crypto to address reported CVE-2024-45337. #15691
* [CHANGE] Notifier: Increment prometheus_notifications_errors_total by the number of affected alerts rather than per batch. #15428
* [CHANGE] API: list rules field "groupNextToken:omitempty" renamed to "groupNextToken". #15400
* [ENHANCEMENT] OTLP translate: keep identifying attributes in target_info. #15448
* [ENHANCEMENT] Paginate rule groups, add infinite scroll to rules within groups. #15677
* [ENHANCEMENT] TSDB: Improve calculation of space used by labels. #13880
* [ENHANCEMENT] Rules: new metric rule_group_last_rule_duration_sum_seconds. #15672
* [ENHANCEMENT] Observability: Export 'go_sync_mutex_wait_total_seconds_total' metric. #15339
* [ENHANCEMEN] Remote-Write: optionally use a DNS resolver that picks a random IP. #15329
* [PERF] Optimize `l=~".+"` matcher. #15474, #15684
* [PERF] TSDB: Cache all symbols for compaction . #15455
* [PERF] TSDB: MemPostings: keep a map of label values slices. #15426
* [PERF] Remote-Write: Remove interning hook. #15456
* [PERF] Scrape: optimize string manipulation for experimental native histograms with custom buckets. #15453
* [PERF] TSDB: reduce memory allocations. #15465, #15427
* [PERF] Storage: Implement limit in mergeGenericQuerier. #14489
* [PERF] TSDB: Optimize inverse matching. #14144
* [PERF] Regex: use stack memory for lowercase copy of string. #15210
* [PERF] TSDB: When deleting from postings index, pause to unlock and let readers read. #15242
* [BUGFIX] Main: Avoid possible segfault at exit. (#15724)
* [BUGFIX] Rules: Do not run rules concurrently if uncertain about dependencies. #15560
* [BUGFIX] PromQL: Adds test for `absent`, `absent_over_time` and `deriv` func with histograms. #15667
* [BUGFIX] PromQL: Fix various bugs related to quoting UTF-8 characters. #15531
* [BUGFIX] Scrape: fix nil panic after scrape loop reload. #15563
* [BUGFIX] Remote-write: fix panic on repeated log message. #15562
* [BUGFIX] Scrape: reload would ignore always_scrape_classic_histograms and convert_classic_histograms_to_nhcb configs. #15489
* [BUGFIX] TSDB: fix data corruption in experimental native histograms. #15482
* [BUGFIX] PromQL: Ignore histograms in all time related functions. #15479
* [BUGFIX] OTLP receiver: Convert metric metadata. #15416
* [BUGFIX] PromQL: Fix `resets` function for histograms. #15527
* [BUGFIX] PromQL: Fix behaviour of `changes()` for mix of histograms and floats. #15469
* [BUGFIX] PromQL: Fix behaviour of some aggregations with histograms. #15432
* [BUGFIX] allow quoted exemplar keys in openmetrics text format. #15260
* [BUGFIX] TSDB: fixes for rare conditions when loading write-behind-log (WBL). #15380
* [BUGFIX] `round()` function did not remove `__name__` label. #15250
* [BUGFIX] Promtool: analyze block shows metric name with 0 cardinality. #15438
* [BUGFIX] PromQL: Fix `count_values` for histograms. #15422
* [BUGFIX] PromQL: fix issues with comparison binary operations with `bool` modifier and native histograms. #15413
* [BUGFIX] PromQL: fix incorrect "native histogram ignored in aggregation" annotations. #15414
* [BUGFIX] PromQL: Corrects the behaviour of some operator and aggregators with Native Histograms. #15245
* [BUGFIX] TSDB: Always return unknown hint for first sample in non-gauge histogram chunk. #15343
* [BUGFIX] PromQL: Clamp functions: Ignore any points with native histograms. #15169
* [BUGFIX] TSDB: Fix race on stale values in headAppender. #15322
* [BUGFIX] UI: Fix selector / series formatting for empty metric names. #15340
* [BUGFIX] OTLP receiver: Allow colons in non-standard units. #15710

## 3.0.1 / 2024-11-28

Expand Down Expand Up @@ -47,14 +91,14 @@ This release includes new features such as a brand new UI and UTF-8 support enab
* [CHANGE] PromQL: Range selectors and the lookback delta are now left-open, i.e. a sample coinciding with the lower time limit is excluded rather than included. #13904
* [CHANGE] Kubernetes SD: Remove support for `discovery.k8s.io/v1beta1` API version of EndpointSlice. This version is no longer served as of Kubernetes v1.25. #14365
* [CHANGE] Kubernetes SD: Remove support for `networking.k8s.io/v1beta1` API version of Ingress. This version is no longer served as of Kubernetes v1.22. #14365
* [CHANGE] UTF-8: Enable UTF-8 support by default. Prometheus now allows all UTF-8 characters in metric and label names. The corresponding `utf8-name` feature flag has been removed. #14705
* [CHANGE] UTF-8: Enable UTF-8 support by default. Prometheus now allows all UTF-8 characters in metric and label names. The corresponding `utf8-name` feature flag has been removed. #14705, #15258
* [CHANGE] Console: Remove example files for the console feature. Users can continue using the console feature by supplying their own JavaScript and templates. #14807
* [CHANGE] SD: Enable the new service discovery manager by default. This SD manager does not restart unchanged discoveries upon reloading. This makes reloads faster and reduces pressure on service discoveries' sources. The corresponding `new-service-discovery-manager` feature flag has been removed. #14770
* [CHANGE] Agent mode has been promoted to stable. The feature flag `agent` has been removed. To run Prometheus in Agent mode, use the new `--agent` cmdline arg instead. #14747
* [CHANGE] Remove deprecated `remote-write-receiver`,`promql-at-modifier`, and `promql-negative-offset` feature flags. #13456, #14526
* [CHANGE] Remove deprecated `storage.tsdb.allow-overlapping-blocks`, `alertmanager.timeout`, and `storage.tsdb.retention` flags. #14640, #14643
* [FEATURE] OTLP receiver: Ability to skip UTF-8 normalization using `otlp.translation_strategy = NoUTF8EscapingWithSuffixes` configuration option. #15384
* [FEATURE] Support config reload automatically - feature flag `auto-reload-config`. #14769
* [FEATURE] Support config reload automatically - feature flag `auto-reload-config`. #14769, #15011
* [ENHANCEMENT] Scraping, rules: handle targets reappearing, or rules moving group, when out-of-order is enabled. #14710
* [ENHANCEMENT] Tools: add debug printouts to promtool rules unit testing #15196
* [ENHANCEMENT] Scraping: support Created-Timestamp feature on native histograms. #14694
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Prometheus will now be reachable at <http://localhost:9090/>.

To build Prometheus from source code, You need:

* Go [version 1.17 or greater](https://golang.org/doc/install).
* Go [version 1.22 or greater](https://golang.org/doc/install).
* NodeJS [version 16 or greater](https://nodejs.org/).
* npm [version 7 or greater](https://www.npmjs.com/).

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.1.0
2 changes: 2 additions & 0 deletions docs/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ global:
[ scrape_interval: <duration> | default = 1m ]

# How long until a scrape request times out.
# It cannot be greater than the scrape interval.
[ scrape_timeout: <duration> | default = 10s ]

# The protocols to negotiate during a scrape with the client.
Expand Down Expand Up @@ -221,6 +222,7 @@ job_name: <job_name>
[ scrape_interval: <duration> | default = <global_config.scrape_interval> ]

# Per-scrape timeout when scraping this job.
# It cannot be greater than the scrape interval.
[ scrape_timeout: <duration> | default = <global_config.scrape_timeout> ]

# The protocols to negotiate during a scrape with the client.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/template_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ versions.

| Name | Arguments | Returns | Notes |
| ------------- | ------------- | ------- | ----------- |
| title | string | string | [strings.Title](https://golang.org/pkg/strings/#Title), capitalises first character of each word.|
| title | string | string | [cases.Title](https://pkg.go.dev/golang.org/x/text/cases#Title), capitalises first character of each word.|
| toUpper | string | string | [strings.ToUpper](https://golang.org/pkg/strings/#ToUpper), converts all characters to upper case.|
| toLower | string | string | [strings.ToLower](https://golang.org/pkg/strings/#ToLower), converts all characters to lower case.|
| stripPort | string | string | [net.SplitHostPort](https://pkg.go.dev/net#SplitHostPort), splits string into host and port, then returns only host.|
Expand Down
90 changes: 46 additions & 44 deletions model/textparse/nhcbparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,61 +177,63 @@ func (p *NHCBParser) CreatedTimestamp() *int64 {
}

func (p *NHCBParser) Next() (Entry, error) {
if p.state == stateEmitting {
p.state = stateStart
if p.entry == EntrySeries {
isNHCB := p.handleClassicHistogramSeries(p.lset)
if isNHCB && !p.keepClassicHistograms {
// Do not return the classic histogram series if it was converted to NHCB and we are not keeping classic histograms.
return p.Next()
for {
if p.state == stateEmitting {
p.state = stateStart
if p.entry == EntrySeries {
isNHCB := p.handleClassicHistogramSeries(p.lset)
if isNHCB && !p.keepClassicHistograms {
// Do not return the classic histogram series if it was converted to NHCB and we are not keeping classic histograms.
continue
}
}
return p.entry, p.err
}
return p.entry, p.err
}

p.entry, p.err = p.parser.Next()
if p.err != nil {
if errors.Is(p.err, io.EOF) && p.processNHCB() {
return EntryHistogram, nil
}
return EntryInvalid, p.err
}
switch p.entry {
case EntrySeries:
p.bytes, p.ts, p.value = p.parser.Series()
p.metricString = p.parser.Metric(&p.lset)
// Check the label set to see if we can continue or need to emit the NHCB.
var isNHCB bool
if p.compareLabels() {
// Labels differ. Check if we can emit the NHCB.
if p.processNHCB() {
p.entry, p.err = p.parser.Next()
if p.err != nil {
if errors.Is(p.err, io.EOF) && p.processNHCB() {
return EntryHistogram, nil
}
isNHCB = p.handleClassicHistogramSeries(p.lset)
} else {
// Labels are the same. Check if after an exponential histogram.
if p.lastHistogramExponential {
isNHCB = false
} else {
return EntryInvalid, p.err
}
switch p.entry {
case EntrySeries:
p.bytes, p.ts, p.value = p.parser.Series()
p.metricString = p.parser.Metric(&p.lset)
// Check the label set to see if we can continue or need to emit the NHCB.
var isNHCB bool
if p.compareLabels() {
// Labels differ. Check if we can emit the NHCB.
if p.processNHCB() {
return EntryHistogram, nil
}
isNHCB = p.handleClassicHistogramSeries(p.lset)
} else {
// Labels are the same. Check if after an exponential histogram.
if p.lastHistogramExponential {
isNHCB = false
} else {
isNHCB = p.handleClassicHistogramSeries(p.lset)
}
}
if isNHCB && !p.keepClassicHistograms {
// Do not return the classic histogram series if it was converted to NHCB and we are not keeping classic histograms.
continue
}
return p.entry, p.err
case EntryHistogram:
p.bytes, p.ts, p.h, p.fh = p.parser.Histogram()
p.metricString = p.parser.Metric(&p.lset)
p.storeExponentialLabels()
case EntryType:
p.bName, p.typ = p.parser.Type()
}
if isNHCB && !p.keepClassicHistograms {
// Do not return the classic histogram series if it was converted to NHCB and we are not keeping classic histograms.
return p.Next()
if p.processNHCB() {
return EntryHistogram, nil
}
return p.entry, p.err
case EntryHistogram:
p.bytes, p.ts, p.h, p.fh = p.parser.Histogram()
p.metricString = p.parser.Metric(&p.lset)
p.storeExponentialLabels()
case EntryType:
p.bName, p.typ = p.parser.Type()
}
if p.processNHCB() {
return EntryHistogram, nil
}
return p.entry, p.err
}

// Return true if labels have changed and we should emit the NHCB.
Expand Down
106 changes: 0 additions & 106 deletions storage/remote/otlptranslator/prometheus/helpers_from_stdlib.go

This file was deleted.

Loading
Loading