Commit Graph

1601 Commits

Author SHA1 Message Date
github-actions[bot] 13a208d0b3
Merge pull request #1366 from prometheus/dependabot/go_modules/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.15.0 to 0.17.0
2023-10-19 18:36:58 +00:00
Björn Rabenstein cd8cba2ceb
histograms: Add timer to reset ASAP after bucket limiting has happened (#1367)
Fixes #1248. See issue description for all the details.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-19 14:22:02 +01:00
dependabot[bot] 5046a13c60
Bump golang.org/x/net from 0.15.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 22:44:18 +00:00
github-actions[bot] c3e797ebb3
Merge pull request #1365 from prometheus/dependabot/go_modules/tutorial/whatsup/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.10.0 to 0.17.0 in /tutorial/whatsup
2023-10-11 22:43:28 +00:00
dependabot[bot] 5b7580751a
Bump golang.org/x/net from 0.10.0 to 0.17.0 in /tutorial/whatsup
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 22:40:53 +00:00
João Vilaça 60a85133ed
Add support for custom validations in promlint (#1311)
* Refactor promlint validation structure

Signed-off-by: João Vilaça <jvilaca@redhat.com>

* Add support for custom validations in promlint

Signed-off-by: João Vilaça <jvilaca@redhat.com>

* Keep backwards compatibility

Signed-off-by: João Vilaça <jvilaca@redhat.com>

---------

Signed-off-by: João Vilaça <jvilaca@redhat.com>
2023-10-10 10:38:10 +01:00
Jorge Alberto Díaz Orozco (Akiel) 486d514e63
Update dependency golang.org/x/net to v0.15.0 (#1342)
to use a version of the package not affected by [CVE-2023-3978](https://www.cve.org/CVERecord?id=CVE-2023-3978)

Other indirect upgrades
golang.org/x/sys v0.11.0 => v0.12.0
golang.org/x/text v0.9.0 => v0.13.0

Signed-off-by: Jorge Alberto Diaz Orozco (Akiel) <diazorozcoj@gmail.com>
Signed-off-by: Jorge Alberto Díaz Orozco (Akiel) <diazorozcoj@gmail.com>
2023-10-10 09:48:25 +01:00
Stephan Renatus 64e51f50df
proccess_collector: add wasip1 stub (#1350)
* proccess_collector: add wasip1 stub

This resolves build failures like this when using the wasip1 support:

    # github.com/prometheus/procfs
    ../../../go/pkg/mod/github.com/prometheus/procfs@v0.11.1/fs_statfs_type.go:25:18: undefined: syscall.Statfs_t
    ../../../go/pkg/mod/github.com/prometheus/procfs@v0.11.1/fs_statfs_type.go:26:17: undefined: syscall.Statfs

See https://go.dev/blog/wasi.

Signed-off-by: Stephan Renatus <stephan@styra.com>

* add build tags

Signed-off-by: Stephan Renatus <stephan@styra.com>

---------

Signed-off-by: Stephan Renatus <stephan@styra.com>
2023-10-10 09:46:36 +01:00
Bartlomiej Plotka d81c33f6ad
Update MAINTAINERS.md (#1362)
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2023-10-05 14:14:58 +01:00
PrometheusBot 1803eb906e
Update common Prometheus files (#1361)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-10-05 14:08:54 +01:00
Arthur Silva Sens 51714a5a30
Merge pull request #1360 from colega/improve-performance-of-with-label-values
Improve performance of WithLabelValues(...)
2023-10-05 09:26:24 -03:00
Oleg Zaytsev 005d8de006
Improve performance of WithLabelValues(...)
The slice with variadic arguments passed to MetricVec.WithLabelValues()
was escaping to heap. This change fixes that by performing a copy of the
slice before passing it to fmt.Errorf(), which is where the slice was
escaping. This keeps the hot path without that allocation.

Meaningful benchmark results (skipping ~0 CPU and 0 alloc ones):

                                                               │    old.txt    │               new.txt                │
                                                               │    sec/op     │    sec/op     vs base                │
Counter/With_Label_Values-16                                     108.00n ±  6%   58.06n ±  1%  -46.24% (p=0.000 n=10)
Counter/With_Label_Values_and_Constraint-16                       174.5n ± 15%   136.8n ±  6%  -21.63% (p=0.000 n=10)
Counter/With_triple_Label_Values-16                               309.3n ± 12%   172.9n ±  1%  -44.08% (p=0.000 n=10)
Counter/With_triple_Label_Values_and_Constraint-16                591.5n ± 11%   418.9n ±  3%  -29.17% (p=0.000 n=10)
Counter/With_repeated_Label_Values-16                             212.9n ± 10%   116.8n ± 23%  -45.16% (p=0.000 n=10)
Counter/With_repeated_Label_Values_and_Constraint-16              406.2n ± 14%   275.1n ±  4%  -32.30% (p=0.000 n=10)
CounterWithLabelValuesConcurrent-16                               85.45n ±  2%   89.09n ±  2%   +4.26% (p=0.003 n=10)

                                                               │    old.txt     │                  new.txt                  │
                                                               │      B/op      │     B/op      vs base                     │
Counter/With_Label_Values-16                                       48.00 ± 0%        0.00 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_Label_Values_and_Constraint-16                        96.00 ± 0%       48.00 ± 0%   -50.00% (p=0.000 n=10)
Counter/With_triple_Label_Values-16                                144.0 ± 0%         0.0 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_triple_Label_Values_and_Constraint-16                 288.0 ± 0%       144.0 ± 0%   -50.00% (p=0.000 n=10)
Counter/With_repeated_Label_Values-16                              96.00 ± 0%        0.00 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_repeated_Label_Values_and_Constraint-16              192.00 ± 0%       96.00 ± 0%   -50.00% (p=0.000 n=10)
CounterWithLabelValuesConcurrent-16                                48.00 ± 0%        0.00 ± 0%  -100.00% (p=0.000 n=10)

                                                               │   old.txt    │                 new.txt                 │
                                                               │  allocs/op   │ allocs/op   vs base                     │
Counter/With_Label_Values-16                                     1.000 ± 0%     0.000 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_Label_Values_and_Constraint-16                      2.000 ± 0%     1.000 ± 0%   -50.00% (p=0.000 n=10)
Counter/With_triple_Label_Values-16                              3.000 ± 0%     0.000 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_triple_Label_Values_and_Constraint-16               6.000 ± 0%     3.000 ± 0%   -50.00% (p=0.000 n=10)
Counter/With_repeated_Label_Values-16                            2.000 ± 0%     0.000 ± 0%  -100.00% (p=0.000 n=10)
Counter/With_repeated_Label_Values_and_Constraint-16             4.000 ± 0%     2.000 ± 0%   -50.00% (p=0.000 n=10)
CounterWithLabelValuesConcurrent-16                              1.000 ± 0%     0.000 ± 0%  -100.00% (p=0.000 n=10)

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-04 18:09:15 +02:00
github-actions[bot] dac14aae41
Merge pull request #1356 from prometheus/dependabot/go_modules/github.com/prometheus/procfs-0.12.0
Bump github.com/prometheus/procfs from 0.11.1 to 0.12.0
2023-10-04 14:54:05 +00:00
dependabot[bot] 87a016c909
Bump github.com/prometheus/procfs from 0.11.1 to 0.12.0
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.11.1...v0.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-04 14:51:07 +00:00
github-actions[bot] 556bf30066
Merge pull request #1357 from prometheus/dependabot/go_modules/golang.org/x/sys-0.12.0
Bump golang.org/x/sys from 0.11.0 to 0.12.0
2023-10-04 14:50:12 +00:00
dependabot[bot] 7004b66eda
Bump golang.org/x/sys from 0.11.0 to 0.12.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/sys/compare/v0.11.0...v0.12.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>
2023-10-04 14:47:05 +00:00
Arthur Silva Sens 22540dc438
Configure CI to automerge dependabot PRs (#1359)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-04 15:41:39 +01:00
Arthur Silva Sens 4c10365899
Merge pull request #1358 from prometheus/dependabot/go_modules/tutorial/whatsup/github.com/prometheus/client_golang-1.17.0
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 in /tutorial/whatsup
2023-10-02 14:28:43 +02:00
Arthur Silva Sens 40c7d2fa8b
Merge pull request #1355 from prometheus/dependabot/go_modules/examples/middleware/github.com/prometheus/client_golang-1.17.0
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 in /examples/middleware
2023-10-02 14:28:30 +02:00
dependabot[bot] 1844c50e03
Bump github.com/prometheus/client_golang in /tutorial/whatsup
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.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.16.0...v1.17.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-10-01 09:55:17 +00:00
dependabot[bot] e43edfcedc
Bump github.com/prometheus/client_golang in /examples/middleware
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.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.16.0...v1.17.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-10-01 09:13:35 +00:00
Arthur Silva Sens 3278043c6d
Add changelog entry for 1.17 (#1353)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-09-30 10:23:27 +01:00
Oleksandr Redko 1bae6c1e63
Deprecated comment should begin with "Deprecated:" (#1347)
See https://go.dev/blog/godoc

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-09-21 12:31:45 +01:00
Oleksandr Redko bbab8fe770
Fix typos in comments, tests, and errors (#1346)
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-09-21 12:31:08 +01:00
Arthur Silva Sens df7fa49417
Extend Counters, Summaries and Histograms with creation timestamp (#1313)
* Extend Counters, Summaries and Histograms with creation timestamp

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

* Backport created timestamp to existing tests

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

* Last touches (readability and consistency)

Changes:

* Comments for "now" are more explicit and not inlined.
* populateMetrics is simpler and bit more efficient without timestamp to time to timestamp conversionts for more common code.
* Test consistency and simplicity - the fewer variables the better.
* Fixed inconsistency for v2 and MetricVec - let's pass opt.now consistently.
* We don't need TestCounterXXXTimestamp - we test CT in many other places already.
* Added more involved test for counter vectors with created timestamp.
* Refactored normalization for simplicity.
* Make histogram, summaries now consistent.
* Simplified histograms CT flow and implemented proper CT on reset.

TODO for next PRs:
* NewConstSummary and NewConstHistogram - ability to specify CTs there.

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

* Update prometheus/counter_test.go

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

---------

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: bwplotka <bwplotka@gmail.com>
2023-09-21 10:46:54 +01:00
Oleksandr Redko 74cc26257c
Add go_godebug_non_default_behavior_tlsmaxrsasize_events_total (#1348)
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-09-21 10:46:14 +01:00
Ben Kochie d03abf3a31
Cleanup golangci-lint errcheck (#1339)
Move the errcheck excludes list from an external file to inline in the golangci-lint config file.

Signed-off-by: SuperQ <superq@gmail.com>
2023-09-03 18:34:37 +01:00
PrometheusBot ca6ba04f2f
Update common Prometheus files (#1338)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-09-03 18:34:10 +01:00
PrometheusBot 51d24f8680
Update common Prometheus files (#1332)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-08-15 09:39:13 +02:00
Ben Kochie c17edf09ed
Merge pull request #1304 from prometheus/dependabot/go_modules/google.golang.org/protobuf-1.31.0
Bump google.golang.org/protobuf from 1.30.0 to 1.31.0
2023-08-14 22:18:20 +02:00
dependabot[bot] 8483c5dab8
Bump google.golang.org/protobuf from 1.30.0 to 1.31.0
Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
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>
2023-08-14 14:54:09 +00:00
Ben Kochie 760a55a415
Merge pull request #1330 from prometheus/dependabot/go_modules/tutorial/whatsup/github.com/prometheus/common-0.44.0
Bump github.com/prometheus/common from 0.42.0 to 0.44.0 in /tutorial/whatsup
2023-08-14 16:53:27 +02:00
Ben Kochie f58d0fd655
Merge pull request #1284 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.44.0
Bump github.com/prometheus/common from 0.42.0 to 0.44.0
2023-08-14 16:53:10 +02:00
dependabot[bot] 85f4592a0c
Bump github.com/prometheus/common from 0.42.0 to 0.44.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.42.0...v0.44.0)

---
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>
2023-08-14 13:46:29 +00:00
dependabot[bot] 802a963a20
Bump github.com/prometheus/common in /tutorial/whatsup
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.42.0...v0.44.0)

---
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>
2023-08-14 13:43:04 +00:00
Ben Kochie fa04b7b613
Merge pull request #1328 from prometheus/dependabot/go_modules/examples/middleware/github.com/prometheus/client_golang-1.16.0
Bump github.com/prometheus/client_golang from 1.13.1 to 1.16.0 in /examples/middleware
2023-08-14 15:41:41 +02:00
Ben Kochie adb018069e
Merge pull request #1329 from prometheus/dependabot/go_modules/tutorial/whatsup/github.com/prometheus/client_golang-1.16.0
Bump github.com/prometheus/client_golang from 1.15.1-0.20230416215738-0963f595c689 to 1.16.0 in /tutorial/whatsup
2023-08-14 15:41:19 +02:00
Ben Kochie 301a7bdb7f
Merge pull request #1331 from prometheus/dependabot/go_modules/golang.org/x/sys-0.11.0
Bump golang.org/x/sys from 0.10.0 to 0.11.0
2023-08-14 15:40:40 +02:00
dependabot[bot] f215f759c6
Bump golang.org/x/sys from 0.10.0 to 0.11.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/sys/compare/v0.10.0...v0.11.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>
2023-08-14 13:30:38 +00:00
dependabot[bot] 390448ff3c
Bump github.com/prometheus/client_golang in /tutorial/whatsup
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1-0.20230416215738-0963f595c689 to 1.16.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/commits/v1.16.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-08-14 13:30:30 +00:00
dependabot[bot] 0e33cf9a99
Bump github.com/prometheus/client_golang in /examples/middleware
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.1 to 1.16.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.13.1...v1.16.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-08-14 13:30:29 +00:00
Ben Kochie 4abd83d655
Update building (#1326)
* Remove unused / non-standard .go-version.
* Cleanup indenting in Makefile.
* Enable dependabot for subdirs.
* Update golanci-lint CI.
* Update go.mod version directives to match supported versions.
* Disable golanci-lint unused-parameter.

Signed-off-by: SuperQ <superq@gmail.com>
2023-08-14 15:29:51 +02:00
Bartlomiej Plotka 6f576e2c6f
histogram docs: Fixed minor nit. (#1324)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-08-13 14:11:06 +01:00
Arthur Silva Sens 1a88780343
Bump prometheus/client_model (#1323)
By upgrading prometheus/client_model, several test functions had to be re-written due to 2 breaking changes made in protobuf when parsing messages to text:
1. '<' and '>' characters were replaced with '{' and '}' respectively.
2. The text format is non-deterministic. More information in https://github.com/golang/protobuf/issues/1121

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-08-11 20:17:55 +01:00
Kemal Akkoyun 06d4592b1c
Add Go 1.21 support (#1325)
* Add Go 1.21 support

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update README.md

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

---------

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2023-08-11 12:27:52 +02:00
Björn Rabenstein cdd7f45dc5
Merge pull request #1322 from sengi/docs
docs: trivial grammar fixes to improve readability in promauto Godoc
2023-08-08 15:02:33 +02:00
Chris Banks f16b435f04
docs: trivial grammar fixes to improve readability
Fix a few typos / grammatical errors in the Godoc comments for promauto.
Only trivial stuff but slightly helps readability of the docs.

Signed-off-by: Chris Banks <chris.banks@digital.cabinet-office.gov.uk>
2023-08-05 11:41:47 +01:00
dependabot[bot] e6d9092baf
Bump github.com/prometheus/procfs from 0.11.0 to 0.11.1 (#1319)
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.11.0...v0.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/procfs
  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-08-01 18:56:09 +01:00
dependabot[bot] 99e905a3d5
Bump golang.org/x/sys from 0.9.0 to 0.10.0 (#1320)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/sys/compare/v0.9.0...v0.10.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 17:12:04 +01:00
ZiViZiViZ 23387fe2f4
Add missing tick "`" in README (#1321)
Cosmetic change

Signed-off-by: ZiViZiViZ <95288998+ZiViZiViZ@users.noreply.github.com>
2023-08-01 17:11:49 +01:00