Mellanox / ufm_sdk_3.0

BSD 3-Clause "New" or "Revised" License
20 stars 21 forks source link

Feature #4151551: TFS plugin refactor streamer.py file #278

Open Miryam-Schwartz opened 1 week ago

Miryam-Schwartz commented 1 week ago

What

_1. Create a seperate file for each class located in the streamer.py file

  1. Remove the data fetching in the Prometheus format
  2. Remove the inline args usage from the flow
  3. Break the UFMTelemetryStreaming class into more granular classes_

Why ?

https://redmine.mellanox.com/issues/4151551. Remove unused functionality and break large file into smaller ones.

How ?

_ Break the UFMTelemetryStreaming class into three classes:

  1. TelemetryParser: Handles fetching the telemetry data, parsing, processing, and caching it in a map.
  2. TelemetryAttributesManager: Updates the saved/cached attributes (headers) when the telemetry data is parsed.
  3. Streamer: Streams data to Fluentd using either the HTTP protocol or the FORWARD protocol _

Testing ?

Regression tests for TFS

Special triggers

Use the following phrases as comments to trigger different runs

ananalaghbar commented 2 days ago

@Miryam-Schwartz , general comment, please also review the current README file and make sure it doesn't contain any information about the removed functionalities , such as supporting the promethues format and inline args