Commit Graph

625 Commits

Author SHA1 Message Date
Lynn Lin be904beebc fix spelling typo 2017-08-28 08:57:51 +08:00
Björn Rabenstein 3eb912b336 Merge pull request #335 from marco-jantke/check-validity-of-label-values
Check validity of label values
2017-08-25 18:06:44 +02:00
Marco Jantke a956c5fdd6 improve validation function naming 2017-08-25 17:58:59 +02:00
Marco Jantke 0b8aef084e implement review feedback 2017-08-25 14:51:19 +02:00
Marco Jantke 6df742e132 improve formatting of invalid label value error messages 2017-08-20 00:54:11 +02:00
Marco Jantke 555018f3c9 make code compatible with go 1.6 2017-08-20 00:53:55 +02:00
Marco Jantke 685a3c90d4 fail Gather'ing when label value is not utf8 2017-08-20 00:10:32 +02:00
Marco Jantke 7ee20d77cb validate ConstLabels values in NewDesc 2017-08-20 00:09:51 +02:00
Marco Jantke 703c4a9c6f add label value validation to NewConstMetric and friends 2017-08-20 00:09:51 +02:00
Marco Jantke 459e88167e extract and refactor label validation functions
so that we can reuse them in other parts of the code, not only as part
of a metricVec.
2017-08-20 00:09:50 +02:00
Marco Jantke 957bba6f68 add label value validation to GetMetricWith and friends 2017-08-19 22:55:41 +02:00
Björn Rabenstein 94ff84a9a6 Merge pull request #329 from infoverload/add_new_metric_go_info
Add new default metric go_info
2017-07-24 10:13:13 +02:00
hazey.dazey f36d4a3e73 Add new default metric go_info 2017-07-23 23:36:09 +02:00
Björn Rabenstein 95b6848b5c Merge pull request #325 from prometheus/beorn7/doc
Remove remaining references to MetricVec from doc comments
2017-07-12 18:53:59 +02:00
beorn7 ed379b7d99 Remove remaining references to MetricVec from doc comments
MetricVec is un-experted by now. godoc handles that correctly by
showing the methods of the embedded un-exported metricVec with the
exported type (CounterVec, SummaryVec, ...) that embeds metricVec.
2017-07-12 15:13:09 +02:00
Björn Rabenstein 26b8970019 Merge pull request #324 from maximesong/master
fix typo in comments
2017-07-07 19:33:55 +02:00
Maxime Song 90494ea7b1 fix typo in comments
Signed-off-by: Maxime Song <me@cppdo.com>
2017-07-07 23:28:24 +08:00
Björn Rabenstein 310ce84375 Merge pull request #319 from prometheus/beorn7/vec
Unexport MetricVec
2017-06-30 16:48:34 +02:00
Björn Rabenstein 77934284f4 Merge pull request #321 from prometheus/beorn7/doc
Document the use of Go1.9+ for monotonic time where applicable
2017-06-29 16:21:10 +02:00
beorn7 e04de4bfe3 Document the use of Go1.9+ for monotonic time where applicable 2017-06-29 16:07:12 +02:00
beorn7 f66cdf0736 Un-export MetricVec
This is in preparation for "curried" metric vecs, as discussed.

And it's a good thing anyway. The exported MetricVec was from a time
when I thought people would define own Metric types and then create
Vecs of it. That has never happened.
2017-06-28 17:55:59 +02:00
beorn7 721f93fda8 Deprecate UntypedVec 2017-06-28 17:00:33 +02:00
Brian Brazil ab4214782d Merge pull request #318 from AlekSi/patch-1
Minor documentation fix
2017-06-28 13:54:36 +01:00
Alexey Palazhchenko f0c4c478a2 Minor documentation fix 2017-06-28 15:40:03 +03:00
Björn Rabenstein de4d4ffe63 Merge pull request #308 from prometheus/beorn7/http
promhttp: Bite the bullet and implement all 32 possible interface combos
2017-06-06 12:22:53 +02:00
beorn7 14730c70c0 promhttp: Bite the bullet and implement all 32 possible interface combos
As it turned out, it's not that esay to guess "common" combination of
interface upgrades. So I decided to just implement all 32 possible
combination of interface upgrades. (Only 16 with Go 1.7 and earlier.)

