-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
<!--- Hugo front matter used to generate the website version of this page: | ||
linkTitle: Runtime Environment | ||
linkTitle: Semantic Conventions for Runtime Environment | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
chalin
Contributor
|
||
---> | ||
|
||
# Semantic Conventions for Runtime Environment Metrics | ||
# Semantic Conventions for Runtime Environment | ||
|
||
**Status**: [Experimental][DocumentStatus] | ||
|
||
This document includes semantic conventions for runtime environment level | ||
metrics in OpenTelemetry. Also consider the [general | ||
metric](/docs/general/metrics.md#general-metric-semantic-conventions), [system | ||
metrics](system-metrics.md) and [OS Process metrics](process-metrics.md) | ||
semantic conventions when instrumenting runtime environments. | ||
This document defines semantic conventions for | ||
runtime environment spans, metrics and logs. | ||
|
||
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` --> | ||
|
||
<!-- toc --> | ||
|
||
- [Metric Instruments](#metric-instruments) | ||
* [Runtime Environment Specific Metrics - `process.runtime.{environment}.`](#runtime-environment-specific-metrics---processruntimeenvironment) | ||
- [Attributes](#attributes) | ||
- [Metrics](#metrics) | ||
* [Attributes](#attributes) | ||
|
||
<!-- tocstop --> | ||
|
||
## Metric Instruments | ||
## Metrics | ||
|
||
Runtime environments vary widely in their terminology, implementation, and | ||
relative values for a given metric. For example, Go and Python are both | ||
|
@@ -32,26 +28,30 @@ does not propose any standard top-level runtime metric instruments. See [OTEP | |
108](https://github.com/open-telemetry/oteps/pull/108/files) for additional | ||
discussion. | ||
|
||
### Runtime Environment Specific Metrics - `process.runtime.{environment}.` | ||
|
||
Metrics specific to a certain runtime environment should be prefixed with | ||
`process.runtime.{environment}.` and follow the semantic conventions outlined in | ||
[general metric semantic | ||
conventions](/docs/general/metrics.md#general-metric-semantic-conventions). Authors of | ||
runtime instrumentations are responsible for the choice of `{environment}` to | ||
avoid ambiguity when interpreting a metric's name or values. | ||
the runtime's top-level namespace `{environment}.*`, e.g., `jvm.*` and follow the | ||
[general metric semantic convention guidelines](/docs/general/metrics.md#general-metric-semantic-conventions). | ||
|
||
Authors of runtime instrumentations are responsible for the choice of | ||
`{environment}` to avoid ambiguity when interpreting a metric's name or values. | ||
|
||
For example, some programming languages have multiple runtime environments | ||
that vary significantly in their implementation, like [Python which has many | ||
implementations](https://wiki.python.org/moin/PythonImplementations). For | ||
such languages, consider using specific `{environment}` prefixes to avoid | ||
ambiguity, like `process.runtime.cpython.` and `process.runtime.pypy.`. | ||
ambiguity, like `cpython.*` and `pypy.*`. | ||
|
||
Also consider the | ||
[general metrics](/docs/general/metrics.md#general-metric-semantic-conventions), | ||
[system metrics](/docs/system/system-metrics.md) and | ||
[OS process metrics](/docs/system/process-metrics.md) | ||
semantic conventions when instrumenting runtime environments. | ||
|
||
There are other dimensions even within a given runtime environment to | ||
consider, for example pthreads vs green thread implementations. | ||
- [JVM](jvm-metrics.md) | ||
|
||
## Attributes | ||
### Attributes | ||
|
||
[`process.runtime`](/docs/resource/process.md#process-runtimes) resource attributes SHOULD be included on runtime metric events as appropriate. | ||
[`process.runtime`](/docs/resource/process.md#process-runtimes) | ||
resource attributes SHOULD be included on runtime metric events as appropriate. | ||
|
||
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md |
@joaopgrassi - Why was the prefix "Semantic Conventions for" added to the
linkTitle
here?