Skip to content

Commit

Permalink
issue:4098913: [TFS Plugin]: Fixing streaming from telemetry with Pro…
Browse files Browse the repository at this point in the history
…metheus format is broken (#267)
  • Loading branch information
ananalaghbar authored Oct 6, 2024
1 parent 0d3efc7 commit 9a90a19
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/fluentd_telemetry_plugin/src/streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,10 +756,6 @@ def _parse_telemetry_csv_metrics_to_json(self, data, msg_tag, is_xdr_mode):
port_key_generator = self._get_port_id_from_csv_row
port_key_generator_args = (normal_port_id_keys_indexes,)

if self.last_streamed_data_sample_per_endpoint.get(msg_tag, None) is None:
self.last_streamed_data_sample_per_endpoint[msg_tag] = {}


parser_method = self._parse_telemetry_csv_metrics_to_json_with_delta if self.stream_only_new_samples \
else self._parse_telemetry_csv_metrics_to_json_without_delta

Expand Down Expand Up @@ -872,6 +868,8 @@ def stream_data(self, telemetry_endpoint): # pylint: disable=too-many-locals
new_data_timestamp = None
num_of_counters = data_len = 0
if telemetry_data:
if self.last_streamed_data_sample_per_endpoint.get(msg_tag, None) is None:
self.last_streamed_data_sample_per_endpoint[msg_tag] = {}
ufm_telemetry_is_prometheus_format = self._check_data_prometheus_format(telemetry_data)
logging.info('Start Processing The Received Response From %s', msg_tag)
start_time = time.time()
Expand Down

0 comments on commit 9a90a19

Please sign in to comment.