Clearly, this calls for code generation. But right now, we still need
to find out what's the best form of the code. For later additions,
implementing code generation might be useful.

Note that newDelegator is called for each HTTP request. Thus, this
commit aims to make the upgrade selection quick. (After the type
checks, it's just directly accessing an element in a slice.)
2017-06-02 19:03:08 +02:00
Norbert Tretkowski e7e903064f Import "log", it is required for log.Fatal(... (#305)
Import "log" in the example doc comment

Package log is required for log.Fatal.
2017-05-31 15:00:54 +02:00
stuart nelson 2b3ab50dcd Add time to write header handler middleware (#304) 2017-05-29 11:42:43 +02:00
Björn Rabenstein 42552c195d Merge pull request #302 from prometheus/beorn7/http
Improve promhttp middleware
2017-05-11 16:12:51 +02:00
beorn7 023c31fd59 Fix handling of ConstLabels in checkLabels 2017-05-10 20:39:36 +02:00
beorn7 753a259e20 Improve promhttp tests
- Use local registry to avoid conflicts between tests.
- Expose https://github.com/prometheus/client_golang/issues/299 by
  using ConstLabels in a test.
- Improve example: Buckets and help string must be consistent, even
  if the former is not enforced as of now, but see
  https://github.com/prometheus/client_golang/issues/222
2017-05-10 19:49:36 +02:00
Björn Rabenstein b12dd9c58c Merge pull request #300 from prometheus/beorn7/http
Point to promhttp in deprecation notices
2017-05-09 23:03:59 +02:00
beorn7 4ea620c5bf Point to promhttp in deprecation notices 2017-05-09 18:54:33 +02:00
stuart nelson d300d5cf21 Instrument RoundTripper via middleware (#295)
Instrument RoundTripper via middleware
2017-05-09 18:46:09 +02:00
Julius Volz 7d9484283e Merge pull request #291 from andrestc/query-label-values
api: reorganize API package and add label values endpoint implementation
2017-04-25 16:35:58 -05:00
André Carvalho 8077e4bd69
api: fix typo in comments 2017-04-25 18:17:16 -03:00
André Carvalho 5d19d9de34
api: renames create client func 2017-04-25 11:37:13 -03:00
André Carvalho 6fdb468212
api: add build tag for go 1.7 2017-04-24 18:05:17 -03:00
stuart nelson d01fd62222 new handler instrumentation (#285)
Add new HTTP handler instrumentation
2017-04-24 15:13:19 -04:00
André Carvalho 09dcce7042
api: uses context from net/http
This commit removes the now unnecessary CancelableTransport and rely on
the net/http context support.
2017-04-20 10:31:18 -03:00
André Carvalho 11fae2ef0c
api: uses stdlib context 2017-04-20 09:57:46 -03:00
André Carvalho 349922b38c
api: creates versioned package for prometheus v1 api
This commit creates a new package to hold the prometheus
v1 API interface. This interface will contain all the funcionality
exposed by Prometheus v1 HTTP API.

The underlying http client is kept on the api package since it
may be reused across diferent API versions and also by the Alertmanager
api package (to come.)
2017-04-19 18:24:14 -03:00
Björn Rabenstein 08fd2e1237 Merge pull request #281 from adjust/add_gc_cpu_fraction
Adding GCCPUFraction metric to goCollector
2017-04-01 12:34:46 +02:00
André Carvalho 7b5f0fdaa9
api: fix godoc comment 2017-03-31 21:31:42 -03:00
André Carvalho 57f23d303f
api: returns specific type for label values 2017-03-31 21:29:30 -03:00
André Carvalho 123637b5ca
api: renames method for consistency 2017-03-31 21:07:16 -03:00
André Carvalho 8cb7769e36
api: stops ignoring errors creating requests 2017-03-31 21:05:08 -03:00
André Carvalho 2f33fabffe
api: adds label values query implementation
This commit adds a client side implementation for fetching label values
from prometheus api.
2017-03-31 19:42:19 -03:00
Björn Rabenstein 738ed6c0b9 Merge pull request #287 from caitong93/patch-1
Fix typo
2017-03-22 14:40:44 +01:00
Tong 6d619ff5a8 Fix typo 2017-03-22 21:29:18 +08:00