Skip to content

Commit c1af823

Browse files
committed
Reset cached target info cursor when OpenMetricsRequested is false
1 parent e46a446 commit c1af823

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/OpenTelemetry.Exporter.Prometheus.HttpListener/Internal/PrometheusCollectionManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ private ExportResult OnCollect(Batch<Metric> metrics)
213213
}
214214
}
215215
}
216+
else
217+
{
218+
this.targetInfoBufferLength = -1;
219+
}
216220

217221
foreach (var metric in metrics)
218222
{

0 commit comments

Comments
 (0)