File tree Expand file tree Collapse file tree 5 files changed +9
-1
lines changed
yt/yt/library/profiling/solomon Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ void TSolomonExporterConfig::Register(TRegistrar registrar)
44
44
.Default (true );
45
45
registrar.Parameter (" convert_counters_to_delta_gauge" , &TThis::ConvertCountersToDeltaGauge)
46
46
.Default (false );
47
-
48
47
registrar.Parameter (" enable_histogram_compat" , &TThis::EnableHistogramCompat)
49
48
.Default (false );
49
+ registrar.Parameter (" report_timestamps_for_rate_metrics" , &TThis::ReportTimestampsForRateMetrics)
50
+ .Default (true );
50
51
51
52
registrar.Parameter (" export_summary" , &TThis::ExportSummary)
52
53
.Default (false );
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ struct TSolomonExporterConfig
42
42
bool RenameConvertedCounters;
43
43
bool ConvertCountersToDeltaGauge;
44
44
bool EnableHistogramCompat;
45
+ bool ReportTimestampsForRateMetrics;
45
46
46
47
bool ExportSummary;
47
48
bool ExportSummaryAsMax;
Original file line number Diff line number Diff line change @@ -462,6 +462,10 @@ int TCube<T>::ReadSensors(
462
462
consumer->OnDouble (time, value.SecondsFloat ());
463
463
}
464
464
} else {
465
+ if (!options.ReportTimestampsForRateMetrics ) {
466
+ time = TInstant::Zero ();
467
+ }
468
+
465
469
// TODO(prime@): RATE is incompatible with windowed read.
466
470
if constexpr (std::is_same_v<T, i64 >) {
467
471
consumer->OnInt64 (time, Rollup (*window, indices.back ()));
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ struct TReadOptions
28
28
bool RenameConvertedCounters = true ;
29
29
double RateDenominator = 1.0 ;
30
30
bool EnableHistogramCompat = false ;
31
+ bool ReportTimestampsForRateMetrics = true ;
31
32
32
33
bool EnableSolomonAggregationWorkaround = false ;
33
34
Original file line number Diff line number Diff line change @@ -644,6 +644,7 @@ void TSolomonExporter::DoHandleShard(
644
644
options.Times = readWindow;
645
645
options.SummaryPolicy = Config_->GetSummaryPolicy ();
646
646
options.MarkAggregates = Config_->MarkAggregates ;
647
+ options.ReportTimestampsForRateMetrics = Config_->ReportTimestampsForRateMetrics ;
647
648
options.StripSensorsNamePrefix = Config_->StripSensorsNamePrefix ;
648
649
options.LingerWindowSize = Config_->LingerTimeout / gridStep;
649
650
You can’t perform that action at this time.
0 commit comments