Commit Graph

12055 Commits

Author SHA1 Message Date
Filip Petkovski 35f9620cd1
Expand benchmark
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-25 11:30:29 +01:00
Filip Petkovski 5df3820c7a
Copy last histogram point
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-25 11:20:51 +01:00
Filip Petkovski 1f69dcfa6b
Fix reusing float histograms
In https://github.com/prometheus/prometheus/pull/13276 we started reusing float histogram objects to reduce allocations in PromQL.
That PR introduces a bug where histogram pointers gets copied to the beginning of the histograms slice,
but are still kept in the end of the slice. When a new histogram is read into the last element,
it can overwrite a previous element because the pointer is the same.

This commit fixes the issue by moving outdated points to the end of the slice
so that we don't end up with duplicate pointers in the same buffer. In other words,
the slice gets rotated so that old objects can get reused.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-14 11:53:58 +01:00
Arthur Silva Sens 69abd6d9f6
Document feature flag 'created-timestamp-zero-ingestion' (#13279)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-12-13 15:12:50 +00:00
Björn Rabenstein 775de1a3bd
Merge pull request #13276 from fpetkovski/reuse-float-histograms
Reuse float histogram objects
2023-12-13 13:43:01 +01:00
daniel-resdiary 103133124a
Get VM Scale Set NIC (#13283)
Calling `*armnetwork.InterfacesClient.Get()` doesn't work for Scale Set
VM NIC, because these use a different Resource ID format.

Use `*armnetwork.InterfacesClient.GetVirtualMachineScaleSetNetworkInterface()`
instead.  This needs both the scale set name and the instance ID, so
add an `InstanceID` field to the `virtualMachine` struct.  `InstanceID`
is empty for a VM that isn't a ScaleSetVM.

Signed-off-by: Daniel Nicholls <daniel.nicholls@resdiary.com>
2023-12-13 12:38:16 +00:00
Filip Petkovski ea356c472e
Add comment on SampleRingIterator methods
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-13 08:35:02 +01:00
Filip Petkovski bb8363dbb3
Add comment on SampleRingIterator
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-13 08:30:02 +01:00
Bryan Boreham d0c2d9c0b9
Merge pull request #12878 from bboreham/loser-tree
postings: use Loser Tree for merge
2023-12-12 21:38:30 +00:00
Björn Rabenstein 9825a80498
Merge pull request #13023 from ptodev/prefer-to-not-register-metrics-globally-sd
Allow non-default registry to be used for metrics of SD components
2023-12-12 17:58:36 +01:00
Björn Rabenstein 669cad6e6e
Merge pull request #13205 from aknuds1/arve/typos
`chunks.Reader`: Fix typo in `ChunkOrIterable` doc string
2023-12-12 13:27:53 +01:00
Björn Rabenstein 4b55a71210
Merge pull request #11583 from windsonsea/story
Tweak line wrappings in docs/storage.md
2023-12-12 12:31:02 +01:00
Björn Rabenstein 928d07e3bd
Merge branch 'main' into arve/typos
Signed-off-by: Björn Rabenstein <beorn@grafana.com>
2023-12-12 12:02:03 +01:00
Giedrius Statkevičius f36b56a62c
tsdb: remove unused option (#13282)
Digging around the TSDB code and I've found that this flag is unused so
let's remove it.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2023-12-12 09:58:54 +00:00
Ben Kochie 91117cb987
Merge pull request #13269 from prometheus/superq/sync_golangci
Sync golangci-lint version
2023-12-11 15:48:06 +01:00
Paulin Todev d2e997030e
Fix linter issues
Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 14:28:37 +00:00
Paulin Todev 27bb57a37b
Define metric label values in one place
Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 13:39:01 +00:00
Paulin Todev 108a749a45
Set up labels for counters in advance
Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 13:39:00 +00:00
Ben Kochie acc7b3b534
Merge pull request #13155 from mmorel-35/tsdb
tsdb: use Go standard errors
2023-12-11 14:13:11 +01:00
Matthieu MOREL 8f6cf3aabb tsdb: use Go standard errors
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-11 12:18:54 +00:00
Paulin Todev 6279497124
Remove unnecessary else.
This was flagged by the linter.

Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 11:14:27 +00:00
Paulin Todev 6a5306a53c
Use const labels for Discovery Manager metrics.
Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 11:14:27 +00:00
Paulin Todev 6de80d7fb0
Allow non-default registry to be used for metrics of SD components
Signed-off-by: Paulin Todev <paulin.todev@gmail.com>
2023-12-11 11:14:26 +00:00
Filip Petkovski 48df9fc020
Export SampleRingIterator
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-11 11:18:08 +01:00
Arthur Silva Sens 5082655392
Append Created Timestamps (#12733)
* Append created timestamps.

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>

* Log when created timestamps are ignored

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>

* Proposed changes to Append CT PR.

Changes:

* Changed textparse Parser interface for consistency and robustness.
* Changed CT interface to be more explicit and handle validation.
* Simplified test, change scrapeManager to allow testability.
* Added TODOs.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Updates.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Addressed comments.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Refactor head_appender test

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>

* Fix linter issues

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>

* Use model.Sample in head appender test

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>

---------

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
Co-authored-by: bwplotka <bwplotka@gmail.com>
2023-12-11 08:43:42 +00:00
Filip Petkovski e2a9f8ac0f
Reuse float histogram objects
This commit reduces the memory needed to query native histogram objects
by reusing existing HPoint instances.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-11 08:24:58 +01:00
Björn Rabenstein db915b07cb
Merge pull request #13215 from fpetkovski/float-histogram-reuse
Enable reusing memory when converting between histogram types
2023-12-09 22:44:46 +01:00
Bryan Boreham ab3a47b489 postings: use Loser Tree for merge
It's faster.

Note change to test - instead of requiring that the data structure is
identical to `EmptyPostings()`, check that calling `Next()` returns
false, which implies it was empty.

Also the check for context cancellation during initialization was
removed. Initialization should be a small portion of the work done
during merge, so it's not worth plumbing a context argument through.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-08 16:07:25 +00:00
Bryan Boreham ee700151a3 tsdb/index: add benchmark for Postings.Merge
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-08 16:00:22 +00:00
Bartlomiej Plotka 91a383f52c
Merge pull request #13059 from zenador/add-mad-function
Add mad_over_time function
2023-12-08 11:53:22 +00:00
SuperQ acbaee8c9d
Sync golangci-lint version
Update `scripts/golangci-lint.yml` golangci-lint version to match
main workflow.
* Add note to keep things in sync.

Signed-off-by: SuperQ <superq@gmail.com>
2023-12-08 11:01:38 +01:00
Filip Petkovski 9008271df5
Use cap to determine slice capacity
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-08 10:23:01 +01:00
Filip Petkovski 10a82f87fd
Enable reusing memory when converting between histogram types
The 'ToFloat' method on integer histograms currently allocates new memory
each time it is called.

This commit adds an optional *FloatHistogram parameter that can be used
to reuse span and bucket slices. It is up to the caller to make sure the
input float histogram is not used anymore after the call.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2023-12-08 10:22:59 +01:00
dependabot[bot] 48b1818ee8
build(deps-dev): bump @types/node from 17.0.45 to 20.10.4 in /web/ui (#13260)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.45 to 20.10.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  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>
2023-12-08 09:19:48 +00:00
Ben Kochie 1b92d5a341
Merge pull request #13228 from prometheus/dependabot/github_actions/dessant/lock-threads-5.0.1
build(deps): bump dessant/lock-threads from 4.0.1 to 5.0.1
2023-12-07 21:50:04 +01:00
Ben Kochie 66374f564c
Merge pull request #13229 from prometheus/dependabot/github_actions/github/codeql-action-2.22.8
build(deps): bump github/codeql-action from 2.22.5 to 2.22.8
2023-12-07 21:48:29 +01:00
Ben Kochie 2944381251
Merge pull request #13230 from prometheus/dependabot/github_actions/bufbuild/buf-setup-action-1.28.1
build(deps): bump bufbuild/buf-setup-action from 1.26.1 to 1.28.1
2023-12-07 21:47:55 +01:00
Björn Rabenstein 85078b968f
Merge pull request #13208 from linasm/panic-free-float-histogram-add-sub
FloatHistogram.Add/Sub: handle any schema change
2023-12-07 20:12:21 +01:00
Björn Rabenstein de1ec731c7
Merge pull request #13212 from linasm/optimize-floatBucketIterator-for-common-case
Histograms: optimize floatBucketIterator for common case
2023-12-07 20:11:58 +01:00
Linas Medziunas bd895baefc FloatHistogram.Add/Sub: handle any schema change
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-12-07 20:50:54 +02:00
Björn Rabenstein 7c8035a251
Merge pull request #13259 from vesari/add-unit
protobuf: add unit to metric family message
2023-12-07 17:29:32 +01:00
Bartlomiej Plotka f9ecc0d5b5
Updated main and example Go dependencies. (#13255)
Pre step for 2.49-rc.0

Added cmd for documentation module update due to https://github.com/prometheus/prometheus/security/dependabot/92 & other similar alerts.

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-12-07 15:56:30 +00:00
Ben Kochie 044c8e8958
Merge pull request #13236 from prometheus/dependabot/go_modules/go-opentelemetry-io-be5b6ce82a
build(deps): bump the go-opentelemetry-io group with 7 updates
2023-12-07 16:19:31 +01:00
SuperQ d91ebffb30
Update deprecated otel functions
Use new `noop.NewTracerProvider` function.

Signed-off-by: SuperQ <superq@gmail.com>
2023-12-07 15:50:21 +01:00
Ben Kochie 7502d04935
Merge pull request #13237 from prometheus/dependabot/go_modules/github.com/linode/linodego-1.25.0
build(deps): bump github.com/linode/linodego from 1.24.0 to 1.25.0
2023-12-07 15:45:04 +01:00
Ben Kochie 1bb13626b2
Merge pull request #13235 from prometheus/dependabot/go_modules/k8s-io-5fd27ec905
build(deps): bump the k8s-io group with 2 updates
2023-12-07 15:44:01 +01:00
Bartlomiej Plotka bc4f8366c5
Upgraded npm dependencies pre 2.49-rc.0 (#13256)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-12-07 14:43:15 +00:00
Ben Kochie b718ec8294
Merge pull request #13239 from prometheus/dependabot/go_modules/github.com/digitalocean/godo-1.106.0
build(deps): bump github.com/digitalocean/godo from 1.104.1 to 1.106.0
2023-12-07 15:33:00 +01:00
Ben Kochie 8590c2b56c
Merge pull request #13257 from prometheus/superq/mod_versions
Add test of Go module versions
2023-12-07 15:26:42 +01:00
dependabot[bot] 2ada971de2
build(deps): bump github.com/linode/linodego from 1.24.0 to 1.25.0
Bumps [github.com/linode/linodego](https://github.com/linode/linodego) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/linode/linodego/releases)
- [Commits](https://github.com/linode/linodego/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: github.com/linode/linodego
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 13:52:41 +00:00