Danny Kopping
498b836654
Refactoring manager.go into separate concerns
...
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2023-10-21 11:11:11 +02:00
Jeanette Tan
48e64fdd4d
Continue avoiding creating empty annotations as much as possible
2023-10-21 00:37:11 +08:00
Arve Knudsen
d0d6240125
Merge pull request #546 from grafana/charleskorn/postingsformatcherscache-context-cancellation
...
Fix issue where `PostingsForMatchersCache` can cache a context cancellation error
2023-10-20 16:47:05 +02:00
Arve Knudsen
efcd876b50
Ensure deterministic execution, for tests
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-20 16:21:26 +02:00
Bryan Boreham
a9f19da42e
promql: temporarily eliminate more overhead of Annotations
...
Creating a map on every step of evaluation is expensive.
This is a quick-fix; probably a better long-term solution is available.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-20 13:36:56 +00:00
Jeanette Tan
7756556eb6
Remove NewPossibleNonCounterInfo until it can be made more efficient
2023-10-20 19:18:37 +08:00
Rens Groothuijsen
122f9506e9
Set test group interval default to evaluation interval ( #13011 )
...
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
2023-10-20 21:32:46 +11:00
Charles Korn
6dcebc9e25
Don't allow cancelled contexts to poison the postings for matchers cache.
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-10-20 15:48:14 +11:00
Charles Korn
8df8db6c73
Add failing test
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-10-20 15:48:12 +11:00
Bartlomiej Plotka
6d083312e7
native-histograms: Fixed PrometheusProto scrape format preference. ( #13010 )
...
Broken by https://github.com/prometheus/prometheus/pull/12738 . We have to update both global variables (as GlobalConfig is not a pointer here).
DefaultConfig is used when no global: section is provided, whereas DefaultGlobalConfig is used when it's provided and for individual scrape configs.
Reported on #prometheus-dev (thanks to @beorn7): https://cloud-native.slack.com/archives/C01AUBA4PFE/p1697733267205649
Tested manually, it would be nice to add test at some point (quick fix for now).
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-10-19 20:38:45 +01:00
Björn Rabenstein
8a3af74121
Merge pull request #13008 from prometheus/beorn7/protobuf
...
prompb: Clarify things around optional fields in proto3 and gogo-protobuf
2023-10-19 21:09:50 +02:00
beorn7
a5abd92541
prompb: Remove gogoproto.nullable) = true]
from created_timestamp
...
In proto3, this doesn't change anything. However, since the
`CreatedTimestamp` field is generated as a pointer
(`*types.Timestamp`), we are still able to detect the unset state.
(This is in contrast to the `timestamp_ms` field, which is a plain
int64, for which we cannot enforce generation as a pointer, see
comment updated in the previous commit for future actions.)
Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-19 17:59:07 +02:00
beorn7
b428416f06
textparse: Update comment about timestamp_ms protobuf parsing
...
By now, we know better what the plan is.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-19 17:54:42 +02:00
Arve Knudsen
97933fb7d3
Merge pull request #545 from grafana/arve/unordered-chunks-context
...
DB.UnorderedChunkQuerier: Remove unused ctx argument
2023-10-19 12:07:15 +02:00
Julien Pivotto
88de3d4491
Merge pull request #13007 from zenador/update-tsdb-ooo-head-read-overflow
...
Very minor refactor of the integer overflow fix
2023-10-19 10:15:39 +02:00
Jeanette Tan
71a36d2396
Very minor refactor of the integer overflow fix
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-10-19 13:17:46 +08:00
Arthur Silva Sens
ef8e6ae780
Parse created timestamps from Prometheus Protobuf ( #12973 )
...
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-18 19:04:02 +01:00
Arve Knudsen
a889bf6ad2
DB.UnorderedChunkQuerier: Remove unused ctx argument
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-18 18:23:32 +02:00
Arve Knudsen
c16ebb9392
Merge pull request #543 from grafana/sync-upstream-20231018
...
Sync upstream 20231018
2023-10-18 17:53:40 +02:00
Björn Rabenstein
4d50e5d122
Merge pull request #12609 from marctc/query_max_samples_float_histogram
...
promql(histograms): Change sample total calculation for histograms
2023-10-18 16:40:18 +02:00
Marc Tuduri
1ce066e51c
More periods
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:53:50 +02:00
Marc Tuduri
af7c31ee10
PR feedback
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:53:50 +02:00
Marc Tuduri
8fededf6ad
promql(histograms): Change sample total calculation for histograms
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:51:11 +02:00
Jeanette Tan
f898005c69
Merge remote-tracking branch 'upstream/main' into sync-upstream-20231018
2023-10-18 11:43:51 +08:00
Anand Rajagopal
2ade8adf9e
Adding a query parameter to filter out active alerts
...
Signed-off-by: Anand Rajagopal <anrajag@amazon.com>
2023-10-18 02:05:26 +00:00
Björn Rabenstein
16af86734f
Merge pull request #12994 from prometheus/beorn7/release
...
Merge release-2.48 back into main
2023-10-18 00:36:13 +02:00
Björn Rabenstein
f33bffa788
Merge pull request #12891 from linasm/fix-gaps-in-histogram-equals
...
Fix NaN checks in [Float]Histogram.Equals method
2023-10-18 00:35:17 +02:00
Bryan Boreham
26fa2e8356
TSDB: Pre-size buffer to read samples from WAL
...
When reading the WAL this method is called with buffers from a pool, on
multiple goroutines. Pre-allocating sufficient size avoids slow growth
and many reallocations in `append`.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-17 17:31:26 +00:00
Björn Rabenstein
35ec9d1f89
Merge pull request #12868 from jdellithorpe-db/alert-unit-test-doc-fix
...
Promtool: Fix/clarify documentation for axn notation.
2023-10-17 19:04:30 +02:00
Bryan Boreham
551fa8378c
Merge pull request #12959 from LeviHarrison/release-2.48.0-rc0
...
Release 2.48.0-rc0
2023-10-17 15:06:40 +01:00
Levi Harrison
d1620abde9
Add last warning pr
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-17 09:37:50 -04:00
beorn7
ca450a6d79
Merge branch 'release-2.48' into beorn7/release
2023-10-17 15:03:44 +02:00
Björn Rabenstein
fb0b9fc0da
Merge pull request #12988 from zenador/release-2.48-fix-non-counter-warning
...
Fix possible non-counter warning for empty names and native histograms
2023-10-17 11:41:20 +02:00
Julien Pivotto
a06c6680aa
Merge pull request #12990 from pnacht/scorecard-action
...
Add the OpenSSF Scorecard GitHub Action
2023-10-17 09:35:53 +02:00
Levi Harrison
700f9bd7c6
nits
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-16 22:26:45 -04:00
Pedro Kaj Kjellerup Nacht
d92dd108bc
Update workflow name in sync script
...
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 19:02:31 +00:00
Pedro Kaj Kjellerup Nacht
1ac8b5801a
Remove duplicate scorecard workflow
...
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 19:00:47 +00:00
Pedro Kaj Kjellerup Nacht
927fbfca53
Add scorecard.yml to sync_repo_files.sh
...
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-10-16 15:33:17 +00:00
Pedro Kaj Kjellerup Nacht
0968e7d907
Create scorecard.yml
...
Signed-off-by: Pedro Kaj Kjellerup Nacht <pedro.k.night@gmail.com>
2023-10-16 15:29:44 +00:00
George Krajcsovits
7d7b9eacff
Fix int32 overflow issues ( #12978 )
...
On a 32 bit architecture the size of int is 32 bits. Thus converting from
int64, uint64 can overflow it and flip the sign.
Try for yourself in playground:
package main
import "fmt"
func main() {
x := int64(0x1F0000001)
y := int64(1)
z := int32(x - y) // numerically this is 0x1F0000000
fmt.Printf("%v\n", z)
}
Prints -268435456 as if x was smaller.
Followup to #12650
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-10-16 16:23:26 +02:00
Jeanette Tan
9a8bd8eac6
Fix possible non-counter warning for empty names and native histograms
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-10-16 15:52:10 +08:00
Levi Harrison
827804c79d
Release 2.48.0-rc0
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 22:32:41 -04:00
Charles Korn
e224fcb162
Merge pull request #541 from grafana/charleskorn/rule-evaluation-logs
...
Include trace ID in log lines emitted during rule evaluation
2023-10-16 10:03:34 +11:00
Julien Pivotto
8a0c9aec1c
Merge pull request #12985 from LeviHarrison/merge-main-release-2.48
...
Cherry pick latest main changes into 2.48
2023-10-15 22:28:34 +02:00
Levi Harrison
454a0a2c1b
Update dependencies for 2.48 ( #12964 )
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Julius Volz
191c24a0ed
Fix: Exempt "_bucket" suffix from PossibleNonCounterInfo warning ( #12982 )
...
Related to PR #12152
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Julien Pivotto
77c1c2c44a
Merge pull request #12981 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/prometheus-0.47.2
...
build(deps): bump github.com/prometheus/prometheus from 0.45.0 to 0.47.2 in /documentation/examples/remote_storage
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Ziqi Zhao
60e2bb0135
enhance promtool tsdb analyze command ( #12869 )
...
Improve promtool tsdb analyze
- Make it more suitable for variable size float chunks.
- Add support for histogram chunks.
---------
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Levi Harrison
4284e6f2f7
Merge pull request #11860 from mmorel-35/azure-sdk-for-go
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00
Paschalis Tsilias
42b8f2f5fc
tsdb/agent: allow ingestion of OOO samples ( #12897 )
...
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-15 13:47:42 -04:00