Class PrometheusToRecordParser
java.lang.Object
com.arpnetworking.metrics.mad.parsers.PrometheusToRecordParser
- All Implemented Interfaces:
Parser<List<Record>,
HttpRequest>
public final class PrometheusToRecordParser
extends Object
implements Parser<List<Record>,HttpRequest>
Parses the Prometheus protobuf binary protocol into records.
- Author:
- Bruno Green (bruno dot green at gmail dot com)
-
Constructor Summary
ConstructorDescriptionPrometheusToRecordParser
(boolean interpretUnits, boolean outputDebugInfo, HashSet<String> reservedNameWhitelist) public constructor. -
Method Summary
Modifier and TypeMethodDescriptionparse
(HttpRequest data) Create aRecord
from a serialized representation.
-
Constructor Details
-
PrometheusToRecordParser
public PrometheusToRecordParser(boolean interpretUnits, boolean outputDebugInfo, HashSet<String> reservedNameWhitelist) public constructor.- Parameters:
interpretUnits
- specifies whether to interpret units.outputDebugInfo
- specifies whether to output debug files.reservedNameWhitelist
- specifies the whitelist set for reserved names (names with aggregation keys).
-
-
Method Details
-
parse
Description copied from interface:Parser
Create aRecord
from a serialized representation.- Specified by:
parse
in interfaceParser<List<Record>,
HttpRequest> - Parameters:
data
- Some serialized representation of aRecord
.- Returns:
- Instance of
Record
from the data. - Throws:
ParsingException
- If parsing of the data fails for any reason.
-