Commit graph

101 commits

Author SHA1 Message Date
SuperQ
0b84893d4a
Add statsd relay
Add a simple statsd packet output relay that buffers and forwards raw
statsd lines.
* Only supports UDP output.
* Has a hard-coded buffering timeout of 1 second.

Closes: https://github.com/prometheus/statsd_exporter/issues/95

Signed-off-by: SuperQ <superq@gmail.com>
2021-09-01 15:14:01 +02:00
davinlu
6329577a6b refactor: replace level pkg
Signed-off-by: davinlu <davinlu@tencent.com>
2021-09-01 18:55:45 +08:00
Evan Van Dam
abb7ec0afb allow multiple dashes in StatsD metric names
Signed-off-by: Evan Van Dam <evan.vandam@wonolo.com>
2021-06-17 09:43:40 -07:00
Márk Sági-Kazár
04bc13d73c
refactor: use structured logging
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-09 14:44:55 +02:00
Mark Sagi-Kazar
278a862099
refactor: use go-kit logger instead of deprecated common log package
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-07 16:00:08 +02:00
John Howard
c5113b732c Update dependencies and drop large go-kit update
Pulling in the same changes as done in
https://github.com/prometheus/common/issues/255

Signed-off-by: John Howard <howardjohn@google.com>
2021-06-03 08:00:27 -07:00
royeo
393b4ca495 Fix comment
Signed-off-by: royeo <ljn6176@gmail.com>
2021-05-06 16:08:29 +08:00
Brian Akins
a8f8067315 Use groupcache for LRU cache
Signed-off-by: Brian Akins <205350+bakins@users.noreply.github.com>
2021-04-28 12:15:19 -04:00
Matthias Rampke
a8c09aaa97
Merge pull request #365 from glightfoot/segment-numbers
Support metric name segments starting with numbers
2021-03-26 18:20:30 +01:00
Matthias Rampke
5793e05795
Add additional tests for #365
testing more edge cases.

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
2021-03-26 16:54:29 +00:00
glightfoot
a197834f64 Add comments about thread-safety
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-19 14:13:03 -05:00
glightfoot
8b306c8c76 remove noop cache, add helper function for tests
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-19 14:08:53 -05:00
glightfoot
0c4a66e6a1 rework metricLineRE to support matching segments that start with a number
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-07 11:21:48 -05:00
glightfoot
aa529c8884 rename mapper_cache to mappercache
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-06 23:27:11 -05:00
glightfoot
940e653ea6 cleanup
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-06 23:21:49 -05:00
glightfoot
32c612d5e8 add license
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-06 23:03:46 -05:00
glightfoot
de9a51c863 fix TestMultipleMatches mapping indent
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-06 23:00:06 -05:00
glightfoot
0099df7f71 move lru and rr mapper caches to their own package and make mapper_cache a better an interface for implementing externally`
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-02-06 22:50:17 -05:00
glightfoot
f8bba00868 format and clarify alias type comment
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-01-28 14:24:41 -05:00
glightfoot
66a63a8c1f use summary options defaults in registry
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-01-28 14:16:40 -05:00
glightfoot
58aed41ff2 remove deprecated fields from mapper defaults config
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-01-28 13:59:42 -05:00
glightfoot
06411336c7 add support for setting histogram_options and summary_options in defaults
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2021-01-28 13:58:52 -05:00
bakins
709c0da81b Use a Parser interface to allow alternate implementations
Signed-off-by: bakins <brian@akins.org>
2020-12-10 13:17:46 -05:00
Robert Fratto
b5deeda251 Pass around custom registry for registering exporter metrics
Importers of pkg/exporter may not want for series to be imported into
the default registry. This commit makes it possible to provide a custom
registry for metrics registration.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2020-11-20 14:14:14 -05:00
bakins
4acb05aa89 Use an interface for Registry so we may have multiple implementations
Signed-off-by: bakins <brian@akins.org>
2020-10-22 10:08:57 -04:00
Matthias Rampke
da85f9d207
Merge pull request #335 from shmsr/dup-init-vars
Avoid double initialization of variables
2020-09-07 09:38:12 +02:00
Matthias Rampke
477d566101
Merge pull request #334 from shmsr/error-small-case
Error strings shouldn't be capitalized
2020-09-07 09:34:11 +02:00
subham sarkar
4c0e26bfa1 Avoid unnecessary initialization of variables
This commit fixes the case when the metric is not present in rm (registered metric) then LastRegisteredAt and TTL are initialized twice. Firstly, LastRegisteredAt is initialized with the time.Time's zero value and then with clock.Now(). Plus, TTL is initialized with the same value twice.

Signed-off-by: subham sarkar <subham.sarkar@guavus.com>
2020-09-06 16:49:25 +05:30
subham sarkar
2c4cda7fb3 Change casing of error messages
Error messages shouldn't be capitalized.

Signed-off-by: subham sarkar <subham.sarkar@guavus.com>
2020-09-06 16:33:18 +05:30
subham sarkar
d93907009c Use prometheus.Gauge interface instead of prometheus.Counter
Signed-off-by: subham sarkar <subham.sarkar@guavus.com>
2020-09-04 20:14:32 +05:30
glightfoot
6942b5a4f3 move to line parser struct and option functions
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-08-10 12:44:23 -04:00
glightfoot
db25b1d658 add line tests for disabling individual tag formats
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-07-28 13:30:34 -04:00
glightfoot
3f3ab23359 add globals for disabling individual tag parsing formats
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-07-28 13:29:06 -04:00
Matthias Rampke
36de8c9e12
Merge pull request #315 from glightfoot/signalfx
[268] Support SignalFx Tags
2020-06-26 17:08:49 +02:00
glightfoot
15eece3cf8 rename events for consistency
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-22 14:53:52 -04:00
glightfoot
9faa4898de abort parsing tags if malformed signalfx format, add tests
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-19 14:40:26 -04:00
glightfoot
4f7abe5226 Merge branch 'master' of github.com:prometheus/statsd_exporter into signalfx 2020-06-19 09:05:10 -04:00
Matthias Rampke
ed37775e02
Merge pull request #309 from prometheus/mr/issue-256
Allow single-letter components in metric names
2020-06-19 14:15:01 +02:00
glightfoot
32f1677f81 add signalfx tag parsing
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-16 16:32:59 -04:00
glightfoot
4a64979563 move mapping and mapper_defaults into their own files with their unmarshalers
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-16 07:46:53 -04:00
glightfoot
1444824911 fix yaml tags
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-15 18:47:17 -04:00
glightfoot
bdd4a76348 add more tests for metric type
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-15 18:46:20 -04:00
glightfoot
77277a5150 support deprecated timer_type in configs
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-15 18:41:16 -04:00
glightfoot
32e9e58e32 Rename timer to observer in mapper
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-15 17:26:20 -04:00
glightfoot
d95a53553e change metric labels to observer
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-15 10:14:11 -04:00
glightfoot
374d202daa rename TimerEvent to ObserverEvent
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-12 09:25:51 -04:00
glightfoot
5c0b206f6e add support for histograms and distributions without unit conversion
Signed-off-by: glightfoot <glightfoot@rsglab.com>
2020-06-11 10:56:36 -04:00
Matthias Rampke
44ae8f557c
Allow single-letter components in metric names
They are valid. Fixes #256.

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
2020-05-29 08:09:46 +00:00
Matthias Rampke
3908609918
Merge pull request #305 from chai-nadig/chai/log-ingested-metrics
Log Ingested Lines
2020-05-29 08:57:26 +02:00
Chai Nadig
d804941a18 Set Flush Interval on EventQueue
Signed-off-by: Chai Nadig <chaitanya.nadig@gmail.com>
2020-05-14 00:03:34 -07:00