Marco Pracucci
b0c6c0a2a3
Merge pull request #580 from grafana/sync-upstream
...
Sync upstream Prometheus
2024-01-05 15:23:07 +01:00
Marco Pracucci
397179e394
Changed approxBytesPerEntry after upgrading to golang 1.21
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-05 13:17:18 +01:00
Marco Pracucci
7c8e9a2a76
Fix linter issues
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-05 13:12:23 +01:00
Marco Pracucci
ca7dbc4342
Upgrade linter running in CI
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-05 12:39:05 +01:00
Marco Pracucci
96296c3675
Upgrade golang version used in tests
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-05 12:34:49 +01:00
Marco Pracucci
f955b69b3b
Merge remote-tracking branch 'remotes/prometheus/main' into sync-upstream
2024-01-05 11:38:57 +01:00
Bryan Boreham
6d2e0a7424
Merge pull request #13335 from nmdanny/patch-1
...
remote: consider storage.ErrTooOldSample as non-retryable by returning 400
2024-01-04 17:35:26 +00:00
Paschalis Tsilias
bb9503c12c
Bump client_golang to v1.18.0 ( #13373 )
...
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
2024-01-04 14:19:19 +01:00
Bartlomiej Plotka
cdc5184f0c
Merge pull request #13354 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/client_golang-1.18.0
...
build(deps): bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /documentation/examples/remote_storage
2024-01-04 09:40:44 +01:00
Patrick Oyarzun
ae280910a1
Merge pull request #578 from grafana/logiraptor/fix-set-matches-for-regexp-literal
...
Fix regexp set matches for literal matchers
2024-01-03 05:59:24 -06:00
Patrick Oyarzun
ec7344facd
Add benchmark to show change
2024-01-02 15:28:30 -06:00
Patrick Oyarzun
84841a4c4e
Fix regexp set matches for literal matchers
...
I was surprised to find out that posting lookups for `foo=~"(bar|bar)"`
are faster than `foo=~"bar"`. It turns out we introduced a performance
regression in https://github.com/grafana/mimir-prometheus/pull/463 .
When we added the `optimizeAlternatingLiterals` function, we subtly
broke one edge case. A regexp matcher which matches a single literal,
like `foo=~"bar"` used to return `bar` from `SetMatches()`, but
currently does not. The implication is that the tsdb will first do a
LabelValues call to get all values for `foo`, then match them against
the regexp `bar`. This PR restores the previous behavior which is able
to directly lookup postings for `foo="bar"` instead.
2024-01-02 13:42:01 -06:00
dependabot[bot]
153632063f
build(deps): bump github.com/prometheus/client_golang
...
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang ) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases )
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0 )
---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 23:13:46 +00:00
Bryan Boreham
756202aa4f
Merge pull request #13262 from bboreham/agent-serieshashmap
...
agent: make the global hash lookup table smaller
2023-12-31 11:27:17 +00:00
Bryan Boreham
bad3f23f23
agent: add BenchmarkCreateSeries
...
Based on the one in tsdb/head_test.go.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-31 10:23:43 +00:00
Bryan Boreham
e64d7d8928
agent: make the global hash lookup table smaller
...
This is the same change made in #13040 , plus subsequent improvements,
applied to agent-mode code.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-31 10:23:43 +00:00
Bryan Boreham
1b74378a4c
Merge pull request #13344 from prometheus/revert-13293
...
Revert "Adding small test update for temp dir using t.TempDir (#13293 )"
2023-12-30 22:11:48 +00:00
Bryan Boreham
252031c86f
Revert "Adding small test update for temp dir using t.TempDir ( #13293 )"
...
This reverts commit 2ddb3596ef
.
Various tests are failing in CI after this change; reverting to free up
other work.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-30 19:17:30 +00:00
Mile Druzijanic
2ddb3596ef
Adding small test update for temp dir using t.TempDir ( #13293 )
...
* Adding small test update for temp dir using t.TempDir
Signed-off-by: Mile Druzijanic <miledruz@gmail.com>
Signed-off-by: Mile Druzijanic <zedsprogramms@gmail.com>
* removing not required cleanup
Signed-off-by: Mile Druzijanic <zedsprogramms@gmail.com>
---------
Signed-off-by: Mile Druzijanic <miledruz@gmail.com>
Signed-off-by: Mile Druzijanic <zedsprogramms@gmail.com>
2023-12-28 21:49:57 +01:00
Daniel Kerbel
b2185d96af
Consider storage.ErrTooOldSample as non-retryable
...
Signed-off-by: Daniel Kerbel <nmdanny@gmail.com>
2023-12-26 18:44:39 +02:00
Björn Rabenstein
6b8e945388
Merge pull request #13289 from fpetkovski/fix-histogram-reuse
...
Fix reusing float histograms
2023-12-25 22:45:03 +01:00
Filip Petkovski
0e1ae1d1ca
Add comment
...
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-25 11:41:07 +01:00
Filip Petkovski
35f9620cd1
Expand benchmark
...
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-25 11:30:29 +01:00
Filip Petkovski
5df3820c7a
Copy last histogram point
...
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-25 11:20:51 +01:00
Julien Pivotto
0763ec841b
Merge pull request #13313 from kalpadiptyaroy/fix-quality-value-accept-header
...
bug: Fix quality value in accept header
2023-12-21 11:40:30 +01:00
Kumar Kalpadiptya Roy
b012366c33
Issue #13268 : fix quality value in accept header
...
Signed-off-by: Kumar Kalpadiptya Roy <kalpadiptya.roy@outlook.com>
2023-12-21 10:33:05 +05:30
Marco Pracucci
12d2c1038b
Merge pull request #577 from grafana/fix-regexp-optimization-with-double-capture-group
...
Fix FastRegexMatcher to skip nested capture groups
2023-12-20 13:57:36 +01:00
Bryan Boreham
75fc8a1535
Merge pull request #13167 from bboreham/simplify-TargetsActive
...
scrape: simplify TargetsActive function
2023-12-20 12:27:50 +00:00
Marco Pracucci
b894301c3e
Fix FastRegexMatcher to skip nested capture groups
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-12-20 13:00:59 +01:00
Bryan Boreham
4d44da2deb
Merge pull request #13176 from bboreham/move-metrictype
...
Move metric type definitions to common/model
2023-12-20 09:30:57 +00:00
Bryan Boreham
4ca0d57bb9
Merge pull request #13308 from bboreham/validate-relabel
...
relabel: improve logic for target labels
2023-12-20 09:30:26 +00:00
Bryan Boreham
096ec12912
Update comment about metadata in types.proto
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-19 18:56:54 +00:00
Bryan Boreham
c83e1fc574
textparse: remove MetricType alias
...
No backwards-compatibility; make a clean break.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-19 18:56:54 +00:00
Bryan Boreham
8065bef172
Move metric type definitions to common/model
...
They are used in multiple repos, so common is a better place for them.
Several packages now don't depend on `model/textparse`, e.g.
`storage/remote`.
Also remove `metadata` struct from `api.go`, since it was identical to
a struct in the `metadata` package.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-19 18:56:54 +00:00
Bryan Boreham
99c17b4319
Merge pull request #13177 from bboreham/less-madness
...
scrape: consistent function names for metadata
2023-12-19 17:51:52 +00:00
Bryan Boreham
0289dd6157
relabel: blank replacement deletes label post-regexp
...
If `cfg.TargetLabel` is a template like `$1`, it won't match any labels,
so no point calling `lb.Del` with it.
Similarly if `target` is not a valid label name, it won't match any
labels, so don't call with that either.
The intention seems to have been that a blank _value_ would delete the
target, so change that code to use `target` instead of `cfg.TargetLabel`.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-18 16:39:01 +00:00
Bryan Boreham
000182e4b8
relabel: check validity of all test cases
...
Thought this would be a nice check on the `Validate()` function, but
some of the test cases needed tweaking to pass.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-18 15:03:24 +00:00
Bryan Boreham
2d4c367d87
relabel: stricter check that target labels are valid
...
For `Lowercase`, `KeepEqual`, etc., we do not expand a regexp, so
the target label name must not contain anything like `${1}`.
Also for the common case that the `Replace` target does not require any
template expansion, check that the entire string passes label name
validity rules.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-18 14:58:59 +00:00
Bryan Boreham
9ab7e3b3de
relabel: refactor: extract config.Validate method
...
And add a test for it, which fails because validation is not strong enough.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-18 14:54:55 +00:00
Julien Pivotto
5d5303c746
Merge pull request #13285 from daniel-resdiary/DedupGetNic
...
Dedup code handling getting network interface
2023-12-18 15:27:18 +01:00
Julien Pivotto
7600e6cc05
Merge pull request #13294 from mmorel-35/azure
...
build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanager
2023-12-18 12:13:50 +01:00
Julien Pivotto
eec006915e
Merge pull request #13288 from diogoteles08/feat/add-minimum-permissions-to-script
...
scripts: Add minimal permissions to script golangci-lint.yml
2023-12-18 12:12:39 +01:00
Julien Pivotto
10557ed8e0
Merge pull request #13278 from Automaat/feat/extend-kuma-sd-api
...
kuma_sd: Extend Kuma SD configuration to allow users to specify ClientId
2023-12-18 12:12:07 +01:00
Matthieu MOREL
952cb41373
build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanager
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-15 10:25:07 +00:00
Filip Petkovski
1f69dcfa6b
Fix reusing float histograms
...
In https://github.com/prometheus/prometheus/pull/13276 we started reusing float histogram objects to reduce allocations in PromQL.
That PR introduces a bug where histogram pointers gets copied to the beginning of the histograms slice,
but are still kept in the end of the slice. When a new histogram is read into the last element,
it can overwrite a previous element because the pointer is the same.
This commit fixes the issue by moving outdated points to the end of the slice
so that we don't end up with duplicate pointers in the same buffer. In other words,
the slice gets rotated so that old objects can get reused.
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-14 11:53:58 +01:00
Dimitar Dimitrov
ab26771abc
Merge pull request #575 from grafana/dimitar/postings-for-matchers-reduce-logging
...
PostingsForMatchersCache: don't create new spans, reduce logging verbosity
2023-12-14 11:23:22 +01:00
Diogo Teles Sant'Anna
1a8381a501
Add minimal permissions to script golangci-lint.yml
...
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
2023-12-13 19:47:44 +00:00
Arthur Silva Sens
69abd6d9f6
Document feature flag 'created-timestamp-zero-ingestion' ( #13279 )
...
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-12-13 15:12:50 +00:00
Daniel Nicholls
0704c72548
Dedup code handling getting network interface
...
Signed-off-by: Daniel Nicholls <daniel.nicholls@resdiary.com>
2023-12-13 14:14:01 +00:00
Björn Rabenstein
775de1a3bd
Merge pull request #13276 from fpetkovski/reuse-float-histograms
...
Reuse float histogram objects
2023-12-13 13:43:01 +01:00