Matthieu MOREL
c74b7ad4fb
Update tombstones.go
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-11 19:22:06 +01:00
Matthieu MOREL
118460a64f
tsdb/tombstones: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-11 19:19:50 +01:00
Matthieu MOREL
4d6d3c1715
tsdb/encoding: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-11 19:01:11 +01:00
George Krajcsovits
39a35d92bc
tsdb/head: wlog exemplars after samples ( #13113 )
...
When samples are committed in the head, they are also written to the WAL.
The order of WAL records should be sample then exemplar, but this was
not the case for native histogram samples. This PR fixes that.
The problem with the wrong order is that remote write reads the WAL and
sends the recorded timeseries in the WAL order, which means exemplars
arrived before histogram samples. If the receiving side is Prometheus
TSDB and the series has not existed before then the exemplar does not
currently create the series. Which means the exemplar is rejected and lost.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-11 17:30:16 +01:00
Ziqi Zhao
b94f32f6fa
automatically reduce resolution rather than fail scrape
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-11 22:24:47 +08:00
Arve Knudsen
152aea3bc6
Merge pull request #553 from grafana/arve/postings-for-matchers-cache-tracing
...
PostingsForMatchersCache: Add tracing
2023-11-10 17:09:19 +01:00
Ziqi Zhao
e250f09b5d
change origin schema in ReduceResolution
method of histogram and float histogram ( #13116 )
...
* change origin schema in ReduceResolution method of histogram and float histogram
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
---------
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-10 14:33:34 +01:00
Jacob Baungård Hansen
80d2f992ae
codemirror-promql: Add request header to client ( #13118 )
...
With this commit we make it possible to adjust the request headers sent
to Prometheus by the codemirror-promql extension. This enables
customizing the headers sent, without re-implementing the Prometheus
client completely.
Signed-off-by: Jacob Baungard Hansen <jacobbaungard@redhat.com>
2023-11-10 11:22:32 +01:00
Arve Knudsen
d1c7983f22
Don't end non-owned span
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-10 08:11:06 +01:00
Arve Knudsen
e1e64f36c2
Apply suggestions from code review
...
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
2023-11-10 08:02:13 +01:00
Matthieu MOREL
2972cc5e8f
tsdb/index: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-09 21:37:41 +00:00
Julien Pivotto
e8585e4d44
Merge pull request #13120 from roidelapluie/stalenesstracking
...
Follow-up to #13060 : Add test to ensure staleness tracking
2023-11-09 10:48:16 -06:00
Julien Pivotto
cfd83e71f7
Merge pull request #13110 from machine424/del-extra
...
head.go: Remove an unneeded snapshot trigger that was moved in https:…
2023-11-09 10:26:36 -06:00
Julien Pivotto
0fe34f6d78
Follow-up to #13060 : Add test to ensure staleness tracking
...
This commit introduces an additional test in `scrape_test.go` to verify
staleness tracking when `trackTimestampStaleness` is enabled. The new
`TestScrapeLoopAppendStalenessIfTrackTimestampStaleness` function
asserts that the scrape loop correctly appends staleness markers when
necessary, reflecting the expected behavior with the feature flag turned
on.
The previous tests were only testing end of scrape staleness.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-11-09 10:20:35 -06:00
Arve Knudsen
92606f3b52
Fix trace event
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 17:08:59 +01:00
Arve Knudsen
476ebcb0a6
Adjust benchmark
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:58:06 +01:00
Arve Knudsen
83b0ed7bdb
Clean up
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:58:06 +01:00
Arve Knudsen
e3b8667fb1
Increase number of postings in benchmark
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:58:06 +01:00
Arve Knudsen
ef70a6e6cf
Allocate tracing attributes up front
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:57:56 +01:00
Julien Pivotto
8b2b7d3d7a
Merge pull request #13117 from machine424/remote-headers
...
remote_write: add a unit test to make sure the write client sends the extra http headers as expected
2023-11-09 09:52:23 -06:00
machine424
0996b78326
remote_write: add a unit test to make sure the write client sends
...
the extra http headers as expected
This will help letting prometheus off the hook from situations like
https://github.com/prometheus/prometheus/issues/13030
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2023-11-09 15:56:48 +01:00
Arve Knudsen
46bf26e841
Create Tracer once per PostingsForMatchersCache
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
403abaee79
Set span status on error
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
7c313be3b5
Remove unnecessary event attributes
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
2aabf7cc2c
Improve tracing
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
25e2c05a47
Implement review feedback
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
6c0910a289
Update tsdb/postings_for_matchers_cache.go
...
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
ca4cdeb1af
Apply suggestions from code review
...
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
2023-11-09 15:31:31 +01:00
Arve Knudsen
8ece24ddb0
PostingsForMatchersCache: Add tracing
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 15:31:31 +01:00
Bryan Boreham
e6c0f69f98
TSDB: Only pay for hash collisions when they happen
...
Instead of a map of slices of `*memSeries`, ready for any of them to
hold series where hash values collide, split into a map of `*memSeries`
and a map of slices which is usually empty, since hash collisions are
a one-in-a-billion thing.
The `del` method gets more complicated, to maintain the invariant that
a series is only in one of the two maps.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-11-09 07:44:39 -06:00
Bryan Boreham
ce4e757704
TSDB: refine variable naming in chunk gc
...
Slight further refactor.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-11-09 07:44:39 -06:00
Bryan Boreham
071d5732af
TSDB: refactor cleanup of chunks and series
...
Extract the middle of the loop into a function, so it will be
easier to modify the `seriesHashmap` data structure.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-11-09 07:44:39 -06:00
machine424
a32fbc3658
head.go: Remove an unneeded snapshot trigger that was moved in https://github.com/prometheus/prometheus/pull/9328
...
and brougt back by mistake in 095f572d4a
as part of https://github.com/prometheus/prometheus/pull/11447
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2023-11-09 11:46:46 +01:00
Matthieu MOREL
fb48a351f0
tsdb/wlog: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 21:41:58 +00:00
songjiayang
443867f1aa
symbolCacheEntry field type alignment, thus saving 8 bytes.
...
Signed-off-by: songjiayang <songjiayang1@gmail.com>
2023-11-09 00:43:27 +08:00
Ziqi Zhao
ab2a7bb74f
add generic shrink function ( #13001 )
...
Add `ReduceResolution` method to `Histogram` and `FloatHistogram`
This takes the original `mergeToSchema` function and turns it into a more generic `reduceResolution` function, which is the building block for the new methods.
The methods will help with addressing #12864 .
---------
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-11-08 14:43:05 +01:00
Arve Knudsen
ae9221e152
tsdb/index.Symbols: Drop context argument from Lookup method ( #13058 )
...
Drop context argument from tsdb/index.Symbols.Lookup since lookup
should be fast and the context checking is a performance hit.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-08 13:08:33 +01:00
Matthieu MOREL
ece8286305
tsdb/chunk: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 09:19:44 +00:00
Matthieu MOREL
b60f9f801e
tsdb/chunkenc: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 08:38:57 +00:00
Matthieu MOREL
724737006d
tsdb/agent: use Go standard errors package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 09:22:31 +01:00
Julien Pivotto
252c7ca939
Merge pull request #13106 from mmorel-35/patch-1
...
web : use Go standard errors package
2023-11-08 02:01:25 -06:00
Matthieu MOREL
05fba53e57
web : use Go standard package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-11-08 06:37:59 +00:00
Julien Pivotto
6a124427fa
Merge pull request #13073 from prometheus/dependabot/github_actions/ossf/scorecard-action-2.3.1
...
build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.1
2023-11-07 21:08:25 -06:00
Julien Pivotto
bd3db70501
Merge pull request #13072 from prometheus/dependabot/github_actions/actions/checkout-4.1.1
...
build(deps): bump actions/checkout from 4.1.0 to 4.1.1
2023-11-07 21:08:07 -06:00
Julien Pivotto
cf01ec2119
Merge pull request #13091 from mmorel-35/errorlint/util
...
util: use Go standard errors package
2023-11-07 21:07:25 -06:00
SuperQ
75b59e0f3d
Update golangci-lint.
...
Update golangci-lint for Go 1.21.
* Use consistent go-version syntax.
Signed-off-by: SuperQ <superq@gmail.com>
2023-11-07 14:22:12 +01:00
Goutham Veeramachaneni
b80617a248
Merge pull request #12881 from dimitarvdimitrov/dimitar/TestQuerierIndexQueriesRace-less-synchronisation
...
Improve sensitivity of TestQuerierIndexQueriesRace
2023-11-07 12:16:43 +01:00
George Krajcsovits
237a77b483
Merge pull request #562 from grafana/krajo/revert549
...
Revert "Fix issue where `concatenatingChunkIterator` can obscure erro…
2023-11-06 17:09:16 +01:00
György Krajcsovits
7bb4f04a1c
Revert "Fix issue where concatenatingChunkIterator
can obscure errors."
...
This reverts commit 4a1fb3b18c
.
2023-11-06 16:43:47 +01:00
Björn Rabenstein
69c9c29061
Merge pull request #12977 from linasm/linasm/strict-validation-of-histogram-without-nans
...
ValidateHistogram: strict Count check in absence of NaNs
2023-11-05 23:13:29 +01:00