|
|
|
@ -28,6 +28,7 @@ public:
|
|
|
|
|
void log_s1_ctx_delete(uint32_t mme_id, uint32_t enb_id, uint16_t rnti) override {}
|
|
|
|
|
void log_sector_start(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {}
|
|
|
|
|
void log_sector_stop(uint32_t cc_idx, uint32_t pci, uint32_t cell_id) override {}
|
|
|
|
|
void log_rlf(uint32_t cc_idx, const std::string& asn1, uint16_t rnti) override {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
@ -38,10 +39,16 @@ namespace {
|
|
|
|
|
DECLARE_METRIC("type", metric_type_tag, std::string, "");
|
|
|
|
|
DECLARE_METRIC("event_name", metric_event_name, std::string, "");
|
|
|
|
|
|
|
|
|
|
DECLARE_METRIC("rnti", metric_rnti, uint16_t, "");
|
|
|
|
|
DECLARE_METRIC("sector_id", metric_sector_id, uint32_t, "");
|
|
|
|
|
|
|
|
|
|
/// ASN1 message metrics.
|
|
|
|
|
DECLARE_METRIC("asn1_length", metric_asn1_length, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC("asn1_message", metric_asn1_message, std::string, "");
|
|
|
|
|
|
|
|
|
|
/// Context for sector start/stop.
|
|
|
|
|
DECLARE_METRIC("pci", metric_pci, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC("cell_identity", metric_cell_identity, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC("sector_id", metric_sector_id, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC_SET("event_data", mset_sector_event, metric_pci, metric_cell_identity, metric_sector_id);
|
|
|
|
|
using sector_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_sector_event>;
|
|
|
|
|
|
|
|
|
@ -53,10 +60,13 @@ using rrc_event_t = srslog::build_context_type<metric_type_tag, metric_event_nam
|
|
|
|
|
/// Context for S1 context create/delete.
|
|
|
|
|
DECLARE_METRIC("mme_ue_s1ap_id", metric_ue_mme_id, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC("enb_ue_s1ap_id", metric_ue_enb_id, uint32_t, "");
|
|
|
|
|
DECLARE_METRIC("rnti", metric_rnti, uint16_t, "");
|
|
|
|
|
DECLARE_METRIC_SET("event_data", mset_s1apctx_event, metric_ue_mme_id, metric_ue_enb_id, metric_rnti);
|
|
|
|
|
using s1apctx_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_s1apctx_event>;
|
|
|
|
|
|
|
|
|
|
/// Context for the RLC event.
|
|
|
|
|
DECLARE_METRIC_SET("event_data", mset_rlfctx_event, metric_asn1_length, metric_asn1_message, metric_rnti);
|
|
|
|
|
using rlfctx_event_t = srslog::build_context_type<metric_type_tag, metric_event_name, mset_rlfctx_event>;
|
|
|
|
|
|
|
|
|
|
/// Logs events into the configured log channel.
|
|
|
|
|
class logging_event_logger : public event_logger_interface
|
|
|
|
|
{
|
|
|
|
@ -131,6 +141,18 @@ public:
|
|
|
|
|
event_channel(ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void log_rlf(uint32_t cc_idx, const std::string& asn1, uint16_t rnti) override
|
|
|
|
|
{
|
|
|
|
|
rlfctx_event_t ctx("");
|
|
|
|
|
|
|
|
|
|
ctx.write<metric_type_tag>("event");
|
|
|
|
|
ctx.write<metric_event_name>("radio_link_failure");
|
|
|
|
|
ctx.get<mset_rlfctx_event>().write<metric_asn1_length>(asn1.size());
|
|
|
|
|
ctx.get<mset_rlfctx_event>().write<metric_asn1_message>(asn1);
|
|
|
|
|
ctx.get<mset_rlfctx_event>().write<metric_rnti>(rnti);
|
|
|
|
|
event_channel(ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
srslog::log_channel& event_channel;
|
|
|
|
|
};
|
|
|
|
|