Jeanette Tan
40240c9c1c
Update according to code review
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-05-05 02:33:00 +08:00
György Krajcsovits
19a4f314f5
Refactor testutil/protobuf.go into scrape package
...
Renamed to clientprotobuf.go and added comments to indicate the
intended usage.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-05-04 08:36:44 +02:00
György Krajcsovits
e9b2d87443
Revert change to model/textparse/protobufparse_test.go
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-05-04 08:16:37 +02:00
Björn Rabenstein
7c2de14b0b
Merge pull request #12243 from leizor/leizor/prometheus/issues/11274
...
Optimize and test MemoizedSeriesIterator
2023-05-03 23:51:44 +02:00
Justin Lei
7bbf24b707
Make MemoizedSeriesIterator not implement chunkenc.Iterator
...
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-05-03 12:45:39 -07:00
beorn7
b0272255b7
storage: optimise sampleRing
...
Replace many checks for the lengths of slices with a single tracking
variable.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-05-03 20:09:29 +02:00
Bryan Boreham
3d26faade4
Create 2.44.0-rc.1 ( #12323 )
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-05-03 16:18:28 +01:00
Bryan Boreham
7a48a266b6
labels: respect Set after Del in Builder ( #12322 )
...
* labels: respect Set after Del in Builder
The implementations are not symmetric between `Set()` and `Del()`, so
we must be careful. Add tests for this, both in labels and in relabel
where the issue was reported.
Also make the slice implementation consistent re `slices.Contains`.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-05-03 11:59:27 +01:00
Justin Lei
6985dcbe73
Optimize and test MemoizedSeriesIterator
...
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-05-02 08:53:18 -07:00
dependabot[bot]
8deface2da
build(deps): bump github.com/prometheus/client_golang
...
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang ) from 1.14.0 to 1.15.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.14.0...v1.15.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>
2023-05-02 00:00:22 +00:00
dependabot[bot]
6dfcd002ae
build(deps): bump github.com/hetznercloud/hcloud-go
...
Bumps [github.com/hetznercloud/hcloud-go](https://github.com/hetznercloud/hcloud-go ) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases )
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/hetznercloud/hcloud-go/compare/v1.42.0...v1.43.0 )
---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 23:58:22 +00:00
dependabot[bot]
1cbe1d8566
build(deps): bump github.com/digitalocean/godo from 1.98.0 to 1.99.0
...
Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo ) from 1.98.0 to 1.99.0.
- [Release notes](https://github.com/digitalocean/godo/releases )
- [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md )
- [Commits](https://github.com/digitalocean/godo/compare/v1.98.0...v1.99.0 )
---
updated-dependencies:
- dependency-name: github.com/digitalocean/godo
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 23:58:14 +00:00
dependabot[bot]
1068be1991
build(deps): bump bufbuild/buf-setup-action from 1.16.0 to 1.17.0
...
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action ) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases )
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.16.0...v1.17.0 )
---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 23:57:09 +00:00
Bryan Boreham
0ab9553611
tsdb: drop deleted series from the WAL sooner ( #12297 )
...
`head.deleted` holds the WAL segment in use at the time each series was
removed from the head. At the end of `truncateWAL()` we will delete
all segments up to `last`, so we can drop any series that were last seen
in a segment at or before that point.
(same change in Prometheus Agent too)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-05-01 16:43:15 +01:00
Filip Petkovski
0d049feac7
Fix encoding samples in ChunkSeries ( #12185 )
...
The storage.ChunkSeries iterator assumes that a histogram sample can always be
appended to the currently open chunk. This is not the case when there is a counter reset,
or when appending a stale sample to a chunk with non-stale samples. In addition, the open chunk sometimes
needs to be recoded before a sample can be appended.
This commit addresses the issue by implementing a RecodingAppender which can recode incoming
samples in a transparent way. It also detects cases when a sample cannot be appended at all and
returns `false` so that the caller can open a new chunk.
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-04-28 16:52:21 -04:00
François Gouteroux
b1bab7bc54
feat(promtool): add push metrics command
...
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
2023-04-27 14:49:38 +02:00
Julien Pivotto
24d7e5bd49
Merge pull request #12296 from rsc/loopvar
...
scrape: fix two loop variable scoping bugs in test
2023-04-27 11:24:04 +02:00
Julien Pivotto
3c3ea24929
Merge pull request #12290 from cuishuang/main
...
Fix some comments.
2023-04-27 11:16:05 +02:00
Russ Cox
28f5502828
scrape: fix two loop variable scoping bugs in test
...
Consider code like:
for i := 0; i < numTargets; i++ {
stopFuncs = append(stopFuncs, func() {
time.Sleep(i*20*time.Millisecond)
})
}
Because the loop variable i is shared by all closures,
all the stopFuncs sleep for numTargets*20 ms.
If the i were made per-iteration, as we are considering
for a future Go release, the stopFuncs would have sleep
durations ranging from 0 to (numTargets-1)*20 ms.
Two tests had code like this and were checking that the
aggregate sleep was at least numTargets*20 ms
("at least as long as the last target slept"). This is only true
today because i == numTarget during all the sleeps.
To keep the code working even if the semantics of this loop
change, this PR computes
d := time.Duration((i+1)*20) * time.Millisecond
outside the closure (but inside the loop body), and then each
closure has its own d. Now the sleeps range from 20 ms
to numTargets*20 ms, keeping the test passing
(and probably behaving closer to the intent of the test author).
The failure being fixed can be reproduced by using the current
Go development branch with
GOEXPERIMENT=loopvar go test
Signed-off-by: Russ Cox <rsc@golang.org>
2023-04-26 10:33:10 -04:00
Julien Pivotto
d4bf47766e
Merge pull request #12292 from tpaschalis/fix-recommended-protoc
...
Fix recommended protoc version
2023-04-26 14:38:32 +02:00
Paschalis Tsilias
8a34c43515
Update prompb/README.md
...
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-26 12:57:20 +03:00
Paschalis Tsilias
55626c6911
Fix final newline
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:44:15 +03:00
Paschalis Tsilias
93f64754c0
Remove extra line
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:43:19 +03:00
Bryan Boreham
d70688038e
Merge pull request #12289 from bboreham/release-2.44-rc0
...
Create new Release Candidate 2.44.0-rc0
2023-04-26 10:39:34 +01:00
Jesus Vazquez
0bf707e288
Merge pull request #12293 from jesusvazquez/jvp/propose-jesus-vazquez-as-2-45-release-shepherd
...
Propose Jesus Vazquez as 2.45 release shepherd
2023-04-25 21:02:30 +02:00
Jesus Vazquez
38de61b59b
Propose Jesus Vazquez as 2.45 release shepherd
...
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2023-04-25 17:59:00 +02:00
Paschalis Tsilias
417e847662
Update prompb/README.md
...
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-25 17:17:22 +03:00
Paschalis Tsilias
c06c02b3b1
Fix recommended protoc version
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-25 16:27:39 +03:00
Bryan Boreham
6b25e9a923
build: turn on stringlabels by default
...
This setting uses less memory, and was optional in previous release 2.43.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-25 10:11:32 +00:00
Bryan Boreham
8bfd162198
Review feedback - mostly capitalization
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-25 10:06:23 +00:00
cui fliter
276ca6a883
fix some comments
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-25 14:19:16 +08:00
Jeanette Tan
dfabc69303
Add tests according to code review
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-25 02:07:36 +08:00
Bryan Boreham
aeccf9e770
Bump version to 2.44.0-rc0
...
Including CHANGELOG.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-24 15:38:43 +00:00
Bryan Boreham
cf1bea344a
Merge pull request #12191 from narqo/web-gomemlimit
...
Display GOMEMLIMIT in runtime info
2023-04-24 13:13:06 +02:00
Vladimir Varankin
d281ebb178
web: display GOMEMLIMIT in runtime info
...
Signed-off-by: Vladimir Varankin <vladimir@varank.in>
2023-04-23 20:24:34 +02:00
Julien Pivotto
7cd9f8a340
Merge pull request #12285 from bboreham/update-older-go
...
Update test_golang_oldest to 1.19
2023-04-22 15:55:59 +02:00
Bryan Boreham
13938d0ccc
Update test_golang_oldest to 1.19
...
Since test_go is on 1.20, and it should use the previous version.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-22 10:16:49 +02:00
Björn Rabenstein
d52a976ee1
Merge pull request #12272 from zenador/check-histogram-type-on-convert
...
Perform integer/float histogram type checking on conversions
2023-04-21 21:52:00 +02:00
Jeanette Tan
2ad39baa72
Treat bucket limit like sample limit and make it fail the whole scrape and return an error
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 03:25:07 +08:00
György Krajcsovits
071426f72f
Add unit test for bucket limit appender
...
Refactors textparser test to use a common test utility to create
protobuf representation from MetricFamily
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-04-22 03:14:19 +08:00
Jeanette Tan
d3ad158a66
Update docs and comments
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 03:14:19 +08:00
Jeanette Tan
4d21ac23e6
Implement bucket limit for native histograms
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 03:14:19 +08:00
Jeanette Tan
1102ffd188
Fix according to code review
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 02:27:15 +08:00
Jeanette Tan
e9a1e26ab7
Perform integer/float histogram type checking on conversions, and use a consistent method for determining integer vs float histogram
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 02:27:15 +08:00
John Losito
ecf6bfa619
Update configuration.md
...
Signed-off-by: John Losito <lositojohnj@gmail.com>
2023-04-21 09:26:16 -04:00
Julien Pivotto
8f1dc4a70f
Merge pull request #12248 from yeya24/consistent-response
...
Use same error for instant and range query when 400
2023-04-21 11:44:20 +02:00
Julien Pivotto
0b212fd123
Merge pull request #12279 from mmorel-35/linters
...
golangci-lint: remove skip-cache and restore singleCaseSwitch rule
2023-04-20 19:18:07 +02:00
Julien Pivotto
388eb03923
Merge pull request #12277 from roidelapluie/restore-main
...
Revert type casting removal
2023-04-20 19:17:32 +02:00
Matthieu MOREL
7e9acc2e46
golangci-lint: remove skip-cache and restore singleCaseSwitch rule
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-04-20 18:43:51 +02:00
Björn Rabenstein
78cd9ae2c3
Merge pull request #12264 from rabenhorst/sample-ring-iterator-mixed-histograms-fix
...
Fix for `sampleRingIterator` with mixed histograms
2023-04-20 16:58:18 +02:00