-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime metrics not generated #1241
Comments
I'm experiencing the same issue when I run dotnet-monitor as a sidecar in AKS. I'm able add other providers, e.g. System.Net.Http and Microsoft-AspNetCore-Server-Kestrel and I get metrics for them. |
Hey Folks, make sure that you are using the latest dotnet-monitor version (this is easily done if you are using a floating tag e.g.
|
@jander-msft Just tried this again with the latest version of dotnet-monitor running in a side-car in AKS with default providers. But I can't seem to get any metrics other than these I'm afraid:
|
@johan-bjerling I'm using following configuration and it works for me. - name: monitor
securityContext:
runAsUser: 1000
image: mcr.microsoft.com/dotnet/monitor:6-alpine
args: [ "--no-auth" ]
imagePullPolicy: IfNotPresent
ports:
- name: metrics
containerPort: 52323
env:
- name: DOTNETMONITOR_DiagnosticPort__ConnectionMode
value: "Listen"
- name: DOTNETMONITOR_DiagnosticPort__EndpointName
value: "/diag/port.sock"
- name: DOTNETMONITOR_Storage__DumpTempFolder
value: "/diag/dumps"
- name: DOTNETMONITOR_Urls
value: http://+:52323
- name: DefaultProcess__Filters__0__Key
value: "ProcessName"
- name: DefaultProcess__Filters__0__Value
value: "dotnet"
- name: DotnetMonitor_Metrics__Providers__0__ProviderName
value: "Microsoft-AspNetCore-Server-Kestrel"
- name: DotnetMonitor_Metrics__Providers__1__ProviderName
value: "Microsoft.AspNetCore.Http.Connections"
- name: DotnetMonitor_Metrics__Providers__2__ProviderName
value: "System.Net.Http"
- name: DotnetMonitor_Metrics__Providers__3__ProviderName
value: "System.Net.NameResolution"
- name: DotnetMonitor_Metrics__Providers__4__ProviderName
value: "System.Net.Security"
- name: DotnetMonitor_Metrics__Providers__5__ProviderName
value: "System.Net.Sockets"
volumeMounts:
- mountPath: /diag
name: diagvol
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "250m" |
@xsoheilalizadeh Yep, I can get all of those metrics to work for me as well. Unfortunately neither adding "System.Runtime" explicitly or relying on it implicitly being added via the default providers seem to work. |
Could you provide the full configuration of your dotnet-monitor instance? If you exec into the dotnet-monitor container and execute #2730 may be related |
@jander-msft sure, here's the full config:
|
Couple of thoughts here:
|
My app was not trimmed. It was however using OpenTelemetry. But as we couldn't get the dotnet-monitor sidecar to work quite how we wanted it, that's now been removed. So I don't have an easy way of testing this again without OpenTelemetry. I suspect I won't have the time in the near future to try this out, but I will report back if I do! |
I have the same problem. Unable to get system.runtime metrics in the /metrics endpoint. This is my config
I am using version 7.0.2 as a sidecar in a pod in AKS. |
I have the same issue with version 7.2. The deployment is :
And the dotnet monitor config is :
|
Please check the two questions that I've asked before: #1241 (comment) Also, if you use any other tools that collect EventCounters and they are not collecting at the same interval as .NET Monitor (default is 5 seconds), then that will cause .NET Monitor to fail to collect them. |
hey @jander-msft - we are using OpenTelemetry and I am not seeing metrics in Prometheus. Although, when I curl http://localhost:52325/metrics I do see metrics getting generated for microsoftaspnetcorehosting, systemruntime and microsoftaspnetcoreserverkestrel but I don't see them in Prometheus. I am assuming it has to do with interval mismatch with OpenTelemetry and .Net Monitor? Is the fix to make sure the interval values match for .Net Monitor and OpenTelemetry? Is there any other change that needs to be made? Thanks in advance! |
If you see systemruntime from .NET Monitor, then it is unlikely that OpenTelemetry is interfering with the collection of metrics by .NET Monitor.
.NET Monitor doesn't automatically provide information to a Promethues server; you have to configure that server to scrape the I'm not certain that the interval mismatch is impacting anything within the consumption of the Prometheus metrics. @wiktork any ideas? |
Description
When I try to use the dotnet-monitor as a sidecar container, the runtime metrics is not generated
I could only get the following metrics:
It seemed only have
microsoftaspnetcorehosting
related provider? Not sure if I'm wrong with some configConfiguration
deployment yaml https://github.com/WeihanLi/SparkTodo/blob/82ba4ac7493afcb476d096cf11f482e9a297003a/sparktodo-api-k8s-deploy.yaml#L20
The text was updated successfully, but these errors were encountered: