Skip to content

Commit

Permalink
Add metric.dotnet.process.cpu.time to exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Nov 26, 2024
1 parent 44681ae commit ec251fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/runtime/dotnet-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `dotnet.process.cpu.time` | Counter | `s` | CPU time used by the process. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dotnet.process.cpu.time` | Counter | `s` | CPU time used by the process. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** Meter name: `System.Runtime`; Added in: .NET 9.0.
This metric reports the same values as accessing the corresponding processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process).
Expand Down
2 changes: 1 addition & 1 deletion model/dotnet/runtime-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ groups:
processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process).
instrument: counter
unit: "s"
stability: experimental
stability: stable
attributes:
- ref: cpu.mode
requirement_level: required
Expand Down
2 changes: 2 additions & 0 deletions policies/group_stability.rego
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ deny[group_stability_violation(description, group.id, name)] {
"metric.kestrel.connection.duration", "metric.kestrel.tls_handshake.duration",
# TODO: https://github.com/open-telemetry/semantic-conventions/issues/1519
"resource.service",
# TODO: https://github.com/open-telemetry/semantic-conventions/issues/1616
"metric.dotnet.process.cpu.time",
}
not exceptions[group.id]

Expand Down

0 comments on commit ec251fa

Please sign in to comment.