|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Classes | |
| class | reader |
| Minimal protobuf wire reader used for round-trip tests. More... | |
Enumerations | |
| enum class | wire_type : std::uint8_t { varint = 0 , fixed64 = 1 , length_delimited = 2 , fixed32 = 5 } |
Functions | |
| void | encode_varint (std::vector< std::uint8_t > &out, std::uint64_t value) |
| Encode an unsigned varint into the buffer. | |
| void | encode_tag (std::vector< std::uint8_t > &out, std::uint32_t field_number, wire_type wt) |
| Encode a tag (field_number << 3 | wire_type) as a varint. | |
| void | encode_fixed64 (std::vector< std::uint8_t > &out, std::uint64_t value) |
| Encode a fixed64 little-endian value (used for Zipkin timestamps). | |
| void | encode_length_delimited (std::vector< std::uint8_t > &out, const std::uint8_t *data, std::size_t size) |
| Encode a length-delimited byte sequence. | |
| void | encode_string_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, const std::string &value) |
| Encode a string field. | |
| void | encode_bytes_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, const std::vector< std::uint8_t > &value) |
| Encode a bytes field. | |
| void | encode_uint64_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, std::uint64_t value) |
| Encode a uint32 / uint64 / int64 varint field (skips zero). | |
| void | encode_uint64_field_always (std::vector< std::uint8_t > &out, std::uint32_t field_number, std::uint64_t value) |
| Encode a uint32 field that is not allowed to be skipped even if zero. | |
| void | encode_enum_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, std::int32_t value) |
| Encode an enum field (always written when nonzero). | |
| void | encode_bool_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, bool value) |
| Encode a bool field (proto3 skips false). | |
| void | encode_fixed64_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, std::uint64_t value) |
| Encode a fixed64 field. | |
| void | encode_message_field (std::vector< std::uint8_t > &out, std::uint32_t field_number, const std::vector< std::uint8_t > &serialized) |
| Encode an embedded message field given its pre-serialized bytes. | |
| bool | decode_tag (reader &r, std::uint32_t &field_number, wire_type &wt) |
| Decode a tag into (field_number, wire_type). | |
| std::vector< std::uint8_t > | hex_to_bytes (const std::string &hex) |
| Decode a hexadecimal string into bytes. Odd-length strings are zero-padded on the left; non-hex characters yield an empty vector. | |
| std::string | bytes_to_hex (const std::vector< std::uint8_t > &bytes) |
| Encode raw bytes as a lowercase hex string. | |
| std::vector< std::uint8_t > | left_pad (const std::vector< std::uint8_t > &in, std::size_t width) |
| Left-pad bytes to a target width. Used to normalize 8-byte trace IDs to Jaeger's 16-byte on-wire width and similar cases. | |
|
strong |
| Enumerator | |
|---|---|
| varint | int32/int64/uint32/uint64/sint*/bool/enum |
| fixed64 | fixed64/sfixed64/double |
| length_delimited | string/bytes/embedded messages/packed repeated |
| fixed32 | fixed32/sfixed32/float |
Definition at line 29 of file protobuf_wire.h.
|
inline |
Encode raw bytes as a lowercase hex string.
Definition at line 321 of file protobuf_wire.h.
|
inline |
Decode a tag into (field_number, wire_type).
Definition at line 276 of file protobuf_wire.h.
References kcenon::monitoring::protobuf_wire::reader::read_varint().
Referenced by kcenon::monitoring::zipkin_proto::decode_annotation(), kcenon::monitoring::jaeger_proto::decode_batch(), kcenon::monitoring::zipkin_proto::decode_endpoint(), kcenon::monitoring::jaeger_proto::decode_key_value(), kcenon::monitoring::zipkin_proto::decode_list_of_spans(), kcenon::monitoring::zipkin_proto::decode_map_entry(), kcenon::monitoring::jaeger_proto::decode_process(), kcenon::monitoring::jaeger_proto::decode_span(), kcenon::monitoring::zipkin_proto::decode_span(), kcenon::monitoring::jaeger_proto::decode_span_ref(), and kcenon::monitoring::jaeger_proto::decode_timestamp().


|
inline |
Encode a bool field (proto3 skips false).
Definition at line 133 of file protobuf_wire.h.
References encode_tag(), encode_varint(), and varint.
Referenced by kcenon::monitoring::jaeger_proto::encode_key_value(), and kcenon::monitoring::zipkin_proto::encode_span().


|
inline |
Encode a bytes field.
Definition at line 92 of file protobuf_wire.h.
References encode_length_delimited(), encode_tag(), and length_delimited.
Referenced by kcenon::monitoring::zipkin_proto::encode_endpoint(), kcenon::monitoring::jaeger_proto::encode_key_value(), kcenon::monitoring::jaeger_proto::encode_span(), kcenon::monitoring::zipkin_proto::encode_span(), and kcenon::monitoring::jaeger_proto::encode_span_ref().


|
inline |
Encode an enum field (always written when nonzero).
Definition at line 122 of file protobuf_wire.h.
References encode_tag(), encode_varint(), and varint.
Referenced by kcenon::monitoring::jaeger_proto::encode_key_value(), kcenon::monitoring::zipkin_proto::encode_span(), and kcenon::monitoring::jaeger_proto::encode_span_ref().


|
inline |
Encode a fixed64 little-endian value (used for Zipkin timestamps).
Definition at line 61 of file protobuf_wire.h.
Referenced by kcenon::monitoring::zipkin_proto::encode_annotation(), encode_fixed64_field(), and kcenon::monitoring::jaeger_proto::encode_key_value().

|
inline |
Encode a fixed64 field.
Definition at line 144 of file protobuf_wire.h.
References encode_fixed64(), encode_tag(), and fixed64.
Referenced by kcenon::monitoring::zipkin_proto::encode_span().


|
inline |
Encode a length-delimited byte sequence.
Definition at line 70 of file protobuf_wire.h.
References encode_varint().
Referenced by encode_bytes_field(), encode_message_field(), and encode_string_field().


|
inline |
Encode an embedded message field given its pre-serialized bytes.
Definition at line 155 of file protobuf_wire.h.
References encode_length_delimited(), encode_tag(), and length_delimited.
Referenced by kcenon::monitoring::jaeger_proto::encode_batch(), kcenon::monitoring::zipkin_proto::encode_list_of_spans(), kcenon::monitoring::jaeger_proto::encode_process(), kcenon::monitoring::jaeger_proto::encode_span(), and kcenon::monitoring::zipkin_proto::encode_span().


|
inline |
Encode a string field.
Definition at line 78 of file protobuf_wire.h.
References encode_length_delimited(), encode_tag(), and length_delimited.
Referenced by kcenon::monitoring::zipkin_proto::encode_annotation(), kcenon::monitoring::zipkin_proto::encode_endpoint(), kcenon::monitoring::jaeger_proto::encode_key_value(), kcenon::monitoring::jaeger_proto::encode_process(), kcenon::monitoring::jaeger_proto::encode_span(), kcenon::monitoring::zipkin_proto::encode_span(), and kcenon::monitoring::zipkin_proto::encode_string_map_entry().


|
inline |
Encode a tag (field_number << 3 | wire_type) as a varint.
Definition at line 50 of file protobuf_wire.h.
References encode_varint().
Referenced by kcenon::monitoring::zipkin_proto::encode_annotation(), encode_bool_field(), encode_bytes_field(), encode_enum_field(), encode_fixed64_field(), kcenon::monitoring::jaeger_proto::encode_key_value(), encode_message_field(), encode_string_field(), encode_uint64_field(), and encode_uint64_field_always().


|
inline |
Encode a uint32 / uint64 / int64 varint field (skips zero).
Definition at line 103 of file protobuf_wire.h.
References encode_tag(), encode_varint(), and varint.
Referenced by kcenon::monitoring::jaeger_proto::encode_duration(), kcenon::monitoring::zipkin_proto::encode_endpoint(), kcenon::monitoring::jaeger_proto::encode_span(), kcenon::monitoring::zipkin_proto::encode_span(), and kcenon::monitoring::jaeger_proto::encode_timestamp().


|
inline |
Encode a uint32 field that is not allowed to be skipped even if zero.
Definition at line 114 of file protobuf_wire.h.
References encode_tag(), encode_varint(), and varint.

|
inline |
Encode an unsigned varint into the buffer.
Definition at line 39 of file protobuf_wire.h.
Referenced by encode_bool_field(), encode_enum_field(), kcenon::monitoring::jaeger_proto::encode_key_value(), encode_length_delimited(), encode_tag(), encode_uint64_field(), and encode_uint64_field_always().

|
inline |
Decode a hexadecimal string into bytes. Odd-length strings are zero-padded on the left; non-hex characters yield an empty vector.
Definition at line 294 of file protobuf_wire.h.
Referenced by kcenon::monitoring::encode_jaeger_batch(), kcenon::monitoring::encode_zipkin_list_of_spans(), kcenon::monitoring::jaeger_span_data::to_protobuf(), and kcenon::monitoring::zipkin_span_data::to_protobuf().

|
inline |
Left-pad bytes to a target width. Used to normalize 8-byte trace IDs to Jaeger's 16-byte on-wire width and similar cases.
Definition at line 336 of file protobuf_wire.h.
Referenced by kcenon::monitoring::encode_jaeger_batch(), kcenon::monitoring::encode_zipkin_list_of_spans(), kcenon::monitoring::jaeger_span_data::to_protobuf(), and kcenon::monitoring::zipkin_span_data::to_protobuf().
