Hello,
I'm trying to collect new .NET Meter stuff with prometheus-net and noticed some strange behaviour. If I collect metrics using
await Prometheus.Metrics.DefaultRegistry.CollectAndExportAsTextAsync(memoryStream, cancellationToken);
I just get only one metric - prometheus_net_meteradapter_instruments_connected
And only second call to the same method will return real metrics, for example from system.http or microsoft.aspnetcore.
Looks like that first call performs sort of bootstrap and only after this call library really starts listening .NET metrics.
Although it's easy to add the call to CollectAndExportAsTextAsync in the beginning of Program.cs, it looks a bit "hacky", maybe there is a better way to "bootstrap" things or we need to introduce one.
Thanks!