From a307d19c867f6e8095515b7b21628397e024815e Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:56:30 +0200 Subject: [PATCH] Move otel.scope attributes to registry (#889) --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/change_proposal.yaml | 1 + .github/ISSUE_TEMPLATE/new-conventions.yaml | 1 + docs/attributes-registry/README.md | 1 + docs/attributes-registry/otel.md | 13 ++++++++ model/registry/deprecated/otel.yaml | 19 ++++++++++++ model/registry/otel.yaml | 16 ++++++++++ model/scope/exporter/exporter.yaml | 33 +++------------------ 8 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 docs/attributes-registry/otel.md create mode 100644 model/registry/deprecated/otel.yaml create mode 100644 model/registry/otel.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index ea514863f9..6abd8a9103 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -50,6 +50,7 @@ body: - area:network - area:oci - area:os + - area:otel - area:peer - area:process - area:rpc diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 0b85490497..c064231a77 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -43,6 +43,7 @@ body: - area:network - area:oci - area:os + - area:otel - area:peer - area:process - area:rpc diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 3772bd1134..0b75deac83 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -52,6 +52,7 @@ body: - area:network - area:oci - area:os + - area:otel - area:peer - area:process - area:rpc diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 9886a80627..4d87791234 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -55,6 +55,7 @@ Currently, the following namespaces exist: * [K8s](k8s.md) * [Network](network.md) * [OCI](oci.md) +* [OpenTelemetry](otel.md) * [OS](os.md) * [Peer](peer.md) * [Process](process.md) diff --git a/docs/attributes-registry/otel.md b/docs/attributes-registry/otel.md new file mode 100644 index 0000000000..730ef8a14c --- /dev/null +++ b/docs/attributes-registry/otel.md @@ -0,0 +1,13 @@ + + +# OpenTelemetry + +## Scope Attributes + + +| Attribute | Type | Description | Examples | Stability | +|---|---|---|---|---| +| `otel.scope.name` | string | The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). | `io.opentelemetry.contrib.mongodb` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `otel.scope.version` | string | The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). | `1.0.0` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | + diff --git a/model/registry/deprecated/otel.yaml b/model/registry/deprecated/otel.yaml new file mode 100644 index 0000000000..23456367bc --- /dev/null +++ b/model/registry/deprecated/otel.yaml @@ -0,0 +1,19 @@ +groups: + - id: otel.library + prefix: otel.library + type: resource + brief: > + Span attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. + attributes: + - id: name + type: string + deprecated: use the `otel.scope.name` attribute. + stability: experimental + brief: + examples: ['io.opentelemetry.contrib.mongodb'] + - id: version + type: string + deprecated: use the `otel.scope.version` attribute. + stability: experimental + brief: + examples: ['1.0.0'] diff --git a/model/registry/otel.yaml b/model/registry/otel.yaml new file mode 100644 index 0000000000..1fa7f0da45 --- /dev/null +++ b/model/registry/otel.yaml @@ -0,0 +1,16 @@ +groups: + - id: registry.otel.scope + prefix: otel.scope + type: resource + brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. + attributes: + - id: name + type: string + brief: The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). + examples: ['io.opentelemetry.contrib.mongodb'] + stability: stable + - id: version + type: string + brief: The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + examples: ['1.0.0'] + stability: stable diff --git a/model/scope/exporter/exporter.yaml b/model/scope/exporter/exporter.yaml index 41b27571b4..52f47f0b0e 100644 --- a/model/scope/exporter/exporter.yaml +++ b/model/scope/exporter/exporter.yaml @@ -1,34 +1,9 @@ groups: - id: otel.scope - prefix: otel.scope type: resource brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. attributes: - - id: name - type: string - brief: The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). - examples: ['io.opentelemetry.contrib.mongodb'] - stability: stable - - id: version - type: string - brief: The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - examples: ['1.0.0'] - stability: stable - - id: otel.library - prefix: otel.library - type: resource - brief: > - Span attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. - attributes: - - id: name - type: string - deprecated: use the `otel.scope.name` attribute. - stability: experimental - brief: - examples: ['io.opentelemetry.contrib.mongodb'] - - id: version - type: string - deprecated: use the `otel.scope.version` attribute. - stability: experimental - brief: - examples: ['1.0.0'] + - ref: otel.scope.name + requirement_level: recommended + - ref: otel.scope.version + requirement_level: recommended