Open naughtyGitCat opened 2 years ago
UseHttpClientMetrics is provided by the prometheus-net NuGet package. If you are having problems calling this method, please post a minimal sample project to reproduce the issue (e.g. a sample project that fails to compile because it says UseHttpClientMetrics is missing).
finally, figure out it is a function usage issue.
what i actually use is .AddHttpClient()
does not return a IHTTPClientBuilder
builder.Services.AddHttpClient().UseHttpClientMetrics();
builder.Services.AddHttpClient("").UseHttpClientMetrics();
usually, I inject the client with AddHttpClient()
once in Startup.cs
, and do name various clients when getting it from the client factory in different workarounds.
so is there any way to UseHttpClientMetrics
in my condition
Both
prometheus-net
andprometheus-net.AspNetCore
does not suppliesThe source code hints it is contained in
prometheus-net.NetStandard
, but this nuget package does not exist inREADME.md
. and the nuget info shows it is published in the year 2019. meanwhile theAsset
list contains NetStandard newest version