diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-02 21:38:19 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-02 21:38:19 +0300 |
| commit | 0df9f37075dd697ac34f4ed2a2749f62aa27a654 (patch) | |
| tree | 5d95103b41d4954eff9f266317c5a525e9a0e3e9 /Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs | |
| parent | 4222eddece906d6f0877022c06b853deb5068472 (diff) | |
| download | Tango-0df9f37075dd697ac34f4ed2a2749f62aa27a654.tar.gz Tango-0df9f37075dd697ac34f4ed2a2749f62aa27a654.zip | |
Telemetry Testing.
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs index 4a3776b87..a9f4954dd 100644 --- a/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs +++ b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs @@ -1,22 +1,62 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Tango.BL.Enumerations; namespace Tango.Telemetry { public class TelemetryPublisherConfiguration { - public String MachineID { get; set; } + /// <summary> + /// Unique identifier of the machine sending telemetry. Used for tagging and routing. + /// </summary> + public String SerialNumber { get; set; } + + /// <summary> + /// Enum representing the type of machine (e.g., X1, X4). Helps differentiate models in telemetry. + /// </summary> public MachineTypes MachineType { get; set; } + + /// <summary> + /// Environment in which the telemetry is being published (e.g., Production, QA, Dev). + /// </summary> public String Environment { get; set; } + + /// <summary> + /// Interval for checking and reprocessing failed/pending telemetry from local storage. + /// </summary> public TimeSpan PendingStorageCheckInterval { get; set; } + + /// <summary> + /// Maximum number of pending telemetry records to process in a single retry cycle. + /// </summary> public int MaxPendingStorageTelemetriesPerCycle { get; set; } + + /// <summary> + /// Frequency at which historical sources are polled to request backlogged or missed telemetry. + /// </summary> public TimeSpan HistorySourcesRequestInterval { get; set; } + + /// <summary> + /// Maximum number of telemetry packages allowed in memory queues before rejecting new packages. + /// </summary> public int MaxPendingTelemetries { get; set; } + /// <summary> + /// Whether exponential backoff should be applied to retry logic per destination. + /// </summary> + public bool EnableBackoff { get; set; } + + /// <summary> + /// The maximum amount of time to delay retries during exponential backoff. + /// </summary> + public TimeSpan MaxExponentialBackoff { get; set; } = TimeSpan.FromHours(1); + + /// <summary> + /// Gets or sets the interval at which the published telemetry cache cleanup process should occur. + /// This defines how frequently old published telemetry entries are eligible for pruning, + /// based on their publication timestamp. + /// </summary> + public TimeSpan PublishedTelemetriesCacheCleanupInterval { get; set; } = TimeSpan.FromHours(1); + public TelemetryPublisherConfiguration() { PendingStorageCheckInterval = TimeSpan.FromMinutes(1); @@ -27,8 +67,8 @@ namespace Tango.Telemetry public void Validate() { - if (!MachineID.IsNotNullOrEmpty()) - throw new ArgumentNullException(nameof(MachineID), "MachineID is not set or empty."); + if (!SerialNumber.IsNotNullOrEmpty()) + throw new ArgumentNullException(nameof(SerialNumber), "SerialNumber is not set or empty."); if (!Environment.IsNotNullOrEmpty()) throw new ArgumentNullException(nameof(Environment), "Environment is not set or empty."); |
