Commit graph

12721 commits

Author SHA1 Message Date
Owen Williams fd1733df2a Merge remote-tracking branch 'mimir/main' into owilliams/utf8-02-mimir 2024-01-18 11:39:10 -05:00
Owen Williams ea4d0c4600 updates 2024-01-18 11:35:50 -05:00
Marco Pracucci e3a486e7f8
Merge pull request #583 from grafana/sync-prometheus
Sync prometheus
2024-01-16 14:35:29 +01:00
Marco Pracucci fc40f7cff8
Fix cmd/compact
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-16 12:06:27 +01:00
Marco Pracucci 77d66c544a
Fix options
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2024-01-16 12:03:59 +01:00
Marco Pracucci dceedfd215
Merge remote-tracking branch 'remotes/prometheus/main' into sync-prometheus 2024-01-16 11:42:27 +01:00
zenador 72a8f1084b
Restore more efficient version of NewPossibleNonCounterInfo annotation (#13022)
Restore more efficient version of NewPossibleNonCounterInfo annotation

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-01-16 09:54:16 +01:00
Giedrius Statkevičius b695e069b8
tsdb/main: wire "EnableOverlappingCompaction" to tsdb.Options (#13398)
This added the https://github.com/prometheus/prometheus/pull/13393
"EnableOverlappingCompaction" parameter to the compactor code but not to
the tsdb.Options. I forgot about that. Add it to `tsdb.Options` too and
set it to `true` in Prometheus.

Copy/paste the description from
https://github.com/prometheus/prometheus/pull/13393#issuecomment-1891787986

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-15 16:42:40 +01:00
Bartlomiej Plotka 90000a2ef2
Merge pull request #13399 from prometheus/merge-2.49.0-back
Merge 2.49.0 release to main
2024-01-15 16:09:24 +01:00
bwplotka 09d351668f Fixed changelog
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 11:42:09 +00:00
Bartlomiej Plotka db3544c552
Merge branch 'main' into merge-2.49.0-back
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-01-15 12:38:36 +01:00
Bartlomiej Plotka 683a46cc99
Merge pull request #13397 from prometheus/cut-2.49.0
Cut 2.49.0
2024-01-15 11:48:43 +01:00
Ayoub Mrini ace9c8a3da
promtool: allow setting multiple matchers to "promtool tsdb dump" command. (#13296)
Conditions are ANDed inside the same matcher but matchers are ORed

Including unit tests for "promtool tsdb dump".

Refactor some matchers scraping utils.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-01-15 10:29:53 +00:00
bwplotka cf50f85faa Cut 2.49.0
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-15 09:55:35 +00:00
Ben Kochie 17920623e7
Merge pull request #13391 from GiedriusS/compact_merge_func
tsdb/compact: fix passing merge func
2024-01-15 09:43:06 +01:00
gotjosh 4fbd406a36
Merge pull request #13393 from vinted/disable_overlapping_compaction 2024-01-15 08:37:24 +00:00
Giedrius Statkevičius 3a48adc54f tsdb: add enable overlapping compaction
This functionality is needed in downstream projects because they have a
separate component that does compaction.

Upstreaming
7c8e9a2a76/tsdb/compact.go (L323-L325).

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-12 11:19:41 +02:00
Giedrius Statkevičius 9b759135d1 tsdb/compact: fix passing merge func
Fixing a very small logical problem I've introduced :(.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-11 12:07:54 +02:00
Owen Williams 060d999574 make it a top-level flag instead 2024-01-10 12:31:34 -05:00
Owen Williams f661b664f5 remove flags from here 2024-01-10 11:58:28 -05:00
zenador 6150e1ca0e
Add analyze histograms command to promtool (#12331)
Add `query analyze` command to promtool

This command analyzes the buckets of classic and native histograms,
based on data queried from the Prometheus query API, i.e. it
doesn't require direct access to the TSDB files.

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-01-10 17:32:36 +01:00
Owen Williams f66f29e182 fallback when arg is empty 2024-01-10 11:24:05 -05:00
Owen Williams e18ed1b451 Make sure to apply escaping config 2024-01-09 15:17:55 -05:00
Owen Williams fe21d3b349 add new formats to content negotiation 2024-01-09 13:16:34 -05:00
Björn Rabenstein 3db4596965
Merge pull request #13299 from vesari/add-unit-parser
protobuf: add unit parser
2024-01-09 14:47:50 +01:00
Augustin Husson 6cd24d87b0
put @nexucis has a release shepherd (#13383)
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
2024-01-08 17:01:24 +01:00
dependabot[bot] 88a6b3a80a
build(deps): bump github/codeql-action from 2.22.8 to 3.22.12 (#13358)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.8 to 3.22.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](407ffafae6...012739e508)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 16:36:53 +01:00
dependabot[bot] 3c44fbcced
build(deps): bump actions/setup-go from 3.5.0 to 5.0.0 in /scripts (#13362)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.5.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](6edd4406fa...0c52d547c9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 16:36:24 +01:00
Bartlomiej Plotka 0a88bcbae8
Merge pull request #13382 from prometheus/cut-2.49-rc2
Cut 2.49.0-rc.2 + cherry pick of UI fix #13371
2024-01-08 11:19:59 +01:00
bwplotka abbcdc61f5 Cut 2.49.0-rc.2
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-08 09:49:30 +00:00
Giedrius Statkevičius 61b4080a14
tsdb/{index,compact}: allow using custom postings encoding format (#13242)
* tsdb/{index,compact}: allow using custom postings encoding format

We would like to experiment with a different postings encoding format in
Thanos so in this change I am proposing adding another argument to
`NewWriter` which would allow users to change the format if needed.
Also, wire the leveled compactor so that it would be possible to change
the format there too.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

* tsdb/compact: use a struct for leveled compactor options

As discussed on Slack, let's use a struct for the options in leveled
compactor.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

* tsdb: make changes after Bryan's review

- Make changes less intrusive
- Turn the postings encoder type into a function
- Add NewWriterWithEncoder()

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

---------

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-08 09:48:27 +00:00
Bartlomiej Plotka d4a6bc03f2 Merge pull request #13371 from kevinmingtarja/fix-isHeatmapData
ui: fix handling of scalar and string in isHeatmapData
2024-01-08 09:42:46 +00:00
Bartlomiej Plotka 775d955919
Merge pull request #13371 from kevinmingtarja/fix-isHeatmapData
ui: fix handling of scalar and string in isHeatmapData
2024-01-07 19:59:20 +01:00
Owen Williams b4dd9d9c46 require both a feature flag and a globalconfig flag 2024-01-05 14:47:19 -05:00
Owen Williams 894093b3c0 tweaks for e2e 2024-01-05 14:10:01 -05:00
Marc Tudurí 78c5ce3196
Drop old inmemory samples (#13002)
* Drop old inmemory samples

Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Avoid copying timeseries when the feature is disabled

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Run gofmt

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Clarify docs

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Add more logging info

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Remove loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* optimize function and add tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Simplify filter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Update help info from metrics

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use metrics to keep track of drop elements during buildWriteRequest

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var in tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* pass time.Now as parameter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Change buildwriterequest during retries

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Revert "Remove loggers"

This reverts commit 54f91dfcae20488944162335ab4ad8be459df1ab.

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use log level debug for loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Fix linter

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove noisy debug-level logs; add 'reason' label to drop metrics

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove accidentally committed files

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Propagate logger to buildWriteRequest to log dropped data

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix docs comment

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Make drop reason more specific

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove unnecessary pass of logger

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Use snake_case for reason label

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix dropped samples metric

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

---------

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Co-authored-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2024-01-05 10:40:30 -08:00
Owen Williams f7159917a2 some content negotiation! 2024-01-05 10:49:45 -05:00
Owen Williams 1d8e6e8b6e Code was already working, added working tests 2024-01-05 10:49:32 -05:00
Owen Williams b5b4671548 debugging parser 2024-01-05 10:49:32 -05:00
Owen Williams 4658a7b02a Revert "Revert promql changes"
This reverts commit 78eb1623ec.
2024-01-05 10:49:32 -05:00
Owen Williams 597630a878 Revert promql changes
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-01-05 10:49:32 -05:00
Owen Williams fd219bc81c Start trying to write tests for promql 2024-01-05 10:49:32 -05:00
Owen Williams d8f92a1c95 cleanup and fix tests
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-01-05 10:49:32 -05:00
Owen Williams a64e10ef3a revert local go.mod changes
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-01-05 10:49:32 -05:00
Owen Williams a2bb70e046 Restore previous behavior where spaces between label terms are acceptable in Promparse
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-01-05 10:49:32 -05:00
Owen Williams 89d6d7d5c5 UTF-8: Add support for parsing UTF8 metric and label names
This adds support for the new grammar of `{"metric_name", "l1"="val",}`. This grammar will also be valid for non-UTF-8 names.
UTF-8 names will not be considered valid unless model.NameValidationScheme is changed.

Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-01-05 10:49:30 -05:00
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