-
Notifications
You must be signed in to change notification settings - Fork 305
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
Bringing .NET Runtime metrics instrumentation to Stable #335
Comments
Here is a doc for the description for existing metrics and a bunch of TODO items. (I'm not sure whether it's better to place it in a markdown file in the folder since it's very long, or to keep it in issue since there are lots of TODO items.) Runtime metrics descriptionMetrics name are prefixed with the RuntimeMetricsOptions.IsGcEnabled
Additional GC metrics only available for NETCOREAPP3_1_OR_GREATER
TODO: Change TODO: It should be TODO: [Question] Chane the name to Additional GC metrics only available for NET6_0_OR_GREATER
GCMemoryInfo.TotalCommittedBytes: TODO: Use the units consistently. RuntimeMetricsOptions.IsJitEnabled (only available for NET6_0_OR_GREATER)
JitInfo.GetCompiledILBytes: JitInfo.GetCompiledMethodCount: JitInfo.GetCompilationTime: TODO: [Question] Why is the last one TODO: Update RuntimeMetricsOptions.IsThreadingEnabled (only available for NETCOREAPP3_1_OR_GREATER)
TODO: None of these should be ObservableCounter which is monotonically increasing. TODO: [Question] any difference in Instrument Type between Int32 vs Int64? RuntimeMetricsOptions.IsProcessEnabled
TODO: Might as well use nanoseconds for this field. Ticks is Int64.
RuntimeMetricsOptions.IsAssembliesEnabled
List of the metrics in RuntimeEventSourceThe issue
New Metricscpu-usageProposal to calculate CPU usage percentage with delta since initialization: RuntimeEventSourceHelper.GetCpuUsage method in RuntimeEventSourceHelper.Windows.cs gen-0-sizeRefer to discussion, |
@xiang17, when you will have agreement here. It will be great to put the specification under https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/runtime-environment-metrics.md#runtime-environment-specific-metrics---processruntimeenvironment Java is already documented here. |
The 1.0.0 version has been released: https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime |
@xiang17 Please share this template |
Opening an issue for gaining feedbacks and making improvements on .NET Runtime metric instrumentation, regarding which metrics to expose, what each metrics means exactly, and how to calculate/fetch each metrics along with clear documentation for each metrics.
The goal is to have well defined and documented metrics for .NET Runtime users to have better knowledge of a system in a user-friendly way, in order to get the Runtime metrics instrumentation library to a stable stage.
Currently the Runtime metrics already works upon finish of the issue #204, but it's still in Alpha stage. The metrics instrumentations are initiated in
RuntimeMetrics.cs
. The metrics are mostly from EventCounters: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.csUI
The primary goal is to provide enable users to utilize user-friendly UI to gain insights in .NET Runtime behavior. Here is a simple demo for the concept. The Grafana dashboard graphs I set up in my laptop look this (see appendix on how to do it):
Or this:
Metrics
TODO: List of metrics grouped in CPU, Memory, Garbage Collection, Threadpool, Process, and etc.
Documentation
Clear description on what each metric means. Given that developers and support engineers might rely on this to debug or diagnose issues, the description should reveal reasonably enough insight into internal details.
Help from Runtime team is appreciated especially for this part.
Appendix
Instruction on how to set up the graphs:
AddRuntimeMetrics
in the Program.cs code according to the Runtime instrumentation library readme.The text was updated successfully, but these errors were encountered: