Closed mhdimsy closed 4 months ago
Is the scraping endpoint setup as well? (The code snippet above does not indicate so...) https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/examples/AspNetCore/Program.cs#L168
Yes In startup.cs file this line exist. Just the first few seconds it works fine, but then it stops sending. please see the image
FYI: I activate console exporter While the console is printing the metrics correctly, the issue I mentioned still exists.
@mhdimsy, please give a chance to OpenTelemetry.Exporter.Prometheus.AspNetCore 1.9.0-beta.2. It was released yesterday.
@Kielek , Thanks it works. But AddAspNetCoreInstrumentation not has http_server_active_requests metrics, this is correct?
@mhdimsy, please check https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNetCore-1.9.0/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#metrics
I am closing this as the issue was solved. Please create separate one if you fins some problems with metrics.
What is the question?
Hello everyone. The metrics page may appear blank after a few seconds. Then Prometheus shows the job is up, but metrics are not scraped.
My config is
I use dotnet 6 and this packages: OpenTelemetry.Exporter.Console 1.9.0 OpenTelemetry.Exporter.Prometheus.AspNetCore 1.9.0-beta.1 OpenTelemetry.Extensions.Hosting 1.9.0 OpenTelemetry.Instrumentation.AspNetCore 1.9.0 OpenTelemetry.Instrumentation.EntityFrameworkCore 1.0.0-beta.12 OpenTelemetry.Instrumentation.Http 1.9.0 OpenTelemetry.Instrumentation.Runtime 1.9.0 OpenTelemetry.Instrumentation.SqlClient 1.9.0-beta.1
Even though nothing is being collected, it takes 259.968 to complete(last scraping).