Commit Graph

10921 Commits

Author SHA1 Message Date
Bryan Boreham a07a0be024 Add benchmark for labels.Builder
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-06 18:21:58 +00:00
Julien Pivotto d437f0bb6b
Merge pull request #12039 from prometheus/dependabot/go_modules/go.uber.org/goleak-1.2.1
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1
2023-03-06 15:33:16 +01:00
Julien Pivotto ac9b52db91
Merge pull request #12043 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/stretchr/testify-1.8.2
build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /documentation/examples/remote_storage
2023-03-06 15:32:37 +01:00
Julien Pivotto f35ac7929d
Merge pull request #12002 from hanjm/fix/jimmiehan-fix-scrape_pool_target_limit-metric
scrape: fix prometheus_target_scrape_pool_target_limit metric not set on creating scrape pool
2023-03-06 14:41:20 +01:00
Julien Pivotto 64f07cb887
Merge pull request #12065 from roidelapluie/svg-logo-direct
Directly include SVG logo in the page.
2023-03-06 13:20:48 +01:00
Julien Pivotto 631c2e9381
Merge pull request #12057 from hdost/add-parser-documentation
promql: Add a Makefile target for goyacc
2023-03-06 11:58:41 +01:00
Harold Dost ba1918b6d3 promql: Add a Makefile target for goyacc
* Add documentation for goyacc as relevant
* Ignore the y.output since it's not needed for build process.

Signed-off-by: Harold Dost <h.dost@criteo.com>
2023-03-06 11:01:23 +01:00
Julien Pivotto d2f5fdd17e
Merge pull request #12058 from Dup4/fix-typo
chore: fix ignore file_name
2023-03-06 00:49:32 +01:00
Julien Pivotto aeb44cd15a
Merge pull request #11984 from jonatan-ivanov/exemplars-for-all-time-series
Add Exemplars support for all time series
2023-03-05 23:14:07 +01:00
Dup4 adac7bcd1e
chore: fix ignore file_name
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
2023-03-05 23:04:28 +08:00
Jonatan Ivanov 9225d118dc
Add Exemplars support for all time series
This change removes restrictions to allow adding exemplars
to all time series. It also contains some improvements in test values
so that it is easier to track what is tested.
The advantage of doing this is having a little less error-prone tests:
"yy" is not really descriptive but "counter-test" can give people
a better idea about what is tested so it is harder to make mistakes.

Closes gh-11982

