Skip to content
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

Add semantic conventions for process metrics #2061

Merged
merged 2 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ release.
([#2210](https://github.com/open-telemetry/opentelemetry-specification/pull/2210))
- Use UCUM units in Metrics Semantic Conventions.
([#2199](https://github.com/open-telemetry/opentelemetry-specification/pull/2199))
- Add semantic conventions for process metrics.
[#2032](https://github.com/open-telemetry/opentelemetry-specification/pull/2061)
- Changed default Prometheus Exporter host from `0.0.0.0` to `localhost`.
([#2282](https://github.com/open-telemetry/opentelemetry-specification/pull/2282))

Expand Down
6 changes: 4 additions & 2 deletions specification/metrics/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ for the total amount of memory on a system.
amount of memory in a each state. Where appropriate, the sum of **usage**
over all attribute values SHOULD be equal to the **limit**.

A measure of the amount of an unlimited resource consumed is differentiated
from **usage**.
A measure of the amount consumed of an unlimited resource, or of a resource
whose limit is unknowable, is differentiated from **usage**. For example, the
maximum possible amount of virtual memory that a process may consume may
fluctuate over time and is not typically known.

- **utilization** - an instrument that measures the *fraction* of **usage**
out of its **limit** should be called `entity.utilization`. For example,
Expand Down
17 changes: 16 additions & 1 deletion specification/metrics/semantic_conventions/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,24 @@ metrics](runtime-environment-metrics.md).
<!-- toc -->

- [Metric Instruments](#metric-instruments)
* [Process](#process)
- [Attributes](#attributes)

<!-- tocstop -->

## Metric Instruments

TODO
### Process

Below is a table of Process metric instruments.

| Name | Instrument | Units | Description | Labels |
|------|------------|-------|-------------|--------|
| `process.cpu.time` | Asynchronous Counter | s | Total CPU seconds broken down by different states. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
djaglowski marked this conversation as resolved.
Show resolved Hide resolved
| `process.memory.usage` | Asynchronous UpDownCounter | By | The amount of physical memory in use. | |
| `process.memory.virtual` | Asynchronous UpDownCounter | By | The amount of committed virtual memory. | |
| `process.disk.io` | Asynchronous Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |

## Attributes

Process metrics SHOULD be associated with a [`process`](../../resource/semantic_conventions/process.md#process) resource whose attributes provide additional context about the process.