Skip to content

Commit

Permalink
fix refactored metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Jun 17, 2024
1 parent 6174be1 commit b73af85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/l2/upper_mac_metrics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class UpperMacMetrics {
{{"logical_channel", "SignallingChannelFull"}, {"error_type", "Decode Error"}}))
, stealing_channel_received_count_decoding_error_(
slot_error_count_family_.Add({{"logical_channel", "StealingChannel"}, {"error_type", "Decode Error"}}))
, upper_mac_packet_metrics_(prometheus_exporter_, "Upper Mac")
, c_plane_signalling_packet_metrics_(prometheus_exporter_, "C-Plane Signalling"){};
, upper_mac_packet_metrics_(prometheus_exporter_, "upper_mac")
, c_plane_signalling_packet_metrics_(prometheus_exporter_, "c_plane_signalling"){};

/// This function is called for every slot once it is passed up from the lower MAC
/// \param slot the content of the slot
Expand Down
3 changes: 2 additions & 1 deletion src/prometheus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ auto PrometheusExporter::upper_mac_fragment_count() noexcept -> prometheus::Fami

auto PrometheusExporter::packet_count(const std::string& protocol) noexcept
-> prometheus::Family<prometheus::Counter>& {
std::string metric_name = protocol + "_packet_count";
return prometheus::BuildCounter()
.Name(protocol + "_packet_count")
.Name(metric_name)
.Help("Incrementing counter of the number of received packets in a protocol layer.")
.Labels({{"name", prometheus_name_}})
.Register(*registry_);
Expand Down

0 comments on commit b73af85

Please sign in to comment.