Runtime metrics not generated
See original GitHub issueDescription
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 config
Configuration
deployment yaml https://github.com/WeihanLi/SparkTodo/blob/82ba4ac7493afcb476d096cf11f482e9a297003a/sparktodo-api-k8s-deploy.yaml#L20
apiVersion: apps/v1
kind: Deployment
metadata:
name: sparktodo-api
labels:
app: sparktodo-api
spec:
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
app: sparktodo-api
minReadySeconds: 0
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "52323"
labels:
app: sparktodo-api
spec:
containers:
- name: sparktodo-api
image: weihanli/sparktodo-api:latest
imagePullPolicy: Always
resources:
requests:
memory: "64Mi"
cpu: "20m"
limits:
memory: "128Mi"
cpu: "50m"
env:
- name: ASPNETCORE_URLS
value: http://+:80
- name: DOTNET_DiagnosticPorts
value: /diag/port
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 60
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 60
periodSeconds: 30
volumeMounts:
- mountPath: /diag
name: diagvol
- mountPath: /dumps
name: dumpsvol
- name: monitor
image: mcr.microsoft.com/dotnet/monitor:6.0.0
# DO NOT use the --no-auth argument for deployments in production
args: [ "--no-auth" ]
imagePullPolicy: Always
ports:
- containerPort: 52323
env:
- name: DOTNETMONITOR_DiagnosticPort__ConnectionMode
value: Listen
- name: DOTNETMONITOR_DiagnosticPort__EndpointName
value: /diag/port
- name: DOTNETMONITOR_Storage__DumpTempFolder
value: /dumps
- name: DOTNETMONITOR_Urls
value: "http://*:52323"
volumeMounts:
- mountPath: /diag
name: diagvol
- mountPath: /dumps
name: dumpsvol
resources:
requests:
cpu: 50m
memory: 32Mi
limits:
cpu: 100m
memory: 256Mi
securityContext:
capabilities:
add: ["SYS_PTRACE"]
volumes:
- name: diagvol
emptyDir: {}
- name: dumpsvol
emptyDir: {}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:15 (6 by maintainers)
Top Results From Across the Web
SVM: Runtime Metrics Are Not Displayed in Server Manager ...
Symptoms. Runtime metrics are not displayed on Server Manager Management Console for some or all managed instances. Also, no log file can be ......
Read more >JDE Server Manager: missing items under Runtime Metrics
However, when I go into the Enterprise Server window, under Runtime Metrics, there is only "Package Build Files" and "Audit History".
Read more >runtime/metrics
This metric is an overestimate, and not directly comparable to system CPU time measurements. ... Count of completed GC cycles generated by the...
Read more >Runtime Metrics
Enable runtime metrics collection in the tracing client to gain additional insights into an application's performance. Runtime metrics can be viewed in the ......
Read more >DogstatsD not sending JVM runtime metrics from Google ...
My agent is running and trace metrics are coming in fine, but I am not seeing the data coming in on the JVM...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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. I even tried to add System.Runtime manually, both with
IncludeDefaultProviders
set to true and to false, but to no avail.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
/metrics
route.I’m not certain that the interval mismatch is impacting anything within the consumption of the Prometheus metrics. @wiktork any ideas?