diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index ca6c1c2..41b3f16 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -3307,7 +3307,7 @@ testmetric1_1{foo="bar"} 10 testmetric1_2{foo="baz"} 20 # HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom # TYPE testmetric2_1 untyped -testmetric2_1{foo="bar"} 30 1441205977284 +testmetric2_1{foo="bar"} 30 # HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom # TYPE testmetric2_2 untyped -testmetric2_2{foo="baz"} 40 1441205977284 +testmetric2_2{foo="baz"} 40 diff --git a/collector/textfile.go b/collector/textfile.go index 728dbc8..7922000 100644 --- a/collector/textfile.go +++ b/collector/textfile.go @@ -77,6 +77,10 @@ func convertMetricFamily(metricFamily *dto.MetricFamily, ch chan<- prometheus.Me } for _, metric := range metricFamily.Metric { + if metric.TimestampMs != nil { + log.Warnf("Ignoring unsupported custom timestamp on textfile collector metric %v", metric) + } + labels := metric.GetLabel() var names []string var values []string