From 47a10365e697d0221790c9bf9e23402472d22b58 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Sat, 1 Jul 2023 16:54:23 +0200 Subject: [PATCH] Moved system metrics semconv Signed-off-by: Alexander Wert --- specification/README.md | 1 + specification/general/metrics-general.md | 9 +++++---- specification/system/README.md | 14 ++++++++++++++ .../hardware-metrics.md | 2 +- .../process-metrics.md | 2 +- .../runtime-environment-metrics.md | 2 +- .../system-metrics.md | 0 7 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 specification/system/README.md rename specification/{metrics/semantic_conventions => system}/hardware-metrics.md (99%) rename specification/{metrics/semantic_conventions => system}/process-metrics.md (97%) rename specification/{metrics/semantic_conventions => system}/runtime-environment-metrics.md (99%) rename specification/{metrics/semantic_conventions => system}/system-metrics.md (100%) diff --git a/specification/README.md b/specification/README.md index 6b66879a39..0ccefab930 100644 --- a/specification/README.md +++ b/specification/README.md @@ -10,6 +10,7 @@ Semantic Conventions are defined for the following areas: * [Exceptions](exceptions/README.md): Semantic Conventions for Exceptions. * [HTTP](http/README.md): Semantic Conventions for HTTP client and server operations. * [Database](database/README.md): Semantic Conventions for database operations. +* [System](system/README.md): System Semantic Conventions. * *Other areas can be found in the signal specific Semantic Conventions below* Semantic Conventions by signals: diff --git a/specification/general/metrics-general.md b/specification/general/metrics-general.md index d167ff5b2b..0c3ac8f2cc 100644 --- a/specification/general/metrics-general.md +++ b/specification/general/metrics-general.md @@ -22,11 +22,12 @@ The following semantic conventions surrounding metrics are defined: * [HTTP](/specification/http/http-metrics.md): For HTTP client and server metrics. * [RPC](/specification/metrics/semantic_conventions/rpc-metrics.md): For RPC client and server metrics. * [Database](/specification/database/database-metrics.md): For SQL and NoSQL client metrics. -* [System](/specification/metrics/semantic_conventions/system-metrics.md): For standard system metrics. -* [Process](/specification/metrics/semantic_conventions/process-metrics.md): For standard process metrics. -* [Runtime Environment](/specification/metrics/semantic_conventions/runtime-environment-metrics.md): For runtime environment metrics. * [FaaS](/specification/metrics/semantic_conventions/faas-metrics.md): For [Function as a Service](https://en.wikipedia.org/wiki/Function_as_a_service) metrics. -* [Hardware](/specification/metrics/semantic_conventions/hardware-metrics.md): For hardware-related metrics. +* **System metrics** + * [System](/specification/system/system-metrics.md): For standard system metrics. + * [Hardware](/specification/system/hardware-metrics.md): For hardware-related metrics. + * [Process](/specification/system/process-metrics.md): For standard process metrics. + * [Runtime Environment](/specification/system/runtime-environment-metrics.md): For runtime environment metrics. Apart from semantic conventions for metrics, [traces](trace-general.md), [logs](logs-general.md), and [events](events-general.md), OpenTelemetry also defines the concept of overarching [Resources](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.0/specification/resource/sdk.md) with diff --git a/specification/system/README.md b/specification/system/README.md new file mode 100644 index 0000000000..d8ac2c55d5 --- /dev/null +++ b/specification/system/README.md @@ -0,0 +1,14 @@ +# System semantic conventions + +**Status**: [Experimental][DocumentStatus] + +This document defines semantic conventions for systems (such as processes, runtimes, hardware, etc.). + +System semantic conventions are defined for the following metrics: + +* [System](system-metrics.md): For standard system metrics. +* [Hardware](hardware-metrics.md): For hardware-related metrics. +* [Process](process-metrics.md): For standard process metrics. +* [Runtime Environment](runtime-environment-metrics.md): For runtime environment metrics. + +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md diff --git a/specification/metrics/semantic_conventions/hardware-metrics.md b/specification/system/hardware-metrics.md similarity index 99% rename from specification/metrics/semantic_conventions/hardware-metrics.md rename to specification/system/hardware-metrics.md index 8bdfbbeaf7..440597af9d 100644 --- a/specification/metrics/semantic_conventions/hardware-metrics.md +++ b/specification/system/hardware-metrics.md @@ -35,7 +35,7 @@ when creating instruments not explicitly defined in the specification. ## Common hardware attributes -All metrics in `hw.` instruments should be attached to a [Host Resource](../../resource/semantic_conventions/host.md) +All metrics in `hw.` instruments should be attached to a [Host Resource](/specification/resource/semantic_conventions/host.md) and therefore inherit its attributes, like `host.id` and `host.name`. Additionally, all metrics in `hw.` instruments have the following attributes: diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/system/process-metrics.md similarity index 97% rename from specification/metrics/semantic_conventions/process-metrics.md rename to specification/system/process-metrics.md index b591edede6..ebf612f1e1 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/system/process-metrics.md @@ -46,6 +46,6 @@ Below is a table of Process metric instruments. ## Attributes -Process metrics SHOULD be associated with a [`process`](../../resource/semantic_conventions/process.md#process) resource whose attributes provide additional context about the process. +Process metrics SHOULD be associated with a [`process`](/specification/resource/semantic_conventions/process.md#process) resource whose attributes provide additional context about the process. [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/system/runtime-environment-metrics.md similarity index 99% rename from specification/metrics/semantic_conventions/runtime-environment-metrics.md rename to specification/system/runtime-environment-metrics.md index 6691c01cc7..d5cbebdc1b 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/system/runtime-environment-metrics.md @@ -71,7 +71,7 @@ consider, for example pthreads vs green thread implementations. ## Attributes -[`process.runtime`](../../resource/semantic_conventions/process.md#process-runtimes) resource attributes SHOULD be included on runtime metric events as appropriate. +[`process.runtime`](/specification/resource/semantic_conventions/process.md#process-runtimes) resource attributes SHOULD be included on runtime metric events as appropriate. ## JVM Metrics diff --git a/specification/metrics/semantic_conventions/system-metrics.md b/specification/system/system-metrics.md similarity index 100% rename from specification/metrics/semantic_conventions/system-metrics.md rename to specification/system/system-metrics.md