Ben Kochie
269e7c8091
Fix golint issues.
...
Signed-off-by: Ben Kochie <superq@gmail.com>
5 years ago
shreyassrivatsan
e825282dd1
Add exemplar support to the openmetrics parser ( #6292 )
...
* Add exemplar support to the openmetrics parser
Signed-off-by: Shreyas Srivatsan <shreyas@chronosphere.io>
5 years ago
Brian Brazil
3fdb92010e
Expand OM to OpenMetrics
...
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
6 years ago
Brian Brazil
c271ef456a
Add an OpenMetrics parser.
...
This is based on the existing parser, and has slightly better
performance (few %) than it.
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
6 years ago
Brian Brazil
ffe7efb411
Prepare for multiple text formats
...
Pass content type down to text parser.
Add layer of indirection in front of text parser,
and rename to avoid future clashes.
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
6 years ago
Brian Brazil
70c98a06f1
Handle empty HELP in text parser. ( #4444 )
...
Fixes #4427
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
6 years ago
Fabian Reinartz
76a4a46cb0
pkg/textparse: refactor and add metadata handling
...
Extends the parser to allow retrieving metadata.
The lexer now yields proper tokens that are fed into a hand-written
parser on top.
Signed-off-by: Fabian Reinartz <freinartz@google.com>
7 years ago
Filip Ochnik
ec1c6b7c29
textparse: reject empty label names
7 years ago
Julius Volz
c3d6abc8e6
Fix some lint errors ( #3334 )
...
I left the promql ones and some others untouched as I remember that @fabxc
prefers them that way.
7 years ago
Julius Volz
c6f41ce391
Allow metric and label names to begin with underscores ( #2961 )
...
While this is not recommended, it is allowed in our data model
(https://prometheus.io/docs/concepts/data_model/ ).
Fixes https://github.com/prometheus/prometheus/issues/2959
7 years ago
Goutham Veeramachaneni
b7eddbcd98
textparse: Add fuzzing and fix bug caught
...
See https://github.com/cznic/golex/issues/11 for info on the bug
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
7 years ago
Goutham Veeramachaneni
0e78b7e7c8
parser: support spaces everywhere
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
7 years ago
Brian Brazil
dd07f693c8
Single quotes are not valid label value delimiters.
8 years ago
Brian Brazil
a6ca391e6e
Reject scrapes with invalid utf-8 label values.
8 years ago
Fabian Reinartz
bdc763f95f
pkg/textparse: allow null bytes in label values
8 years ago
Fabian Reinartz
ea09299ca5
pkg/textparse: handle trailing labels comma ( #2752 )
8 years ago
Brian Brazil
beaa7d5a43
Move consistent NaN logic into the parser.
8 years ago
Fabian Reinartz
f7c5d96e84
pkg/textparse: parse metric names with ':'
8 years ago
Fabian Reinartz
377886b371
pkg/textparse: implement timestamp parsing
8 years ago
Brian Brazil
5c9a6ce747
Add license to files.
...
This should fix CI for dev-2.0.
8 years ago
Fabian Reinartz
fb3ab9bdb7
pkg/textparse: add more benchmarking, align lex defs
8 years ago
Fabian Reinartz
e44d80314d
pkg/textparse: add tests and method to retrieve full labels
8 years ago
Fabian Reinartz
091a7f2395
pkg/textparse: add initial text parser
8 years ago