Commit Graph

712 Commits

Author SHA1 Message Date
Karsten Weiss 245fde70cb Simplify if expr in ExampleNewExpvarCollector()
Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-13 23:23:52 +02:00
Karsten Weiss 587d5265f8 metric.go: Remove unused type hashSorter
Fixes:
metric.go:130:6: type hashSorter is unused (U1000)

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-13 23:23:52 +02:00
Karsten Weiss e01f7ec4fb Remove unnecessary conversion
Fixes:
go_collector.go:268:66⚠️ unnecessary conversion (unconvert)

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-13 23:18:25 +02:00
Karsten Weiss 66b5a26cec Remove unnecessary for loop in makeLabelPairs()
Fixes:
value.go:155:2: should replace loop with labelPairs = append(labelPairs, desc.constLabelPairs...) (S1011)

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-13 23:18:20 +02:00
Karsten Weiss daa9993ded Use direct API calls
Fixes:
prometheus/http_test.go:117:5⚠️ should use resp.Body.String() instead of string(resp.Body.Bytes()) (S1030) (megacheck)
prometheus/http_test.go:118:56⚠️ should use resp.Body.String() instead of string(resp.Body.Bytes()) (S1030) (megacheck)

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-13 23:17:58 +02:00
Bob Shannon 335dadb61a PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-12 06:49:52 -07:00
Bob Shannon e3e66d0bb9 PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-11 07:38:50 -07:00
Bob Shannon fc258df5b5 Fix deep equal comparison for time.Time
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 19:33:01 -07:00
Bob Shannon e035b26e30 Bump go version used in build
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 18:44:17 -07:00
Bob Shannon 5393573c73 Implement AlertManager, Status, and Target methods
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 07:21:46 -07:00
Björn Rabenstein e11c6ff817
Merge pull request #398 from bobmshannon/feature/admin_api
Add support for API admin methods
2018-04-10 15:01:17 +02:00
Bob Shannon 10dfec77bf Implement admin methods for Prometheus API
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-09 21:03:46 -07:00
Björn Rabenstein 2f0e84125d
Merge pull request #401 from erock2112/master
Fix unprotected write in metricMap
2018-04-09 16:46:44 +02:00
Eric Boren ddd94f24c5 Fix unprotected write in metricMap 2018-04-09 10:10:15 -04:00
Luke Hanley f504d69aff promhttp: fix DNSDone should call Done, not Start (#395)
When tracing, it appears DNSDone is instead calling the supplied DNSStart function
2018-03-28 15:04:30 +02:00
Björn Rabenstein d49167c4b9
Merge pull request #394 from prometheus/beorn7/testing
Fix TestHandler
2018-03-19 14:17:21 +01:00
beorn7 d7f8852e05 Fix TestHandler
prometheus/common has changed and now adds the charset to the
Content-Type header.
2018-03-19 14:04:12 +01:00
Björn Rabenstein 07e5c3ca88
Merge pull request #393 from athomason/promauto-funcs
promauto: add NewCounterFunc and NewGaugeFunc
2018-03-19 13:43:13 +01:00
Adam Thomason 660e6909cc promauto: add NewCounterFunc and NewGaugeFunc 2018-03-17 14:01:36 -07:00
Björn Rabenstein c3324c1198
Merge pull request #386 from var23rav/master
Replaced hardcoded arg('GET') with http.MethodGet constant
2018-02-23 15:47:18 +01:00
Vaisakh Rajagopal e06fadcc6f Replaced hardcoded arg('GET') with http.MethodGet constant 2018-02-23 00:53:19 +05:30
Björn Rabenstein e69720d204
Merge pull request #385 from prometheus/beorn7/auto
Add a package promauto that provides auto-registering metrics
2018-02-16 14:12:53 +01:00
beorn7 b82bcfe55f Add a package promauto that provides auto-registering metrics
Finally, I found an easy solution to provide the "evil"
auto-registration without getting death threats from the wardens of Go
purity. The reasoning can be found in the package's doc comment.
2018-02-16 12:55:57 +01:00
Björn Rabenstein fcc130e101
Merge pull request #384 from prometheus/godoc
Add Godoc link at the top of the README
2018-02-15 13:11:06 +01:00
Brian Brazil a331f1ea4a Add Godoc link at the top of the README
For those following that link, make it more obvious
which subpackage they probably want.
2018-02-15 11:45:41 +00:00
Björn Rabenstein 7e8a70d021
Merge pull request #381 from prometheus/beorn7/push
Add completely new push syntax
2018-02-14 19:20:02 +01:00
beorn7 361cb3a7d0 Delete another use of HostnameGrouping from a doc comment 2018-02-14 18:59:17 +01:00
beorn7 38de287a56 Remove obsolete copyright notices 2018-02-14 18:49:18 +01:00
beorn7 779cbe15b2 Remove HostnameGrouping method 2018-02-14 17:19:52 +01:00
Björn Rabenstein f265126b80
Merge pull request #383 from prometheus/brian-brazil-patch-2
Fix a typo
2018-02-14 15:58:15 +01:00
beorn7 3c2baee2d1 Add completely new push syntax
This allows adding more options in elegant ways, showcased here by
HTTP basic auth and by injecting a custom http.Client.

Fixes #341 and #372.
2018-02-14 13:40:57 +01:00
Brian Brazil 02aee00fdb
Fix a typo 2018-02-14 11:10:46 +00:00
Björn Rabenstein a40133b69f
Merge pull request #379 from prometheus/beorn7/http
promhttp: Introduce limit for connections in flight and timeout
2018-02-10 15:02:05 +01:00
beorn7 c551c3c661 promhttp: Introduce limit for connections in flight and timeout 2018-02-09 17:05:10 +01:00
beorn7 c332b6f63c Now really fix the coverage badge for API 2018-02-09 13:56:02 +01:00
beorn7 884767e914 Fix coverage badge and godoc link for API 2018-02-09 13:52:19 +01:00
beorn7 955ebdc0d9 Minor README.md fix 2018-02-09 13:48:56 +01:00
beorn7 3f8ab26c34 Add an issue template 2018-02-09 13:47:34 +01:00
beorn7 c5b094d7a6 Update README.md to explain the release situation
I will also update the issue template.
2018-02-09 13:41:14 +01:00
Björn Rabenstein a85074fc85
Merge pull request #377 from prometheus/beorn7/http
Provide an InstrumentedHandler
2018-02-08 17:52:34 +01:00
beorn7 8fd47d2e8f Provide an InstrumentedHandler
See https://github.com/prometheus/client_golang/issues/316 for details.
2018-02-08 16:27:51 +01:00
Björn Rabenstein 137706c199
Merge pull request #378 from prometheus/beorn7/doc
Document that the process collector only works on Linux
2018-02-08 15:03:59 +01:00
beorn7 154bb450e4 Document that the process collector only works on Linux 2018-02-08 14:17:54 +01:00
Björn Rabenstein 9bb6ab929d
Merge pull request #374 from prometheus/beorn7/http
Fix more interface upgrade bugs
2018-02-03 15:28:15 +01:00
beorn7 e87046a87e Fix more interface upgrade bugs 2018-02-02 15:53:28 +01:00
beorn7 d892fd2b51 Add test to expose interface upgrade bug
In principle, we needed to iterate through all permutations, mirroring
the same that is happening in the code. For lack of time, I only
picked one of the cases currently buggy.

As said, this really needs code generation, should we ever find
ourselves touching this again.
2018-02-02 15:50:46 +01:00
Björn Rabenstein ebe4271dac
Merge pull request #373 from tsandall/master
Fix delegator return value for single hijacker
2018-02-02 15:21:57 +01:00
Torin Sandall 44a8a1218c Fix delegator return value for single hijacker
Previously, the pickDelegator function was not returning a
*hijackerDelegator so the return value did not implement the Hijacker
interface. As a result, code that attempts to hijack the connection
would fail when using a type assertion.

All the other cases returned the hijackerDelegator correctly.
2018-02-01 10:57:42 -08:00
Björn Rabenstein f4fb1b73fb
Merge pull request #370 from prometheus/beorn7/performance
Create goroutines adaptively during metrics gathering
2018-01-31 15:28:26 +01:00
beorn7 4957f7bba4 Add a safety goroutine budget
This makes sure we don't spin up a possibly infinite number of
goroutines in `Gather`, which could theoretically happen with unlucky
scheduling.
2018-01-31 14:49:15 +01:00