Commit Graph

1220 Commits

Author SHA1 Message Date
beorn7 c818d96e15 Unflake TestGoCollectorGC
It is perfectly possible that a normal GC happens just before the
forced one. Thus seeing 2 GCs is fine.

Whenever this test failed, it was because two GCs were seen.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-26 14:11:51 +02:00
beorn7 fe90eea9bb Attempt to fix flakiness of TestGoCollectorMemStats
This is really lame as it essentially just uses longer times to
wait. The test is still timing-dependent and thus could still
theoretically fail with unlucky scheduling. However, we are testing
something that _is_ about timing. Turning this all into something not
timing-dependent would be first quite involved and second might defeat
the purpose of testing code that is inherently about timing.

Let's see how this works out in practice.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-26 13:25:59 +02:00
Björn Rabenstein b46e6ec51b
Merge pull request #562 from jacksontj/issue_560
Add storage.Warnings to client
2019-05-22 00:31:30 +02:00
Thomas Jackson d5f3c8d55d Add storage.Warnings to client
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes #560
2019-05-21 07:36:05 -07:00
beorn7 b5f69192ee Purge remaining references to v0.10 from doc comments
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 23:35:36 +02:00
Björn Rabenstein 50c4339db7
Merge pull request #579 from prometheus/beorn7/release
Cut v0.9.3 and announce new versioning plan
2019-05-16 23:22:10 +02:00
beorn7 d980b1cf3b Cut v0.9.3
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 18:07:07 +02:00
beorn7 d586b4b2d5 Update dependencies
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 18:05:52 +02:00
beorn7 9a6fc61a7b Update versioning plan with Go Modules in mind
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 18:05:52 +02:00
Björn Rabenstein ed5d97df1f
Merge pull request #582 from prometheus/beorn7/promhttp
Make use of pre-existing context in InstrumentRoundTripperTrace
2019-05-16 18:03:24 +02:00
beorn7 bc54582c5e Make use of pre-existing context in InstrumentRoundTripperTrace
Fixes #580

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 17:52:19 +02:00
beorn7 6c520f6aca Add test to expose #580
Tests are heavily inspired by @shturec, see #584.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 17:52:19 +02:00
Björn Rabenstein 775f94f6fc
Merge pull request #581 from prometheus/beorn7/test
Fix race in TestGoCollectorMemStats
2019-05-16 15:31:37 +02:00
Björn Rabenstein 0e198671c5
Merge pull request #583 from prometheus/beorn7/doc
Remove outdated use-case description from doc comment
2019-05-16 11:31:50 +02:00
beorn7 e91cd81632 Remove outdated use-case description from doc comment
We stopped advertising binary-wide setting of a label quite a while
ago. This doc comment was missed in the cleanup.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 11:23:48 +02:00
beorn7 709dc4b1de Fix race in TestGoCollectorMemStats
Related to #573 (but only partially fixes it).

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-16 10:37:37 +02:00
Björn Rabenstein 2827f2a8d9
Merge pull request #577 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2019-05-15 11:10:46 +02:00
prombot af332dff97 makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-05-15 00:00:42 +00:00
Björn Rabenstein 7f34606871
Merge pull request #576 from cviecco/fix-pusher-regression
Fix regression issue 574
2019-05-14 21:31:02 +02:00
Camilo Viecco facfcc21f8 fix regression issue 574
Signed-off-by: Camilo Viecco <camilo_viecco1@symantec.com>
2019-05-14 11:44:55 -07:00
Björn Rabenstein b0f4d8e1d5
Merge pull request #572 from prometheus/beorn7/deprecation
Clarify deprecation of `DefObjectives`
2019-05-08 13:54:16 +02:00
beorn7 886e2ee0c0 Clarify deprecation of `DefObjectives`
Previously, the whole `Objectives` field was marked as deprecated by
linters.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-08 13:38:43 +02:00
Björn Rabenstein 2d3b0fe0e0
Merge pull request #568 from prometheus/beorn7/go-collector
Return previous memstats if Go collector needs longer than 1s
2019-05-07 00:10:32 +02:00
Bjoern Rabenstein 7cf0955421 Handle long ReadMemStats duration in Go collector
tl;dr: Return previous memstats if reading new ones takes longer than
1s.

