Commit Graph

1098 Commits

Author SHA1 Message Date
Björn Rabenstein 803ef2a759
Merge pull request #703 from prometheus/testutil-metric-count
Added `testutil.CollectAndCount`
2020-01-09 12:53:08 +01:00
Bartlomiej Plotka 9e9cc003f8 Added testutil.CollectAndCount
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-01-09 11:20:19 +00:00
Björn Rabenstein b68ba26e47
Merge pull request #702 from prometheus/beorn7/doc
Improve doc string for `go_gc_duration_seconds`
2020-01-08 15:19:54 +01:00
beorn7 2be4bb406e Improve doc string for `go_gc_duration_seconds`
Fixes #618.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-01-06 13:38:35 +01:00
Björn Rabenstein c42bebe5a5
Merge pull request #700 from prometheus/beorn7/release
Update dependencies and cut v1.3.0
2019-12-20 21:53:46 +01:00
beorn7 339a70f084 Cut v1.3.0
Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-20 20:43:45 +01:00
beorn7 780f6ab482 Update dependencies
Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-20 20:43:37 +01:00
Björn Rabenstein e7776d2c54
Merge pull request #699 from joe-elliott/http-client-warnings
Return Prometheus Warnings
2019-12-13 01:07:50 +01:00
Joe Elliott 88792b1169 Moved warnings into apiclient
Signed-off-by: Joe Elliott <number101010@gmail.com>
2019-12-11 10:04:00 -05:00
Joe Elliott bd858421cd Fixed TestDoGetFallback test
Signed-off-by: Joe Elliott <number101010@gmail.com>
2019-12-11 09:36:49 -05:00
Joe Elliott 393adc9261 Refactor ~worked. All tests passing except one
Signed-off-by: Joe Elliott <number101010@gmail.com>
2019-12-10 16:53:38 -05:00
Joe Elliott 7f4279992e First pass unravel
Signed-off-by: Joe Elliott <number101010@gmail.com>
2019-12-10 15:16:44 -05:00
Björn Rabenstein 99d85f4901
Merge pull request #697 from prometheus/beorn7/doc
Improve doc comment for NewGaugeFunc
2019-12-10 11:42:33 +01:00
beorn7 de74638693 Improve doc comment for NewGaugeFunc
- Simplify confusing wording about concurrency safety.
- Add link to example for info metric.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-09 18:20:27 +01:00
Björn Rabenstein 0da4c3a935
Merge pull request #695 from cben/api-client-examples-shadowing
api client examples: avoid shadowing package with variable
2019-12-09 14:56:54 +01:00
Beni Cherniavsky-Paskin 38c67520a3 api client examples: avoid shadowing package with variable
Signed-off-by: Beni Cherniavsky-Paskin <cben@redhat.com>
2019-12-09 14:55:16 +02:00
beorn7 9097a2cf2f Fix typo
Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-04 21:11:33 +01:00
Björn Rabenstein f65e1535fb
Merge pull request #686 from Dean-Coakley/patch-2
Fix link to writing exporters guide
2019-11-28 16:09:12 +01:00
Dean Coakley 508fc33903
Fix link to writing exporters guide
Signed-off-by: Dean Coakley <dean.s.coakley@gmail.com>
2019-11-28 15:01:46 +00:00
Björn Rabenstein 333f01cef0
Merge pull request #668 from kamaev/master
Send Graphite metrics with tags
2019-10-25 01:19:15 +02:00
kamaev 06342cf74f
fix tests
Signed-off-by: kamaev <timurkamaev@protonmail.com>
2019-10-23 00:15:54 +05:00
kamaev c333d152b1
add graphite tags
Signed-off-by: kamaev <timurkamaev@protonmail.com>
2019-10-23 00:15:41 +05:00
Björn Rabenstein 49d8fa7cc9
Merge pull request #667 from krasi-georgiev/maintainers
remove Krasi from the maintainers.
2019-10-22 13:04:27 +02:00
Krasi Georgiev 6453c2869c rmeove Krasi from the maintainers.
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-22 01:50:42 +03:00
Björn Rabenstein 1b4c821666
Merge pull request #666 from jeffwidman/patch-1
Remove old reference to basicMetricVec
2019-10-18 19:37:37 +02:00
Jeff Widman 0dc0c2165f Remove old reference to basicMetricVec
Contrary to the code comment, I see no `basicMetricVec` implementation.
Grep'ing this project shows this is the only reference. So I suspect
it's an outdated comment and can be removed to minimize confusion.

I'm unclear whether other parts of that comment are also incorrect and
need updating.

