Commit Graph

1831 Commits

Author SHA1 Message Date
Scott Quinlan 3e7139f3b9 feat: add nocache url parameter option
Signed-off-by: Scott Quinlan <scott@sitehost.co.nz>
2024-11-13 16:54:46 +13:00
PrometheusBot 13851e9287
Update common Prometheus files (#1683)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-12 20:02:43 +00:00
Ivan Goncharov a934c35951
Add: exponential backoff for CAS operations on floats (#1661)
* add: exponential backoff for CAS operations of floats

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>

* add: some more benchmark use cases (higher contention)

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>

* fmt: fumpted some files

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>

* add: license header

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>

* add: comment explaining origin of backoff constants

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>

---------

Signed-off-by: Ivan Goncharov <i.morph@gmail.com>
2024-11-11 16:26:17 +00:00
Matthieu MOREL bab92a7743
chore: enable usestdlibvars linter (#1680)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-11 15:19:33 +01:00
PrometheusBot 400ee29a10
Update common Prometheus files (#1679)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-11 15:09:29 +01:00
Arthur Silva Sens 2b11a4ba39
Merge pull request #1673 from imorph/faster_find_bucket
PERF: faster algorithm to discover bucket of an histogram observation
2024-11-08 07:22:56 -03:00
Matthieu MOREL fcfad5c0b9
[chore]: enable perfsprint linter (#1676) 2024-11-08 09:54:31 +01:00
github-actions[bot] 1aa11d0498
Merge pull request #1678 from prometheus/dependabot/github_actions/github-actions-99b3cd78cd
build(deps): bump the github-actions group across 1 directory with 3 updates
2024-11-08 08:49:44 +00:00
dependabot[bot] abfb25769f
build(deps): bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github).


Updates `actions/checkout` from 4.2.0 to 4.2.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...11bd71901b)

Updates `github/codeql-action` from 3.26.10 to 3.27.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e2b3eafc8d...662472033e)

Updates `dagger/dagger-for-github` from 6.11.0 to 6.14.0
- [Release notes](https://github.com/dagger/dagger-for-github/releases)
- [Commits](fc945fa66f...ad6a4e308a)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: dagger/dagger-for-github
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 08:42:37 +00:00
Ben Kochie 6de54aaefd
Merge pull request #1674 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2024-11-08 08:41:25 +00:00
Bartlomiej Plotka 02883cbc82
Merge pull request #1675 from mharbison72/issue-1660
process_collector: avoid a compiler warning on macOS (fixes #1660)
2024-11-08 00:52:32 +01:00
Matt Harbison 3c21cc0ecf process_collector: avoid a compiler warning on macOS (fixes #1660)
The header has a warning when included, with no way to shut it off, and no
alternative to obtain these symbols.  They're technically architecture specific
values, but they aren't different between amd64 and arm64, so combine the
definitions.

Signed-off-by: Matt Harbison <mharbison72@gmail.com>
2024-11-07 17:22:22 -05:00
prombot 8aea698d6a Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-05 17:47:44 +00:00
Ivan Goncharov 78d7a94e46 add: linear search implementation (+ benchmarks)
Signed-off-by: Ivan Goncharov <i.morph@gmail.com>
2024-11-04 20:26:59 +01:00
Arthur Silva Sens 0c73c1c554
Merge pull request #1672 from imorph/fix_summary_decay2
fix: use injected now() instead of time.Now() in summary methods
2024-11-03 11:02:21 -03:00
Ivan Goncharov 6d099da971 add: no skip in short mode for TestSummaryDecay
Signed-off-by: Ivan Goncharov <i.morph@gmail.com>
2024-11-03 14:12:24 +01:00
Ivan Goncharov 7877776aa6 fix: use injected now() instead of time.Now() in summary methods
Signed-off-by: Ivan Goncharov <i.morph@gmail.com>
2024-11-02 10:49:17 +01:00
Bartlomiej Plotka d3f28401b9
Merge pull request #1665 from jkroepke/BuildFQName
Optimize BuildFQName function
2024-11-01 20:13:02 +01:00
github-actions[bot] 769f6f63ec
Merge pull request #1670 from prometheus/dependabot/go_modules/google.golang.org/protobuf-1.35.1
build(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1
2024-11-01 11:27:00 +00:00
dependabot[bot] 5aa8222d4f
build(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1
Bumps google.golang.org/protobuf from 1.34.2 to 1.35.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 09:49:50 +00:00
github-actions[bot] 929900d3df
Merge pull request #1667 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.60.1
build(deps): bump github.com/prometheus/common from 0.59.1 to 0.60.1
2024-11-01 09:48:45 +00:00
dependabot[bot] 2c854c6e2f
build(deps): bump github.com/prometheus/common from 0.59.1 to 0.60.1
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.59.1 to 0.60.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md)
- [Commits](https://github.com/prometheus/common/compare/v0.59.1...v0.60.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 09:41:30 +00:00
github-actions[bot] efa3a8ca65
Merge pull request #1669 from prometheus/dependabot/go_modules/golang.org/x/sys-0.26.0
build(deps): bump golang.org/x/sys from 0.25.0 to 0.26.0
2024-11-01 09:40:57 +00:00
github-actions[bot] ce1dda18f1
Merge pull request #1668 from prometheus/dependabot/go_modules/github.com/klauspost/compress-1.17.11
build(deps): bump github.com/klauspost/compress from 1.17.10 to 1.17.11
2024-11-01 09:40:35 +00:00
dependabot[bot] 1580d47965
build(deps): bump golang.org/x/sys from 0.25.0 to 0.26.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/sys/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 09:33:25 +00:00
dependabot[bot] 1f09abb310
build(deps): bump github.com/klauspost/compress from 1.17.10 to 1.17.11
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.10 to 1.17.11.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.10...v1.17.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 09:33:21 +00:00
Jan-Otto Kröpke ece74f8b01
optimize BuildFQName function
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2024-10-31 14:09:19 +01:00
Bartlomiej Plotka aef8aedb4b
Merge pull request #1657 from Manask322/addHeadersRoundTripperExample
test add headers round tripper
2024-10-21 08:22:36 +02:00
manask322 547b8dae6f test add headers round tripper
Signed-off-by: manask322 <manask322@gmail.com>
2024-10-20 23:02:32 +05:30
Arthur Silva Sens e1675ced80
Merge pull request #1651 from prometheus/arianna-maintainer
Add Arianna as maintainer 💪
2024-10-15 10:01:20 -03:00
Arthur Silva Sens e265df7a36
Merge pull request #1647 from prometheus/release-1.20
Merge release 1.20 to main
2024-10-15 09:50:03 -03:00
Arthur Silva Sens ffcf34fec0
Add Arianna as maintainer 💪
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2024-10-15 09:36:59 -03:00
Bartlomiej Plotka 48e12a1855
Merge pull request #1645 from prometheus/cut-1204-pr1424
undefined
2024-10-15 11:44:04 +02:00
bwplotka 504ad9bf5c Cut 1.20.5; update comments.
Signed-off-by: bwplotka <bwplotka@gmail.com>

# Conflicts:
#	CHANGELOG.md
2024-10-14 21:56:44 +01:00
bwplotka 584a7ce3d9 Revert "testutil compareMetricFamilies: make less error-prone (#1424)"
This reverts commit c7c7509669.
2024-10-14 21:52:04 +01:00
Ying WANG 9c67f6190c
process_collector: Merge wasip1 and js into a single implementation (#1644)
Signed-off-by: Ying WANG <ying.wang@grafana.com>
2024-10-14 15:32:03 +01:00
Arthur Silva Sens 284ca0ff58
Optinally print OM created lines (#1408)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
Co-authored-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2024-10-14 15:31:13 +01:00
dependabot[bot] 93c851f0b3
build(deps): bump the github-actions group with 4 updates (#1634)
Bumps the github-actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action), [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github) and [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `actions/checkout` from 4.1.6 to 4.2.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.6...d632683dd7b4114ad314bca15554477dd762a938)

Updates `github/codeql-action` from 3.26.6 to 3.26.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...e2b3eafc8d)

Updates `dagger/dagger-for-github` from 6.6.0 to 6.11.0
- [Release notes](https://github.com/dagger/dagger-for-github/releases)
- [Commits](8ab204f3cf...fc945fa66f)

Updates `peter-evans/create-pull-request` from 6.1.0 to 7.0.5
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](c5a7806660...5e914681df)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: dagger/dagger-for-github
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-08 18:28:10 +01:00
PrometheusBot ae6e5d0fe2
Update common Prometheus files (#1635)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-10-08 18:27:35 +01:00
Ying WANG b2ef833442
process_collector: Add Platform-Specific Describe for processCollector (#1625)
* process_collector: Add Platform-Specific Describe for processCollector

Signed-off-by: Ying WANG <ying.wang@grafana.com>

* add changelog entry

Signed-off-by: Ying WANG <ying.wang@grafana.com>

* Address comments

Signed-off-by: Ying WANG <ying.wang@grafana.com>

---------

Signed-off-by: Ying WANG <ying.wang@grafana.com>
2024-10-07 12:08:32 +02:00
github-actions[bot] a9c0488390
Merge pull request #1632 from prometheus/dependabot/go_modules/golang.org/x/sys-0.25.0
build(deps): bump golang.org/x/sys from 0.24.0 to 0.25.0
2024-10-01 09:30:05 +00:00
github-actions[bot] 38fb2b1818
Merge pull request #1633 from prometheus/dependabot/go_modules/github.com/klauspost/compress-1.17.10
build(deps): bump github.com/klauspost/compress from 1.17.9 to 1.17.10
2024-10-01 09:29:50 +00:00
dependabot[bot] cb4b0c6a9d
build(deps): bump github.com/klauspost/compress from 1.17.9 to 1.17.10
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.9 to 1.17.10.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.9...v1.17.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 09:22:25 +00:00
dependabot[bot] 9cd37f90ea
build(deps): bump golang.org/x/sys from 0.24.0 to 0.25.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/sys/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 09:22:16 +00:00
Matt Harbison 25bda7ceb5
process_collector: fill in virtual and resident memory values on macOS using optional cgo (#1616)
Unfortunately, these values aren't available from getrusage(2), or any other
builtin Go API.  Go itself doesn't provide a mechanism (like on Windows) to call
into system libraries.  Using a 3rd party package[1] to dynamically call system
libraries was proposed and rejected, to avoid adding to the number of
dependencies.  That leaves using cgo, which is used here when available.  When
not available (either because of cross compiling or explicitly disabling it), a
stub function is linked instead, and the metrics are not exported.  That way,
cross compiling of other platforms is unaffected (and can also still be done
with Darwin too, but at the cost of not exporting these metrics).

Note that building an amd64 image on an arm64 mac or vice-versa is cross
compiling, and will use the stub method by default.  This can be avoided by
setting `CGO_ENABLED=1` in the environment to force the use of cgo for both
architectures.

I'm unsure of the usefulness of the potential adjustment made to the virtual
memory value after calling `mach_vm_region()`.  I've not seen that code get run
with a native amd64 or arm64 image, or with an amd64 image running under
Rosetta.  But that's what the `ps(1)` command does, and I think we should report
what the system tools do.

When I was testing this on a beta of macOS 15 with Go 1.21.13 (the current
minimum support for this module), the amd64 image ran fine under Rosetta, but
the arm64 image immediately printed a message that it was killed, even prior to
the cgo call.  This seems to be a recurring issue on macOS[2][3], and passing
`-ldflags -s` to `go build` avoided the issue.  Go 1.23.1 worked out of the box,
without fiddling with linker flags, so I don't think this is an issue- Go 1.21
is simply too old to support macOS 15, but I thought it was worth noting.  I
supposed we could gate the cgo code with an additional build flag, if anyone is
concerned about this.

[1] https://github.com/ebitengine/purego
[2] https://github.com/golang/go/issues/19841#issuecomment-293334802
[3] https://github.com/golang/go/issues/11887#issuecomment-125694604

Signed-off-by: Matt Harbison <mharbison72@gmail.com>
2024-09-27 17:29:44 +01:00
PrometheusBot 86f3496868
Update common Prometheus files (#1628)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-09-23 15:02:05 +01:00
Arianna Vespri ff60566f1b
Refactor default runtime metrics tests for Go collector so that default runtime metric set autogenerates (#1631)
* Enable autogeneration for default runtime metrics list in collectors tests according to Go version

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Adapt withDefaultRuntimeMetrics function to work regardless of the Go version

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Autogenerate go collector test for go1.23

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Modify gen_go_collector_set.go to please linter and regenerate files

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Simplify gen_go_collector_set.go logic by modifying func computeMetricsList

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Slight simplification of withDefaultRuntimeMetrics func

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Refactor withDefaultRuntimeMetrics with generated default runtime metrics subsets

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

---------

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
2024-09-23 14:55:38 +01:00
Arthur Silva Sens 64158c5c00
Merge pull request #1626 from ying-jeanne/add-example-for-customlabels
examples: Add custom labels example
2024-09-19 09:09:16 +01:00
Ying WANG 86cdda8cb1
Merge branch 'main' into add-example-for-customlabels 2024-09-18 09:22:59 +02:00
Ying WANG 6efd27deef
Update examples/customlabels/main.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Ying WANG <74549700+ying-jeanne@users.noreply.github.com>
2024-09-18 09:20:45 +02:00