See the doc comment of NewGoCollector for details.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-06 23:28:31 +02:00
beorn7 547c945a62 Replace fmt.Sprintf by simple concatenation
In this simple case, it's the fastest and easiest.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-06 23:28:31 +02:00
beorn7 016273b1f9 Fix and tweak Go collector tests
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-06 23:28:31 +02:00
Björn Rabenstein f1d50bcc55
Merge pull request #559 from nghialt/master
Add HTTPClient interface to Pusher struct
2019-05-06 01:31:30 +02:00
NghiaLT 6ea6f07918 Replace HTTPClient with HTTPDoer; Update document accordingly
Signed-off-by: NghiaLT <nghialt.11@gmail.com>
2019-05-06 04:28:14 +07:00
Björn Rabenstein 19d9302912
Merge pull request #569 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2019-05-04 19:25:12 +02:00
Björn Rabenstein 906d2976cb
Merge pull request #567 from prometheus/beorn7/counter
Make TestCounterAddLarge more robust
2019-05-04 18:08:04 +02:00
Björn Rabenstein e11546c7ec
Merge pull request #566 from prometheus/beorn7/go-requirement
Remove remaining traces of pre-go-1.8 handling
2019-05-04 18:06:53 +02:00
prombot da0c9e549a makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-05-04 00:00:58 +00:00
Bjoern Rabenstein bf1f4e4a24 Make TestCounterAddLarge more robust
The previous `float64(math.MaxUint64 + 1)` is too close to
`float64(math.MaxUint64)` to actually overflow as indended.

The counter code is actually converting forward and backward and
compare the original and twice-converted value. On most platform, this
will create a deviation and thus trigger the expected behavior. By
sheer "luck", one might end up with the same value and thus still use
the uint64 representation. Which is OK within the precision we can
expect. But it breaks the test. With this change, the next
representable floating point value greater than the floating point
value used to represent math.MaxUint64 is used.

Signed-off-by: Bjoern Rabenstein <bjoern@rabenste.in>
2019-05-03 22:25:32 +02:00
Bjoern Rabenstein 57f7bd35fd Remove remaining traces of pre-go-1.8 handling
Signed-off-by: Bjoern Rabenstein <bjoern@rabenste.in>
2019-05-03 21:30:30 +02:00
Björn Rabenstein 6aba2189eb
Merge pull request #564 from KevinBetterQ/fix-misspell
fix: fix a typo
2019-05-02 00:05:34 +02:00
KevinBetterQ a325fb7566 fix: fix a typo
Signed-off-by: KevinBetterQ <1093850932@qq.com>
2019-05-01 17:50:23 +08:00
Thomas Jackson 3f6cbd9560 Remove encode of params in query before DoGetFallback (#563)
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
2019-05-01 09:28:05 +03:00
Thomas Jackson a4daf0098c Implement POST with get fallback for Query/QueryRange (#557)
* Implement POST with get fallback for Query/QueryRange

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
2019-04-30 10:13:48 +03:00
Björn Rabenstein f951755f07
Merge pull request #561 from prometheus/beorn7/go-requirement
Increase minimum required Go version to 1.9
2019-04-29 15:00:59 +02:00
Bjoern Rabenstein 1173d73405 Increase minimum required Go version to 1.9
This allows us to simplify a bunch of code while still supporting the
last four Go minor versions.

We have also run into minor annoyances a couple of times by now to
keep supporting 1.7 and 1.8.

It's time to pull the plug!

Signed-off-by: Bjoern Rabenstein <bjoern@rabenste.in>
2019-04-28 23:28:57 +02:00
NghiaLT c9d77912ac Add HTTPClient interface to Pusher struct
Signed-off-by: NghiaLT <nghialt.11@gmail.com>
2019-04-26 16:53:21 +07:00
Björn Rabenstein deade0365a
Merge pull request #558 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2019-04-25 12:40:51 +02:00
Simon Pasquier 6894bb3c7c Add .golangci.yml
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-25 10:38:07 +02:00
prombot 53800fb9d3 makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-04-25 00:00:38 +00:00
Björn Rabenstein 65d3a96fba
Merge pull request #556 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2019-04-16 10:58:48 +02:00
prombot 9a98fd8405 makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-04-16 00:00:39 +00:00
Björn Rabenstein b8ed8f100e
Merge pull request #555 from prometheus/beorn7/modules
Update dependencies
2019-04-15 13:21:11 +02:00
Bjoern Rabenstein 2d69188b26 Update dependencies
Mostly to use the new module support for prometheus/common and
beorn7/perks.

Signed-off-by: Bjoern Rabenstein <bjoern@rabenste.in>
2019-04-15 00:16:44 +02:00
Björn Rabenstein 5a3ec6a883
Merge pull request #554 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2019-04-12 02:37:33 +02:00
prombot deac34f26f makefile: update Makefile.common with newer version
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-04-12 00:00:36 +00:00