Commit Graph

1489 Commits

Author SHA1 Message Date
Bartlomiej Plotka 3583c1e1d0
Cut v1.16.0 (#1292)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-06-15 11:46:32 +01:00
Bartlomiej Plotka 2feda42e44
Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. (#1289)
* Fixed README; Added fmt command for easier contributions.

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

* Updated golint.

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

* Update Makefile

Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
2023-06-13 14:54:49 +01:00
Björn Rabenstein 5b9cf9c6a8
Merge pull request #1290 from prometheus/fix-nh-docstring-refs
Fix docstring references to renamed native histogram fields / functions.
2023-06-13 15:54:22 +02:00
Julius Volz 1b19d5f458 Fix docstring references to renamed native histogram fields / functions.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-06-13 10:36:40 +02:00
Bartlomiej Plotka 7352ab7f80
Moving fully to GH actions. (#1288)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-06-08 12:44:53 +01:00
Aviv Litman e4ff34d23e
Improve metricUnits runtime (#1286)
We tested this function runtime in both cases using "testing",
and the runtime for this pr is much shorter.

Signed-off-by: alitman <alitman@redhat.com>
2023-06-08 11:35:32 +01:00
Krishna Dutt Panchagnula 781ea28024
added circleci as gh action YAML (#1281)
* added circleci as gh action YAML

Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com>

* merged all changes into one

Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com>

---------

Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com>
2023-06-08 10:51:42 +01:00
Bulat Khasanov a09a1d34cb
Reduce constrainLabels allocations (#1272)
* Add bench

Signed-off-by: Bulat Khasanov <afti@yandex.ru>

* Reduce constrainLabels allocations

Signed-off-by: Bulat Khasanov <afti@yandex.ru>

---------

Signed-off-by: Bulat Khasanov <afti@yandex.ru>
2023-06-07 08:39:02 +01:00
dependabot[bot] 8840afcfc2
Bump github.com/prometheus/procfs from 0.9.0 to 0.10.1 (#1283)
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.9.0 to 0.10.1.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.9.0...v0.10.1)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-07 08:12:43 +01:00
Björn Rabenstein 5e78d5f66b
Merge pull request #1279 from prometheus/beorn7/histogram
Fix bug in bucket key calculation
2023-05-29 00:09:18 +02:00
Han Kang b8cb86a865
add process start time header to client_golang prometheus (#1278)
* add process start time header to client_golang prometheus

Signed-off-by: Han Kang <hankang@google.com>

* Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Han Kang <hankang@google.com>

* fix up changes due to incorporation of feedback

* fix lint issues

---------

Signed-off-by: Han Kang <hankang@google.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2023-05-26 12:58:36 +01:00
beorn7 77e97da564 histogram: Fix bug in bucket key calculation
The current code doesn't work fork negative schemas if the observed
value should go into a bucket with a non-positive key.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-05-25 19:03:43 +02:00
beorn7 30948120dc histogram: expose bug in bucket key calculation
The current code doesn't work fork negative schemas if the observed
value should go into a bucket with a non-positive key.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-05-25 19:02:28 +02:00
Alex 8b1a836e7d
GitHub Workflows security hardening (#1180)
* build: harden golangci-lint.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* Update golangci-lint.yml

Signed-off-by: Alex <aleksandrosansan@gmail.com>

---------

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2023-05-17 11:39:40 +02:00
Kemal Akkoyun f51d823bda
Merge pull request #1267 from prometheus/release-1.15
Merge release 1.15.1 to main
2023-05-17 11:37:25 +02:00
Bartlomiej Plotka 4bbb297e54
Cut 1.15.1 (#1266)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-05-03 10:48:04 +01:00
PiotrLewandowski323 297fea317b
fix undefined execution order in return statements (#1260)
Signed-off-by: Piotr Lewandowski <lewandowski323@gmail.com>
2023-05-03 10:25:51 +01:00
Martijn Evers 0f060a0277
Add detection for WSL address (#1257)
Signed-off-by: Evers, Martijn <mevers@gk-software.com>
2023-05-03 09:52:46 +01:00
Bartlomiej Plotka 2eaffbdb02
Merge pull request #1253 from prometheus/fixpro
Fixed promhttp Instrument* handlers.
2023-05-03 10:50:04 +02:00
Ben Kochie 8a51463540
Cleanup proto use in tests (#1264)
Switch tests over to new proto libary, eliminating the direct dependency
on the old proto library. Note the indirect requirement is still needed
due to upstream use by the client_model package.

Related: https://github.com/prometheus/client_golang/issues/1175

Signed-off-by: SuperQ <superq@gmail.com>
2023-05-03 09:46:41 +01:00
dependabot[bot] 0ae00134d8
Bump golang.org/x/sys from 0.6.0 to 0.7.0 (#1265)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.7.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-05-03 09:45:35 +01:00
bwplotka b8fdd239b2 Added clarification.
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-05-03 09:41:34 +01:00
bwplotka 2ea234eef0 Revert "Remove unnecessary check if label is nil in observeWithExemplar (#1235)"
This reverts commit 3ce88f33d1.

Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-05-03 09:41:26 +01:00
Bartlomiej Plotka 671a2f0568
Fixed tutorial. (#1256)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-04-21 14:23:45 +01:00
Bartlomiej Plotka 90eb83b690
Added interactive tutorial [kubeCon] (#1255)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-04-21 13:16:14 +01:00
Max Coplan c36c6abb8d
[collectors]: fix typo in test assertion (#1153)
Signed-off-by: Max 👨🏽‍💻 Coplan Max.Coplan@walmart.com

Signed-off-by: Max 👨🏽‍💻 Coplan Max.Coplan@walmart.com
Co-authored-by: Max 👨🏽‍💻 Coplan <Max.Coplan@walmart.com>
2023-04-17 21:35:49 +01:00
Thomas Jackson 0392dffd0e
Switch to POST for LabelNames, Series, and QueryExemplars to DoGetFallback (#1252)
The upstream prometheus HTTP API supports POSTS for these methods (the
same as Query and QueryRange). Similar to the original issue
(https://github.com/prometheus/client_golang/issues/428) we can hit 414
errors with these other APIs. This change simply duplicates the logic to
these other endpoints

Related to: https://github.com/jacksontj/promxy/issues/588

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
2023-04-16 13:41:34 +01:00
Kemal Akkoyun e3b6de8c3d
Merge pull request #1250 from prometheus/release-1.15 2023-04-13 14:15:17 +02:00
Bartlomiej Plotka d7896d4bd0
Cut v1.15.0 (#1249)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-04-13 12:51:09 +02:00
dependabot[bot] bba12b5514
Bump github.com/prometheus/common from 0.41.0 to 0.42.0 (#1244)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.41.0...v0.42.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 10:57:59 +01:00
dependabot[bot] 9015fcfc2c
Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (#1245)
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  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-04-13 10:57:49 +01:00
dependabot[bot] 1bb8cf8306
Bump golang.org/x/sys from 0.5.0 to 0.6.0 (#1246)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.5.0...v0.6.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-04-13 10:41:40 +01:00
Ben Kochie ff7efedd43
Merge pull request #1243 from prometheus/dependabot/go_modules/google.golang.org/protobuf-1.30.0
Bump google.golang.org/protobuf from 1.28.1 to 1.30.0
2023-04-01 12:21:01 +02:00
dependabot[bot] 852a282f10
Bump google.golang.org/protobuf from 1.28.1 to 1.30.0
Bumps google.golang.org/protobuf from 1.28.1 to 1.30.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-04-01 09:58:51 +00:00
Bartlomiej Plotka 63a3955992
Merge pull request #1238 from jacksontj/issue_621
Only set start/end if time is not Zero
2023-03-22 14:54:16 +01:00
Daria Bialobrzeska eb339714f5
Filter expected metrics as well in CollectAndCompare (#1143)
* Filter expected metrics as well in CollectAndCompare

Signed-off-by: Daria Danilenko <daria.danilenko@fluxninja.com>

* Add testcase for multiple expected metrics
Signed-off-by: Daria Danilenko <daria.danilenko@fluxninja.com>

* Change test values for filtering multiple expected metrics
Signed-off-by: Daria Danilenko <daria.danilenko@fluxninja.com>

---------

Signed-off-by: Daria Danilenko <daria.danilenko@fluxninja.com>
2023-03-22 10:45:45 +00:00
PrometheusBot 5c7821d84a
Update common Prometheus files (#1237)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-03-22 09:46:56 +01:00
Thomas Jackson 603786389c Only set start/end if time is not Zero
This is an updated PR of #615 -- based on discussion in #621

Fixes #621

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
2023-03-21 13:10:58 -07:00
Bartlomiej Plotka e79d7e71ce
timer: Added support for exemplars. (#1233)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-03-21 19:35:31 +00:00
Bartlomiej Plotka 232b949d1f
Added support for go 1.20. (#1234)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2023-03-21 13:46:37 +00:00
Bartlomiej Plotka 3726cddba6
README: Remove not working gocoverage images. (#1236)
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2023-03-21 14:31:59 +01:00
dimonl 3ce88f33d1
Remove unnecessary check if label is nil in observeWithExemplar (#1235)
* Remove unnecessary check if label is nil in observeWithExemplar instrumentation

Signed-off-by: dlituyev <dlituyev@slb.com>

* Remove unnecessary check if label is nil in observeWithExemplar instrumentation

Signed-off-by: dlituyev <dlituyev@slb.com>

---------

Signed-off-by: dlituyev <dlituyev@slb.com>
Co-authored-by: dlituyev <dlituyev@slb.com>
2023-03-20 10:23:36 +01:00
Jon Kartago Lamida 3d2cf0b338
Indent example in godoc consistently (#1226)
* Indent example in godoc consistently

Signed-off-by: Jon Kartago Lamida <me@lamida.net>

* Add missed one line indentation fix

Signed-off-by: Jon Kartago Lamida <me@lamida.net>

---------

Signed-off-by: Jon Kartago Lamida <me@lamida.net>
2023-03-01 16:45:01 +00:00
Bartlomiej Plotka ffbbe800f2
Merge pull request #1225 from prometheus/beorn7/api
api: Extend and improve json-iterator usage
2023-03-01 17:43:27 +01:00
beorn7 2236d782ff api: Extend and improve json-iterator usage
For one, this pulls up the histogram-related json-iterator usage from
prometheus/common into the API client. Previously, the only
json-iterater usage was here in the API client. But then json-iterator
was used for the native histogram additions directly in
prometheus/common, see
https://github.com/prometheus/common/pull/440/files . This however
meant that any user of prometheus/common/model would now link in
json-iterator, even if they are not using the JSON marshaling at
all. To keep prometheus/common/model more leightweight, this commit
moves all the json-iterator usage into the API client itself, as it
was done before for the normal float samples.

This commit also adds an unmarshaling function for native histograms,
which didn't even exist in prometheus/common/model so far.

It also adds json-iterator marshaling and un-marshaling for
model.SampleStream, which is only needed for the benchmark
(BenchmarkSamplesJsonSerialization). This fixes the benchmark such
that it actually compares json-iterator and std-lib json encoding
(which didn't work before because the custom marshaling methods of
model.SampleStream enforced std-lib json encoding for floats and
json-iterator encoding for histograms in all cases).

I expect this to fix #1179.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-03-01 17:27:33 +01:00
PrometheusBot 66687e5df5
Update common Prometheus files (#1224)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-03-01 15:32:37 +01:00
songjiayang 2771bcc5da
Add `Header` method to Pusher for custom header (#1218)
Signed-off-by: songjiayang <songjiayang1@gmail.com>
2023-02-07 16:16:37 +01:00
dependabot[bot] 2fced96110
Bump github.com/prometheus/common from 0.37.0 to 0.39.0 (#1197)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.37.0 to 0.39.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.37.0...v0.39.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 14:28:26 +01:00
PrometheusBot 031748d323
Update common Prometheus files (#1213)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-02-01 12:06:38 +01:00
dependabot[bot] b8b41c85ae
Bump golang.org/x/sys from 0.3.0 to 0.4.0 (#1217)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.3.0...v0.4.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-02-01 12:04:45 +01:00