Signed-off-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
2023-03-03 17:09:17 -08:00
Julien Pivotto 8e4350dd59 Directly include SVG logo in the page.
Use HTML <svg> element to include Prometheus logo in the status page.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-04 00:36:07 +01:00
ansalamdaniel c1c444504e
Feat: metrics for head_chunks & wal folders (#12013)
Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>
2023-03-02 15:25:56 +05:30
dependabot[bot] 59cc7389fa
build(deps): bump github.com/stretchr/testify
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-02 00:00:04 +00:00
dependabot[bot] e1a6e6faa6
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1
Bumps [go.uber.org/goleak](https://github.com/uber-go/goleak) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/uber-go/goleak/releases)
- [Changelog](https://github.com/uber-go/goleak/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/goleak/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: go.uber.org/goleak
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 23:58:57 +00:00
Rens Groothuijsen d33eb3ab17
Automatically remove incorrect snapshot with index that is ahead of WAL (#11859)
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-01 17:51:02 +05:30
Renning Bruns 5ec1b4baaf
make hashmod a lot easier to read and a little faster (#11551)
Previous code was effectively doing BigEndian.Uint64, so call that and save time.
An md5.Sum result is always 16 bytes. The first 8 are not used in the result, just as before.

Signed-off-by: Renning Bruns <ren@renmail.net>
2023-02-28 17:36:58 +00:00
dependabot[bot] 53bb046d21
build(deps): bump github.com/aws/aws-sdk-go from 1.44.187 to 1.44.207 (#12015)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.187 to 1.44.207.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.187...v1.44.207)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 16:34:24 +01:00
Bartlomiej Plotka 8f3b2fc9ae
Merge pull request #12020 from amrmahdi/amrh/GHSA-vvpx-j8f3-3w6h
Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h
2023-02-25 17:21:11 +01:00
Amr Hanafi (MAHDI)) 4126985908 Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h
https://github.com/advisories/GHSA-vvpx-j8f3-3w6h
Signed-off-by: Amr Hanafi (MAHDI)) <amrh@microsoft.com>
2023-02-24 09:35:09 -08:00
Bryan Boreham 35026fb26d
Merge pull request #11746 from prometheus/remove-microbenchmarks
These benchmarks were testing things related to what Prometheus does, but not testing actual Prometheus code. 
Moved the label-copying benchmark into the labels package.
2023-02-23 12:33:24 +01:00
Julien Pivotto 475f9984d0
Merge pull request #11787 from damnever/perf/avoid-alloc-if-no-externallabels
Avoid allocation during remote write if external labels is empty
2023-02-22 23:38:21 +01:00
Julien Pivotto 46f9c34d90
Merge pull request #11770 from prometheus/nexucis/fix-bump-ui-version
fix ui bump version on mac
2023-02-22 23:37:08 +01:00
Levi Harrison 64ff6bece6
Merge pull request #11682 from dgrisonnet/parsing-errors
Improve the Prometheus parser error outputs to be more comprehensive
2023-02-22 17:35:27 -05:00
Julien Pivotto 666f61a4d5
Merge pull request #10991 from bboreham/labels-as-string
labels.Labels: reduce memory by storing as a single string
2023-02-22 21:01:20 +01:00
Bryan Boreham f03b8d0968 Add benchmark copying labels
Taken from previous tsdb/test/BenchmarkLabelsClone.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-02-22 16:36:45 +00:00
Bryan Boreham f34b2cede3 Remove microbenchmarks
These benchmarks are all testing things related to what Prometheus does,
so perhaps have some historical interest, but we should not retain them
in the main repo.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-02-22 16:36:45 +00:00
Damien Grisonnet 0fee615719 model/textparse: improve openmetrics error outputs
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-02-22 17:19:01 +01:00
Bryan Boreham 4a49ec3a25 CI: additionally run tests with 'stringlabel' tag
This checks that no code is assuming things about `labels.Labels` which
don't work with the alternate implementation.

Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-02-22 15:34:23 +00:00
Bryan Boreham 6136ae67e0 labels: shrink by making internals a single string
This commit adds an alternate implementation for `labels.Labels`, behind
a build tag `stringlabels`.

Instead of storing label names and values as individual strings, they
are all concatenated into one string in this format:

    [len][name0][len][value0][len][name1][len][value1]...

The lengths are varint encoded so usually a single byte.

The previous `[]string` had 24 bytes of overhead for the slice and 16
for each label name and value; this one has 16 bytes overhead plus 1
for each name and value.

In `ScratchBuilder.Overwrite` and `Labels.Hash` we use an unsafe
conversion from string to byte slice. `Overwrite` is explicitly unsafe,
but for `Hash` this is a pure performance hack.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-02-22 15:34:23 +00:00
Bryan Boreham 3f7ba22bde rules: two places need to call EmptyLabels
Can't assume nil is a valid value.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-02-22 15:14:07 +00:00
Ganesh Vernekar 66da1d51fd
Merge pull request #12003 from codesome/redundant-chunk-access
Remove unnecessary chunk fetch in Head queries
2023-02-22 12:57:38 +05:30
Ganesh Vernekar d504c950a2
Remove unnecessary chunk fetch in Head queries
`safeChunk` is only obtained from the `headChunkReader.Chunk` call where
the chunk is already fetched and stored with the `safeChunk`. So, when
getting the iterator for the `safeChunk`, we don't need to get the chunk again.

Also removed a couple of unnecessary fields from `safeChunk` as a part of this.

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-02-22 12:21:12 +05:30
Ganesh Vernekar bfcf69b4a4
Merge pull request #12004 from vishalnad/main
Observe delta in seconds prometheus_tsdb_sample_ooo_delta
2023-02-21 19:32:53 +05:30
Vishal N 96ba6831ae Observe delta in seconds prometheus_tsdb_sample_ooo_delta
Signed-off-by: Vishal Nadagouda <vishalmn1996@gmail.com>
2023-02-21 18:55:09 +05:30
Jimmie Han a13249a98f scrape: fix prometheus_target_scrape_pool_target_limit metric not set on creating scrape pool (#12001)
Signed-off-by: Jimmie Han <hanjinming@outlook.com>
2023-02-21 13:14:04 +08:00
Ben Kochie 86d3d5fec6
Merge pull request #11993 from prometheus/superq/bump_golangci-lint
Update golangci-lint
2023-02-20 14:29:38 +01:00
SuperQ 65e743719c
Update golangci-lint
Update to the latest release, supports Go 1.20.

Signed-off-by: SuperQ <superq@gmail.com>
2023-02-20 11:17:22 +01:00
Shan Aminzadeh 3f6f5d3357
Scope GroupBy labels to metric (#11914)
Signed-off-by: Shan Aminzadeh <shan.aminzadeh@chronosphere.io>
2023-02-17 10:23:16 +01:00
dependabot[bot] 2d588725c1
build(deps): bump bufbuild/buf-setup-action from 1.12.0 to 1.13.1 (#11922)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.12.0...v1.13.1)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 10:28:04 +01:00
dependabot[bot] 94e0801f9f
build(deps): bump actions/cache from 3.2.3 to 3.2.4 (#11920)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 10:27:44 +01:00
dependabot[bot] bb18bb3d1f
build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#11921)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 10:27:18 +01:00
Julien Pivotto 259bb5c692
Merge pull request #11826 from dannykopping/dannykopping/rule-eval
Pass rule details in evaluation context
2023-02-14 21:38:19 +01:00
Julien Pivotto e1679a80f3
Merge pull request #11936 from kelnage/sanitize-labels-edge-cases
Fix SanitizeLabelName for certain edge case invalid labels
2023-02-14 21:36:11 +01:00
Julien Pivotto 8a8f594b16
Merge pull request #11487 from FUSAKLA/fus-promtool-http-config
Promtool: add http config support to query commands
2023-02-14 11:18:24 +01:00
Martin Chodur f1de2cec3d fix: set the http round tripper fro promtool import command
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2023-02-10 23:23:38 +01:00
Julien Pivotto dfd2b5340e
Merge pull request #11951 from Fish-pro/chore/httpvar
Use http constants instead of string
2023-02-10 22:44:50 +01:00
Martin Chodur 3ebe4b48db feat: add promtool http config support
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2023-02-10 14:53:20 +01:00
Justin Lei af1d9e01c7
Refactor tsdbutil for tests/native histograms (#11948)
* Add float histograms to ChunkFromSamplesGeneric

Signed-off-by: Justin Lei <justin.lei@grafana.com>

* Add Generate*Samples functions to tsdbutil

Signed-off-by: Justin Lei <justin.lei@grafana.com>

* PR responses

Signed-off-by: Justin Lei <justin.lei@grafana.com>

---------

Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-02-10 17:09:33 +05:30
Fish-pro 43d77f7c41 Use http constants instead of string
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-10 10:21:05 +08:00