Fix e2e tests after textfile custom timestamp removal (#768)

This commit is contained in:
Julius Volz 2017-12-24 11:54:33 +01:00 committed by GitHub
parent 1f2458f42c
commit f536857ac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -3307,7 +3307,7 @@ testmetric1_1{foo="bar"} 10
testmetric1_2{foo="baz"} 20 testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom # HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped # 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 # HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped # TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40 1441205977284 testmetric2_2{foo="baz"} 40

View File

@ -77,6 +77,10 @@ func convertMetricFamily(metricFamily *dto.MetricFamily, ch chan<- prometheus.Me
} }
for _, metric := range metricFamily.Metric { for _, metric := range metricFamily.Metric {
if metric.TimestampMs != nil {
log.Warnf("Ignoring unsupported custom timestamp on textfile collector metric %v", metric)
}
labels := metric.GetLabel() labels := metric.GetLabel()
var names []string var names []string
var values []string var values []string