Signed-off-by: Jeff Widman <jeff@jeffwidman.com>
2019-10-18 10:05:25 -07:00
Björn Rabenstein 5545057911
Merge pull request #665 from prometheus/beorn7/release
Cut v1.2.1
2019-10-17 15:07:33 +02:00
beorn7 8ff800430e Cut v1.2.1
Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-17 14:48:15 +02:00
Björn Rabenstein 82e1269dd2
Merge pull request #664 from prometheus/beorn7/doc
Add more precise Go version requirements.
2019-10-17 14:28:26 +02:00
Björn Rabenstein 82ce871c27
Merge pull request #663 from costela/master
Fix collectorID calculation for Unregister()
2019-10-17 14:26:53 +02:00
Leo Antunes 4be0ab45ec ensure same collectorID calculated on reg and unreg
Signed-off-by: Leo Antunes <leo@costela.net>
2019-10-17 14:16:32 +02:00
beorn7 82cc0ac61c Add more precise Go version requirements.
Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-17 14:15:46 +02:00
Björn Rabenstein b2924667e3
Merge pull request #660 from prometheus/beorn7/nit
Simplify code
2019-10-16 13:25:32 +02:00
beorn7 679da921f7 Simplify code
`gofmt -s` taught me that this is possible.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-16 12:18:16 +02:00
Björn Rabenstein 39fc195974
Merge pull request #659 from prometheus/beorn7/nit
Use a cleaner initialization of `separatorByteSlice`
2019-10-15 20:02:18 +02:00
beorn7 19af62dcc8 Use a cleaner initialization of `separatorByteSlice`
The `const separatorByte` wasn't used anymore actually. In `vec.go`,
we were using `model.SeparatorByte`, which is better anyway. So remove
the unused constant and initialize `separatorByteSlice` with
`model.SeparatorByte`, too.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-15 19:52:31 +02:00
Björn Rabenstein 9a2ab94c6a
Merge pull request #658 from prometheus/beorn7/release
Cut v1.2.0
2019-10-15 18:20:41 +02:00
beorn7 3ee92dfa31 Cut v1.2.0
One might argue that supporting the newest Pushgateway is just an
enhancement or even a bugfix (and this should be v1.1.1, which would
be a really nice version number). I decided to go for a positive view
of things and call it a feature. If something else changes its
behavior, it's not really a bug from client_golang's point of view.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-15 13:46:37 +02:00
beorn7 b4686f3863 Update dependencies
Just to make sure we are up to date before releasing.
This only affects golang.org/x/sys.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-15 13:45:04 +02:00
beorn7 b8308329f0 Fix function names in API examples
The part after the underscore has to be lowercase. Otherwise, it is
seen as the name of a Go type, which doesn't exist, which will result
in the example not showing up in godoc.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-15 13:43:53 +02:00
Björn Rabenstein c13325c862
Merge pull request #655 from prometheus/beorn7/test
Unflake TestGoCollectorGoroutines
2019-10-15 13:19:50 +02:00
Björn Rabenstein 8b3e008442
Merge pull request #657 from prometheus/beorn7/registry
Make hash collisions in the registry much less likely
2019-10-15 11:43:02 +02:00
Björn Rabenstein e0e84de036
Merge pull request #654 from prometheus/beorn7/push
Minor improvements to the push code
2019-10-15 11:41:22 +02:00
beorn7 ee1078a03c Move registry hashing to xxhash
This is a much stronger hash function than fnv64a and comparably fast
(with super-fast assembly implementation for amd64).

Performance is not critical here anyway.

The old fnv64a is kept for vectors, where collision detection is in
place and the weakness of the hashing doesn't matter that much. I
implemented a vector version with xxhash and found that xxhash is
slower in all cases except very very high cardinality (where it is
only slightly faster). Also, ``xxhash.New`` comes with an allocation
of 80 bytes. Thus, to keep vectors alloc-free, we needed to add a
`sync.Pool`, which would have an additional performance overhead.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 21:18:38 +02:00
beorn7 c2e3855f3b Minimal “fix” for hash collisions
This makes the collisions a bit less likely by XOR'ing descIDs rather
than adding them up for the collectorID.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 20:14:43 +02:00
beorn7 bf9ff715fe Expose bug #633
Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 20:02:58 +02:00
beorn7 6fa429cf42 Unflake TestGoCollectorGoroutines
This is not a great solution, but it's also hard to test for this
moving target.

Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 19:44:28 +02:00
beorn7 bd362a9ced Use HTTP status code constants rather than numerical literals
Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 19:27:09 +02:00
beorn7 f24de70161 Update push test to use status code 200
Signed-off-by: beorn7 <beorn@grafana.com>
2019-10-14 19:24:20 +02:00
Björn Rabenstein 3ddc3cfbe5
Merge pull request #652 from ahjdzx/fix_status_code
Fix check status code
2019-10-12 14:49:42 +02:00