From f14f54c1599dca70ba926c58a88dd71d39b32148 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Mon, 16 Sep 2024 09:01:23 -0400 Subject: [PATCH 1/3] Use YAML descriptions for Resources (#1400) --- .chloggen/2921.yaml | 30 +++++ Makefile | 2 +- docs/resource/README.md | 56 ++++---- docs/resource/android.md | 15 +-- docs/resource/browser.md | 17 ++- docs/resource/cloud-provider/aws/ecs.md | 15 +-- docs/resource/cloud-provider/aws/eks.md | 15 +-- docs/resource/cloud-provider/aws/logs.md | 15 +-- docs/resource/cloud-provider/gcp/cloud-run.md | 11 +- docs/resource/cloud-provider/gcp/gce.md | 11 +- docs/resource/cloud-provider/heroku.md | 7 + docs/resource/cloud.md | 15 +-- docs/resource/container.md | 15 +-- docs/resource/deployment-environment.md | 15 +-- docs/resource/device.md | 15 +-- docs/resource/faas.md | 15 +-- docs/resource/host.md | 22 ++-- docs/resource/k8s.md | 124 +++++++++++------- docs/resource/os.md | 15 +-- docs/resource/process.md | 22 ++-- docs/resource/webengine.md | 15 +-- model/resource/android.yaml | 1 + model/resource/browser.yaml | 1 + model/resource/cloud.yaml | 1 + model/resource/cloud_provider/aws/ecs.yaml | 1 + model/resource/cloud_provider/aws/eks.yaml | 1 + model/resource/cloud_provider/aws/logs.yaml | 1 + .../cloud_provider/gcp/cloud_run.yaml | 1 + model/resource/cloud_provider/gcp/gce.yaml | 1 + model/resource/cloud_provider/heroku.yaml | 1 + model/resource/container.yaml | 1 + model/resource/deployment_environment.yaml | 1 + model/resource/device.yaml | 1 + model/resource/faas.yaml | 1 + model/resource/host.yaml | 2 + model/resource/k8s.yaml | 11 ++ model/resource/os.yaml | 1 + model/resource/process.yaml | 2 + model/resource/service.yaml | 2 + model/resource/service_experimental.yaml | 1 + model/resource/telemetry.yaml | 4 +- model/resource/telemetry_experimental.yaml | 3 +- model/resource/webengine.yaml | 1 + model/scope/exporter/exporter.yaml | 2 + policies/compatibility.rego | 74 +++++++++++ policies/yaml_schema.rego | 20 +++ policies/yaml_schema_test.rego | 14 ++ policies_test/compatibility_test.rego | 110 +++++++++++++++- .../registry/markdown/resource_macros.j2 | 9 ++ templates/registry/markdown/snippet.md.j2 | 4 +- 50 files changed, 540 insertions(+), 200 deletions(-) create mode 100644 .chloggen/2921.yaml create mode 100644 templates/registry/markdown/resource_macros.j2 diff --git a/.chloggen/2921.yaml b/.chloggen/2921.yaml new file mode 100644 index 0000000000..e26eb173a4 --- /dev/null +++ b/.chloggen/2921.yaml @@ -0,0 +1,30 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: other + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update resource to include stability in the YAML file + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [1399] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Makes the following changes: + + - Require `name` on resource groups. + - Enforce backwards compatibility stability requirements on resource groups. + - Rename `telemetry` to `telemetry.sdk`, attributes are unchanged. + - Mark `telemetry.sdk` and `resource` as stable in YAML model. + - Markdown templates for resource groups NOW includes header describing + the reosurce `type`, `stability` and `description`. diff --git a/Makefile b/Makefile index 4cb81c253e..603c9b43ae 100644 --- a/Makefile +++ b/Makefile @@ -251,4 +251,4 @@ test-policies: .PHONY: compatibility-check compatibility-check: docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec --pull=always \ - $(SEMCONVGEN_CONTAINER) -f /source compatibility --previous-version $(LATEST_RELEASED_SEMCONV_VERSION) + $(SEMCONVGEN_CONTAINER) --continue-on-validation-errors -f /source compatibility --previous-version $(LATEST_RELEASED_SEMCONV_VERSION) diff --git a/docs/resource/README.md b/docs/resource/README.md index 78770202e6..ca2387cb52 100644 --- a/docs/resource/README.md +++ b/docs/resource/README.md @@ -73,12 +73,6 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet ## Service -**Status**: [Stable][DocumentStatus] - -**type:** `service` - -**Description:** A service instance. - @@ -86,6 +80,13 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet + +**Status:** ![Stable](https://img.shields.io/badge/-stable-lightgreen) + +**type:** `service` + +**Description:** A service instance. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`service.name`](/docs/attributes-registry/service.md) | string | Logical name of the service. [1] | `shoppingcart` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -103,12 +104,6 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet ## Service (Experimental) -**Status**: [Experimental][DocumentStatus] - -**type:** `service` - -**Description:** Additions to service instance. - @@ -116,6 +111,13 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `service` + +**Description:** A service instance. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`service.instance.id`](/docs/attributes-registry/service.md) | string | The string ID of the service instance. [1] | `627cc493-f310-47de-96bd-71410b7dec09` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -174,19 +176,20 @@ service.name = Shop.shoppingcart ## Telemetry SDK -**Status**: [Stable][DocumentStatus] - -**type:** `telemetry.sdk` - -**Description:** The telemetry SDK used to capture data recorded by the instrumentation libraries. - - + + +**Status:** ![Stable](https://img.shields.io/badge/-stable-lightgreen) + +**type:** `telemetry.sdk` + +**Description:** The telemetry SDK used to capture data recorded by the instrumentation libraries. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`telemetry.sdk.language`](/docs/attributes-registry/telemetry.md) | string | The language of the telemetry SDK. | `cpp`; `dotnet`; `erlang` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -228,19 +231,20 @@ All custom identifiers SHOULD be stable across different versions of an implemen ## Telemetry Distribution (Experimental) -**Status**: [Experimental][DocumentStatus] - -**type:** `telemetry.distro` - -**Description:** The telemetry distribution (distro) used to capture data recorded by the instrumentation libraries. - - + + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `telemetry.sdk` + +**Description:** The telemetry SDK used to capture data recorded by the instrumentation libraries. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`telemetry.distro.name`](/docs/attributes-registry/telemetry.md) | string | The name of the auto instrumentation agent or distribution, if used. [1] | `parts-unlimited-java` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/android.md b/docs/resource/android.md index 0f19b35bbd..674aea1b89 100644 --- a/docs/resource/android.md +++ b/docs/resource/android.md @@ -1,11 +1,5 @@ # Android -**Status**: [Experimental][DocumentStatus] - -**type:** `android` - -**Description**: The Android platform on which the Android application is running. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `android` + +**Description:** The Android platform on which the Android application is running. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`android.os.api_level`](/docs/attributes-registry/android.md) | string | Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). | `33`; `32` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -22,5 +23,3 @@ - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/browser.md b/docs/resource/browser.md index 65c19f76b2..333583a3d1 100644 --- a/docs/resource/browser.md +++ b/docs/resource/browser.md @@ -1,13 +1,5 @@ # Browser -**Status**: [Experimental][DocumentStatus] - -**type:** `browser` - -**Description**: The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser (regardless of whether running on a mobile or desktop device). - -All of these attributes can be provided by the user agent itself in the form of an HTTP header (e.g. Sec-CH-UA, Sec-CH-Platform, User-Agent). However, the headers could be removed by proxy servers, and are tied to calls from individual clients. In order to support batching through services like the Collector and to prevent loss of data (e.g. due to proxy servers removing headers), these attributes should be used when possible. - @@ -15,6 +7,13 @@ All of these attributes can be provided by the user agent itself in the form of + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `browser` + +**Description:** The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser (regardless of whether running on a mobile or desktop device). + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`browser.brands`](/docs/attributes-registry/browser.md) | string[] | Array of brand name and version separated by a space [1] | `[" Not A;Brand 99", "Chromium 99", "Chrome 99"]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -42,4 +41,4 @@ The list of possible values is defined in the [W3C User-Agent Client Hints speci -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status +All of these attributes can be provided by the user agent itself in the form of an HTTP header (e.g. Sec-CH-UA, Sec-CH-Platform, User-Agent). However, the headers could be removed by proxy servers, and are tied to calls from individual clients. In order to support batching through services like the Collector and to prevent loss of data (e.g. due to proxy servers removing headers), these attributes should be used when possible. diff --git a/docs/resource/cloud-provider/aws/ecs.md b/docs/resource/cloud-provider/aws/ecs.md index df00ed8fad..596d44ad5a 100644 --- a/docs/resource/cloud-provider/aws/ecs.md +++ b/docs/resource/cloud-provider/aws/ecs.md @@ -1,11 +1,5 @@ # AWS ECS -**Status**: [Experimental][DocumentStatus] - -**type:** `aws.ecs` - -**Description:** Resources used by AWS Elastic Container Service (ECS). - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `aws.ecs` + +**Description:** Resources used by AWS Elastic Container Service (ECS). + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`aws.ecs.task.id`](/docs/attributes-registry/aws.md) | string | The ID of a running ECS task. The ID MUST be extracted from `task.arn`. | `10838bed-421f-43ef-870a-f43feacbbb5b`; `23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | `Conditionally Required` If and only if `task.arn` is populated. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -36,5 +37,3 @@ - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/cloud-provider/aws/eks.md b/docs/resource/cloud-provider/aws/eks.md index 5a06d5dc79..e0dae028ba 100644 --- a/docs/resource/cloud-provider/aws/eks.md +++ b/docs/resource/cloud-provider/aws/eks.md @@ -1,11 +1,5 @@ # AWS EKS -**Status**: [Experimental][DocumentStatus] - -**type:** `aws.eks` - -**Description:** Resources used by AWS Elastic Kubernetes Service (EKS). - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `aws.eks` + +**Description:** Resources used by AWS Elastic Kubernetes Service (EKS). + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`aws.eks.cluster.arn`](/docs/attributes-registry/aws.md) | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -22,5 +23,3 @@ - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/cloud-provider/aws/logs.md b/docs/resource/cloud-provider/aws/logs.md index fe8544eb18..e0713e55d1 100644 --- a/docs/resource/cloud-provider/aws/logs.md +++ b/docs/resource/cloud-provider/aws/logs.md @@ -1,11 +1,5 @@ # AWS Logs -**Status**: [Experimental][DocumentStatus] - -**Type:** `aws.log` - -**Description:** Log attributes for Amazon Web Services. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `aws.log` + +**Description:** Resources specific to Amazon Web Services. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`aws.log.group.arns`](/docs/attributes-registry/aws.md) | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [1] | `["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -33,5 +34,3 @@ - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/cloud-provider/gcp/cloud-run.md b/docs/resource/cloud-provider/gcp/cloud-run.md index b841feef20..01a29f3573 100644 --- a/docs/resource/cloud-provider/gcp/cloud-run.md +++ b/docs/resource/cloud-provider/gcp/cloud-run.md @@ -4,10 +4,6 @@ These conventions are recommended for resources running on Cloud Run. -**Type:** `gcp.cloud_run` - -**Description:** Resource attributes for Cloud Run. - @@ -15,6 +11,13 @@ These conventions are recommended for resources running on Cloud Run. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `gcp.cloud_run` + +**Description:** Resource used by Google Cloud Run. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`gcp.cloud_run.job.execution`](/docs/attributes-registry/gcp.md) | string | The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `job-name-xxxx`; `sample-job-mdw84` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/cloud-provider/gcp/gce.md b/docs/resource/cloud-provider/gcp/gce.md index d68a024ee2..ccebba761d 100644 --- a/docs/resource/cloud-provider/gcp/gce.md +++ b/docs/resource/cloud-provider/gcp/gce.md @@ -1,9 +1,5 @@ # Google Compute Engine -**Type:** `gcp.gce` - -**Description:** Resource attributes for GCE instances. - @@ -11,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `gcp.gce` + +**Description:** Resources used by Google Compute Engine (GCE). + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`gcp.gce.instance.hostname`](/docs/attributes-registry/gcp.md) | string | The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). | `my-host1234.example.com`; `sample-vm.us-west1-b.c.my-project.internal` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/cloud-provider/heroku.md b/docs/resource/cloud-provider/heroku.md index 4905dc06fb..55a7923051 100644 --- a/docs/resource/cloud-provider/heroku.md +++ b/docs/resource/cloud-provider/heroku.md @@ -13,6 +13,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `heroku` + +**Description:** Heroku dyno metadata + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`heroku.app.id`](/docs/attributes-registry/heroku.md) | string | Unique identifier for the application | `2daa2797-e42b-4624-9322-ec3f968df4da` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/cloud.md b/docs/resource/cloud.md index b1edee7060..8664fe52f5 100644 --- a/docs/resource/cloud.md +++ b/docs/resource/cloud.md @@ -1,11 +1,5 @@ # Cloud -**Status**: [Experimental][DocumentStatus] - -**type:** `cloud` - -**Description:** A cloud infrastructure (e.g. GCP, Azure, AWS). - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloud` + +**Description:** A cloud environment (e.g. GCP, Azure, AWS) + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloud.account.id`](/docs/attributes-registry/cloud.md) | string | The cloud account ID the resource is assigned to. | `111111111111`; `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -100,5 +101,3 @@ The following well-known definitions MUST be used if you set this attribute and - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/container.md b/docs/resource/container.md index 84be2ca779..971e2df204 100644 --- a/docs/resource/container.md +++ b/docs/resource/container.md @@ -1,11 +1,5 @@ # Container -**Status**: [Experimental][DocumentStatus] - -**type:** `container` - -**Description:** A container instance. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `container` + +**Description:** A container instance. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`container.id`](/docs/attributes-registry/container.md) | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -46,5 +47,3 @@ An example can be found in [Example Image Manifest](https://docs.docker.com/regi - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/deployment-environment.md b/docs/resource/deployment-environment.md index 72cb250024..44ef6af793 100644 --- a/docs/resource/deployment-environment.md +++ b/docs/resource/deployment-environment.md @@ -1,11 +1,5 @@ # Deployment -**Status**: [Experimental][DocumentStatus] - -**type:** `deployment` - -**Description:** The software deployment. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `deployment` + +**Description:** The software deployment. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`deployment.environment.name`](/docs/attributes-registry/deployment.md) | string | Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). [1] | `staging`; `production` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -32,5 +33,3 @@ considered to be identifying the same service: - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/device.md b/docs/resource/device.md index d77e1f3d76..d4d1dfca69 100644 --- a/docs/resource/device.md +++ b/docs/resource/device.md @@ -1,11 +1,5 @@ # Device -**Status**: [Experimental][DocumentStatus] - -**type:** `device` - -**Description**: The device on which the process represented by this resource is running. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `device` + +**Description:** The device on which the process represented by this resource is running. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`device.id`](/docs/attributes-registry/device.md) | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -35,5 +36,3 @@ - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/faas.md b/docs/resource/faas.md index 9f04179fc6..2593d9a19f 100644 --- a/docs/resource/faas.md +++ b/docs/resource/faas.md @@ -1,11 +1,5 @@ # Function as a Service -**Status**: [Experimental][DocumentStatus] - -**type:** `faas` - -**Description:** A "function as a service" aka "serverless function" instance. - See also: - The [Trace semantic conventions for FaaS](/docs/faas/faas-spans.md) @@ -20,6 +14,13 @@ See also: + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `faas` + +**Description:** A serverless instance. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`faas.name`](/docs/attributes-registry/faas.md) | string | The name of the single function that this runtime instance executes. [1] | `my-function`; `myazurefunctionapp/some-function-name` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -92,5 +93,3 @@ Note: The resource attribute `faas.instance` differs from the span attribute `fa There are cases where a FaaS resource attribute is better applied as a span attribute instead. See the [FaaS trace conventions](/docs/faas/faas-spans.md) for more. - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/host.md b/docs/resource/host.md index ca4f3348c8..6a9d0004e4 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -1,11 +1,5 @@ # Host -**Status**: [Experimental][DocumentStatus] - -**type:** `host` - -**Description:** A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. - The `host.*` namespace SHOULD be exclusively used to capture resource attributes. To report host metrics, the `system.*` namespace SHOULD be used. @@ -16,6 +10,13 @@ To report host metrics, the `system.*` namespace SHOULD be used. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `host` + +**Description:** A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`host.arch`](/docs/attributes-registry/host.md) | string | The CPU architecture the host system is running on. | `amd64`; `arm32`; `arm64` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -89,6 +90,13 @@ privileged lookup of `host.id` is required, the value should be injected via the + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `host.cpu` + +**Description:** A host's CPU information + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`host.cpu.cache.l2.size`](/docs/attributes-registry/host.md) | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -107,5 +115,3 @@ privileged lookup of `host.id` is required, the value should be injected via the - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/k8s.md b/docs/resource/k8s.md index dbff0c9cbf..39ab4709a3 100644 --- a/docs/resource/k8s.md +++ b/docs/resource/k8s.md @@ -17,10 +17,6 @@ Kubernetes object, but "name" is usually more user friendly so can be also set. ## Cluster -**type:** `k8s.cluster` - -**Description:** A Kubernetes Cluster. - @@ -28,6 +24,13 @@ Kubernetes object, but "name" is usually more user friendly so can be also set. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.cluster` + +**Description:** A Kubernetes Cluster. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.cluster.name`](/docs/attributes-registry/k8s.md) | string | The name of the cluster. | `opentelemetry-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -66,10 +69,6 @@ conflict. ## Node -**type:** `k8s.node` - -**Description:** A Kubernetes Node. - @@ -77,6 +76,13 @@ conflict. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.node` + +**Description:** A Kubernetes Node object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.node.name`](/docs/attributes-registry/k8s.md) | string | The name of the Node. | `node-1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -93,10 +99,6 @@ conflict. Namespaces provide a scope for names. Names of objects need to be unique within a namespace, but not across namespaces. -**type:** `k8s.namespace` - -**Description:** A Kubernetes Namespace. - @@ -104,6 +106,13 @@ a namespace, but not across namespaces. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.namespace` + +**Description:** A Kubernetes Namespace. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.namespace.name`](/docs/attributes-registry/k8s.md) | string | The name of the namespace that the pod is running in. | `default` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -119,10 +128,6 @@ a namespace, but not across namespaces. The smallest and simplest Kubernetes object. A Pod represents a set of running containers on your cluster. -**type:** `k8s.pod` - -**Description:** A Kubernetes Pod object. - @@ -130,6 +135,13 @@ containers on your cluster. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.pod` + +**Description:** A Kubernetes Pod object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.pod.label.`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. | `k8s.pod.label.app=my-app`; `k8s.pod.label.mycompany.io/arch=x64`; `k8s.pod.label.data=` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -152,10 +164,6 @@ from the name of the running container. Note: This type is different from [container](./container.md), which corresponds to a running container. -**type:** `k8s.container` - -**Description:** A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). - @@ -163,6 +171,13 @@ to a running container. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.container` + +**Description:** A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.container.name`](/docs/attributes-registry/k8s.md) | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -177,13 +192,6 @@ to a running container. ## ReplicaSet -A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at -any given time. - -**type:** `k8s.replicaset` - -**Description:** A Kubernetes ReplicaSet object. - @@ -191,6 +199,13 @@ any given time. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.replicaset` + +**Description:** A Kubernetes ReplicaSet object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.replicaset.name`](/docs/attributes-registry/k8s.md) | string | The name of the ReplicaSet. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -208,10 +223,6 @@ An API object that manages a replicated application, typically by running Pods with no local state. Each replica is represented by a Pod, and the Pods are distributed among the nodes of a cluster. -**type:** `k8s.deployment` - -**Description:** A Kubernetes Deployment object. - @@ -219,6 +230,13 @@ distributed among the nodes of a cluster. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.deployment` + +**Description:** A Kubernetes Deployment object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.deployment.name`](/docs/attributes-registry/k8s.md) | string | The name of the Deployment. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -235,10 +253,6 @@ distributed among the nodes of a cluster. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. -**type:** `k8s.statefulset` - -**Description:** A Kubernetes StatefulSet object. - @@ -246,6 +260,13 @@ about the ordering and uniqueness of these Pods. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.statefulset` + +**Description:** A Kubernetes StatefulSet object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.statefulset.name`](/docs/attributes-registry/k8s.md) | string | The name of the StatefulSet. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -261,10 +282,6 @@ about the ordering and uniqueness of these Pods. A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. -**type:** `k8s.daemonset` - -**Description:** A Kubernetes DaemonSet object. - @@ -272,6 +289,13 @@ A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.daemonset` + +**Description:** A Kubernetes DaemonSet object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.daemonset.name`](/docs/attributes-registry/k8s.md) | string | The name of the DaemonSet. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -288,10 +312,6 @@ A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. A Job creates one or more Pods and ensures that a specified number of them successfully terminate. -**type:** `k8s.job` - -**Description:** A Kubernetes Job object. - @@ -299,6 +319,13 @@ successfully terminate. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.job` + +**Description:** A Kubernetes Job object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.job.name`](/docs/attributes-registry/k8s.md) | string | The name of the Job. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -314,10 +341,6 @@ successfully terminate. A CronJob creates Jobs on a repeating schedule. -**type:** `k8s.cronjob` - -**Description:** A Kubernetes CronJob object. - @@ -325,6 +348,13 @@ A CronJob creates Jobs on a repeating schedule. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `k8s.cronjob` + +**Description:** A Kubernetes CronJob object. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`k8s.cronjob.name`](/docs/attributes-registry/k8s.md) | string | The name of the CronJob. | `opentelemetry` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/os.md b/docs/resource/os.md index d28d98a7f0..fb83034abf 100644 --- a/docs/resource/os.md +++ b/docs/resource/os.md @@ -1,11 +1,5 @@ # Operating System -**Status**: [Experimental][DocumentStatus] - -**type:** `os` - -**Description**: The operating system (OS) on which the process represented by this resource is running. - In case of virtualized environments, this is the operating system as it is observed by the process, i.e., the virtualized guest rather than the underlying host. @@ -15,6 +9,13 @@ In case of virtualized environments, this is the operating system as it is obser + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `os` + +**Description:** The operating system (OS) on which the process represented by this resource is running. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`os.type`](/docs/attributes-registry/os.md) | string | The operating system type. | `windows`; `linux`; `darwin` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -55,5 +56,3 @@ In case of virtualized environments, this is the operating system as it is obser - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/process.md b/docs/resource/process.md index ff17dfcfbf..8345d957b7 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -21,10 +21,6 @@ ## Process -**type:** `process` - -**Description:** An operating system process. - @@ -32,6 +28,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `process` + +**Description:** An operating system process. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`process.command`](/docs/attributes-registry/process.md) | string | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` | `Conditionally Required` [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -77,10 +80,6 @@ On Windows and other systems where the native format of process commands is a si ## Process runtimes -**type:** `process.runtime` - -**Description:** The single (language) runtime instance which is monitored. - @@ -88,6 +87,13 @@ On Windows and other systems where the native format of process commands is a si + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `process.runtime` + +**Description:** The single (language) runtime instance which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`process.runtime.description`](/docs/attributes-registry/process.md) | string | An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. | `Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/resource/webengine.md b/docs/resource/webengine.md index e7585ad802..4a4dbdfcae 100644 --- a/docs/resource/webengine.md +++ b/docs/resource/webengine.md @@ -1,11 +1,5 @@ # Webengine -**Status**: [Experimental][DocumentStatus] - -**type:** `webengine` - -**Description:** Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. - @@ -13,6 +7,13 @@ + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `webengine` + +**Description:** Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`webengine.name`](/docs/attributes-registry/webengine.md) | string | The name of the web engine. | `WildFly` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -33,5 +34,3 @@ The situations where there are multiple candidates, it is up to instrumentation * Either Apache HTTP Server or `mod_wsgi` MAY be chosen as `webengine`, depending on the decision made by the instrumentation authors. * Django SHOULD NOT be set as an `webengine` as the required information is already available in instrumentation library and setting this into `webengine` would duplicate the information. - -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/model/resource/android.yaml b/model/resource/android.yaml index d749201b30..7138bc2902 100644 --- a/model/resource/android.yaml +++ b/model/resource/android.yaml @@ -1,6 +1,7 @@ groups: - id: android type: resource + name: android brief: > The Android platform on which the Android application is running. attributes: diff --git a/model/resource/browser.yaml b/model/resource/browser.yaml index c732a2c9d4..df8492cd60 100644 --- a/model/resource/browser.yaml +++ b/model/resource/browser.yaml @@ -1,6 +1,7 @@ groups: - id: browser type: resource + name: browser brief: > The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications diff --git a/model/resource/cloud.yaml b/model/resource/cloud.yaml index c6de5db22e..954ff0ad1b 100644 --- a/model/resource/cloud.yaml +++ b/model/resource/cloud.yaml @@ -1,6 +1,7 @@ groups: - id: cloud type: resource + name: cloud brief: > A cloud environment (e.g. GCP, Azure, AWS) attributes: diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/cloud_provider/aws/ecs.yaml index 53c998c575..7b14ff129c 100644 --- a/model/resource/cloud_provider/aws/ecs.yaml +++ b/model/resource/cloud_provider/aws/ecs.yaml @@ -1,6 +1,7 @@ groups: - id: aws.ecs type: resource + name: aws.ecs brief: > Resources used by AWS Elastic Container Service (ECS). attributes: diff --git a/model/resource/cloud_provider/aws/eks.yaml b/model/resource/cloud_provider/aws/eks.yaml index a25713cdfd..ea849dfed9 100644 --- a/model/resource/cloud_provider/aws/eks.yaml +++ b/model/resource/cloud_provider/aws/eks.yaml @@ -1,6 +1,7 @@ groups: - id: aws.eks type: resource + name: aws.eks brief: > Resources used by AWS Elastic Kubernetes Service (EKS). attributes: diff --git a/model/resource/cloud_provider/aws/logs.yaml b/model/resource/cloud_provider/aws/logs.yaml index ffd5feb3d4..b5b379dfdf 100644 --- a/model/resource/cloud_provider/aws/logs.yaml +++ b/model/resource/cloud_provider/aws/logs.yaml @@ -1,6 +1,7 @@ groups: - id: aws.log type: resource + name: aws.log brief: > Resources specific to Amazon Web Services. attributes: diff --git a/model/resource/cloud_provider/gcp/cloud_run.yaml b/model/resource/cloud_provider/gcp/cloud_run.yaml index 3f05837747..0fe12bf28d 100644 --- a/model/resource/cloud_provider/gcp/cloud_run.yaml +++ b/model/resource/cloud_provider/gcp/cloud_run.yaml @@ -1,6 +1,7 @@ groups: - id: gcp.cloud_run type: resource + name: gcp.cloud_run brief: > Resource used by Google Cloud Run. attributes: diff --git a/model/resource/cloud_provider/gcp/gce.yaml b/model/resource/cloud_provider/gcp/gce.yaml index d29684b2a3..05cb24e21c 100644 --- a/model/resource/cloud_provider/gcp/gce.yaml +++ b/model/resource/cloud_provider/gcp/gce.yaml @@ -1,6 +1,7 @@ groups: - id: gcp.gce type: resource + name: gcp.gce brief: > Resources used by Google Compute Engine (GCE). attributes: diff --git a/model/resource/cloud_provider/heroku.yaml b/model/resource/cloud_provider/heroku.yaml index f609f473e4..cf2e66c233 100644 --- a/model/resource/cloud_provider/heroku.yaml +++ b/model/resource/cloud_provider/heroku.yaml @@ -1,6 +1,7 @@ groups: - id: heroku type: resource + name: heroku brief: > Heroku dyno metadata attributes: diff --git a/model/resource/container.yaml b/model/resource/container.yaml index 41c178071f..039faa8616 100644 --- a/model/resource/container.yaml +++ b/model/resource/container.yaml @@ -1,6 +1,7 @@ groups: - id: container type: resource + name: container brief: > A container instance. attributes: diff --git a/model/resource/deployment_environment.yaml b/model/resource/deployment_environment.yaml index cd3f2ee518..5e40253d2d 100644 --- a/model/resource/deployment_environment.yaml +++ b/model/resource/deployment_environment.yaml @@ -1,6 +1,7 @@ groups: - id: deployment type: resource + name: deployment brief: > The software deployment. attributes: diff --git a/model/resource/device.yaml b/model/resource/device.yaml index 826402119d..45b1cd7a49 100644 --- a/model/resource/device.yaml +++ b/model/resource/device.yaml @@ -1,6 +1,7 @@ groups: - id: device type: resource + name: device brief: > The device on which the process represented by this resource is running. attributes: diff --git a/model/resource/faas.yaml b/model/resource/faas.yaml index c794866b6c..5f9325ebb1 100644 --- a/model/resource/faas.yaml +++ b/model/resource/faas.yaml @@ -1,6 +1,7 @@ groups: - id: faas_resource type: resource + name: faas brief: > A serverless instance. attributes: diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 5e2b8fc7c6..2954172cd9 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -1,6 +1,7 @@ groups: - id: host type: resource + name: host brief: > A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. attributes: @@ -44,6 +45,7 @@ groups: - id: host.cpu type: resource + name: host.cpu brief: > A host's CPU information attributes: diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index 46522ca7d9..50d2e8c254 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -1,6 +1,7 @@ groups: - id: k8s.cluster type: resource + name: k8s.cluster brief: > A Kubernetes Cluster. attributes: @@ -9,6 +10,7 @@ groups: - id: k8s.node type: resource + name: k8s.node brief: > A Kubernetes Node object. attributes: @@ -17,6 +19,7 @@ groups: - id: k8s.namespace type: resource + name: k8s.namespace brief: > A Kubernetes Namespace. attributes: @@ -24,6 +27,7 @@ groups: - id: k8s.pod type: resource + name: k8s.pod brief: > A Kubernetes Pod object. attributes: @@ -35,6 +39,7 @@ groups: - id: k8s.container type: resource + name: k8s.container brief: > A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). attributes: @@ -44,6 +49,7 @@ groups: - id: k8s.replicaset type: resource + name: k8s.replicaset brief: > A Kubernetes ReplicaSet object. attributes: @@ -52,6 +58,7 @@ groups: - id: k8s.deployment type: resource + name: k8s.deployment brief: > A Kubernetes Deployment object. attributes: @@ -60,6 +67,7 @@ groups: - id: k8s.statefulset type: resource + name: k8s.statefulset brief: > A Kubernetes StatefulSet object. attributes: @@ -68,6 +76,7 @@ groups: - id: k8s.daemonset type: resource + name: k8s.daemonset brief: > A Kubernetes DaemonSet object. attributes: @@ -76,6 +85,7 @@ groups: - id: k8s.job type: resource + name: k8s.job brief: > A Kubernetes Job object. attributes: @@ -84,6 +94,7 @@ groups: - id: k8s.cronjob type: resource + name: k8s.cronjob brief: > A Kubernetes CronJob object. attributes: diff --git a/model/resource/os.yaml b/model/resource/os.yaml index 374d2e1594..da3d241046 100644 --- a/model/resource/os.yaml +++ b/model/resource/os.yaml @@ -1,6 +1,7 @@ groups: - id: os type: resource + name: os brief: > The operating system (OS) on which the process represented by this resource is running. note: > diff --git a/model/resource/process.yaml b/model/resource/process.yaml index 600559732c..f33965fb9b 100644 --- a/model/resource/process.yaml +++ b/model/resource/process.yaml @@ -1,6 +1,7 @@ groups: - id: process type: resource + name: process brief: > An operating system process. attributes: @@ -25,6 +26,7 @@ groups: - id: process.runtime type: resource + name: process.runtime brief: > The single (language) runtime instance which is monitored. attributes: diff --git a/model/resource/service.yaml b/model/resource/service.yaml index 141cd1382b..b5a3d27f0a 100644 --- a/model/resource/service.yaml +++ b/model/resource/service.yaml @@ -1,8 +1,10 @@ groups: - id: service type: resource + name: service brief: > A service instance. + stability: stable attributes: - ref: service.name requirement_level: required diff --git a/model/resource/service_experimental.yaml b/model/resource/service_experimental.yaml index 91f6e36c3e..861f26862e 100644 --- a/model/resource/service_experimental.yaml +++ b/model/resource/service_experimental.yaml @@ -1,6 +1,7 @@ groups: - id: service_experimental type: resource + name: 'service' brief: > A service instance. attributes: diff --git a/model/resource/telemetry.yaml b/model/resource/telemetry.yaml index cbc82ce566..bdd4350b78 100644 --- a/model/resource/telemetry.yaml +++ b/model/resource/telemetry.yaml @@ -1,6 +1,8 @@ groups: - - id: telemetry + - id: telemetry.sdk + name: 'telemetry.sdk' type: resource + stability: stable brief: > The telemetry SDK used to capture data recorded by the instrumentation libraries. attributes: diff --git a/model/resource/telemetry_experimental.yaml b/model/resource/telemetry_experimental.yaml index eb2c508b3a..6a660cc849 100644 --- a/model/resource/telemetry_experimental.yaml +++ b/model/resource/telemetry_experimental.yaml @@ -1,6 +1,7 @@ groups: - - id: telemetry_experimental + - id: telemetry.sdk_experimental type: resource + name: 'telemetry.sdk' brief: > The telemetry SDK used to capture data recorded by the instrumentation libraries. attributes: diff --git a/model/resource/webengine.yaml b/model/resource/webengine.yaml index 9e8a586b0f..d9026cf2cf 100644 --- a/model/resource/webengine.yaml +++ b/model/resource/webengine.yaml @@ -1,6 +1,7 @@ groups: - id: webengine_resource type: resource + name: webengine brief: > Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. attributes: diff --git a/model/scope/exporter/exporter.yaml b/model/scope/exporter/exporter.yaml index 52f47f0b0e..2accfa3faf 100644 --- a/model/scope/exporter/exporter.yaml +++ b/model/scope/exporter/exporter.yaml @@ -1,6 +1,8 @@ groups: - id: otel.scope + # This should not be a resource, but an attribute group. type: resource + name: otel.scope brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. attributes: - ref: otel.scope.name diff --git a/policies/compatibility.rego b/policies/compatibility.rego index 9d6bbfb655..1b376a169e 100644 --- a/policies/compatibility.rego +++ b/policies/compatibility.rego @@ -32,6 +32,15 @@ registry_metrics := [ g | ] registry_metric_names := { g.metric_name | some g in registry_metrics } +baseline_resources := [ g | + some g in data.semconv.baseline_groups + g.type == "resource" +] +registry_resources := [g | + some g in data.semconv.groups + g.type == "resource" +] +registry_resource_names := { g.name | some g in registry_resources } # Rules we enforce: # - Attributes @@ -331,6 +340,71 @@ deny contains back_comp_violation(description, group_id, "") if { } +# Rule: Detect Removed Resources +# +# This rule checks for stable resources that existed in the baseline registry +# but are no longer present in the current registry. Removing resources +# is considered a backward compatibility violation. +# +# In other words, we do not allow the removal of a resource once added +# to the registry. It must exist SOMEWHERE, but may be deprecated. +deny contains back_comp_violation(description, group_id, "") if { + # Find data we need to enforce + some resource in baseline_resources + resource.stability == "stable" + # Enforce the policy + not registry_resource_names[resource.name] + + # Generate human readable error. + group_id := resource.id + description := sprintf("Resource '%s' no longer exists in semantic conventions", [resource.name]) +} + +# Rule: Stable resources cannot become unstable +# +# This rule checks that stable resources cannot have their stability level changed. +deny contains back_comp_violation(description, group_id, "") if { + # Find data we need to enforce + some resource in baseline_resources + resource.stability == "stable" + some nresource in registry_resources + resource.name = nresource.name + # Enforce the policy + nresource.stability != "stable" + + # Generate human readable error. + group_id := resource.id + description := sprintf("Resource '%s' cannot change from stable", [resource.name]) +} + +# Rule: Stable Resource required/recommended attributes cannot be dropped. +# +# This rule checks that stable resources have stable sets of attributes. +deny contains back_comp_violation(description, group_id, "") if { + # Find data we need to enforce + some resource in baseline_resources + resource.stability == "stable" + some nresource in registry_resources + resource.name = nresource.name + + baseline_attributes := { attr.name | + some attr in resource.attributes + not is_opt_in(attr) + } + new_attributes := { attr.name | + some attr in nresource.attributes + not is_opt_in(attr) + } + missing_attributes := baseline_attributes - new_attributes + # Enforce the policy + count(missing_attributes) > 0 + + # Generate human readable error. + group_id := resource.id + description := sprintf("Resource '%s' cannot remove required/recommended attributes (missing '%s')", [resource.name, missing_attributes]) +} + + # Helper Function: Create Backward Compatibility Violation Object # # This function generates a structured violation object for each diff --git a/policies/yaml_schema.rego b/policies/yaml_schema.rego index cd81b3c6ab..4d09e4d594 100644 --- a/policies/yaml_schema.rego +++ b/policies/yaml_schema.rego @@ -48,6 +48,26 @@ deny[yaml_schema_violation(description, group.id, name)] { description := sprintf("Event name '%s' is invalid. Event name %s'", [name, invalid_name_helper]) } +# require resources have names +deny[yaml_schema_violation(description, group.id, "")] { + group := input.groups[_] + group.type == "resource" + group.name == null + description := sprintf("Resource id '%s' is invalid. Resource must have name.", [group.id]) +} + +# checks resource name format +deny[yaml_schema_violation(description, group.id, name)] { + group := input.groups[_] + group.type == "resource" + name := group.name + + name != null + not regex.match(name_regex, name) + + description := sprintf("Resource name '%s' is invalid. Resource name %s'", [name, invalid_name_helper]) +} + # checks attribute member id format deny[yaml_schema_violation(description, group.id, attr_name)] { group := input.groups[_] diff --git a/policies/yaml_schema_test.rego b/policies/yaml_schema_test.rego index 2fc33ceb07..4a506835e7 100644 --- a/policies/yaml_schema_test.rego +++ b/policies/yaml_schema_test.rego @@ -24,6 +24,16 @@ test_fails_on_invalid_event_name if { } } +test_fails_on_invalid_resource_name if { + every name in invalid_names { + count(deny) >= 1 with input as {"groups": create_resource(name)} + } +} + +test_fails_on_missing_resource_name if { + count(deny) >= 1 with input as {"groups": [{"id": "yaml_schema.test", "type": "resource", "name": null}]} +} + test_passes_on_valid_names if { every name in valid_names { count(deny) == 0 with input as {"groups": create_attribute_group(name)} @@ -48,6 +58,10 @@ create_event(name) = json { json := [{"id": "yaml_schema.test", "type": "event", "name": name}] } +create_resource(name) = json { + json := [{"id": "yaml_schema.test", "type": "resource", "name": name}] +} + invalid_names := [ "1foo.bar", "_foo.bar", diff --git a/policies_test/compatibility_test.rego b/policies_test/compatibility_test.rego index 18034db720..a2883ae234 100644 --- a/policies_test/compatibility_test.rego +++ b/policies_test/compatibility_test.rego @@ -651,4 +651,112 @@ test_metric_attribute_added if { }], }] } -} \ No newline at end of file +} + +# Check that resources cannot be removed. +test_removed_resources if { + count(deny) > 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }], + } + count(deny) == 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }], + "groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }] + } +} + +# Check that Stable resources cannot become unstable +test_resource_stability_change if { + count(deny) > 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }], + "groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "experimental", + }] + } + count(deny) == 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }], + "groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }] + } +} + + +# Check that Stable resources cannot change required/recommended attributes +test_resource_attribute_missing if { + count(deny) > 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + "attributes": [{ + "name": "test.missing", + "requirement_level": "required" + }], + }], + "groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + }] + } + count(deny) == 0 with data.semconv as { + "baseline_groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + "attributes": [{ + "name": "test.missing", + "requirement_level": "required" + },{ + "name": "test.ignored", + "requirement_level": "opt_in" + }], + }], + "groups": [{ + "id": "resource.test", + "type": "resource", + "name": "test.missing", + "stability": "stable", + "unit": "s", + "instrument": "histogram", + "attributes": [{ + "name": "test.missing", + "requirement_level": "required" + }], + }] + } +} diff --git a/templates/registry/markdown/resource_macros.j2 b/templates/registry/markdown/resource_macros.j2 new file mode 100644 index 0000000000..3daa7f1d4d --- /dev/null +++ b/templates/registry/markdown/resource_macros.j2 @@ -0,0 +1,9 @@ +{#- Macros for simplifying creating "Resource" documentation. -#} +{% import 'stability.j2' as stability %} +{% macro header(resource) %} +**Status:** {{ stability.badge(resource.stability, resource.deprecated) }} + +**type:** `{{ resource.name }}` + +**Description:** {{ resource.brief }} +{% endmacro %} \ No newline at end of file diff --git a/templates/registry/markdown/snippet.md.j2 b/templates/registry/markdown/snippet.md.j2 index cc9bf6d89c..fe20132b65 100644 --- a/templates/registry/markdown/snippet.md.j2 +++ b/templates/registry/markdown/snippet.md.j2 @@ -3,8 +3,8 @@ -{% import 'attribute_table.j2' as at %}{% import 'metric_table.j2' as mt %}{% import 'event_macros.j2' as event %} -{% if snippet_type == "metric_table" %}{{ mt.generate(group) }}{% else %}{% if group.type == "event" %}{{ event.header(group) }}{% endif %}{{ at.generate(group.attributes, tag_filter, attribute_registry_base_url, group.lineage.attributes) }}{% endif %} +{% import 'attribute_table.j2' as at %}{% import 'metric_table.j2' as mt %}{% import 'event_macros.j2' as event %}{% import 'resource_macros.j2' as resource %} +{% if snippet_type == "metric_table" %}{{ mt.generate(group) }}{% else %}{% if group.type == "event" %}{{ event.header(group) }}{% elif group.type == "resource" %}{{ resource.header(group) }}{% endif %}{{ at.generate(group.attributes, tag_filter, attribute_registry_base_url, group.lineage.attributes) }}{% endif %} \ No newline at end of file From 422eeb71f40c73d1b195723cc1cffeb09abf2391 Mon Sep 17 00:00:00 2001 From: Johannes Tax Date: Mon, 16 Sep 2024 20:22:26 +0200 Subject: [PATCH 2/3] Give exhaustive specification of span kinds for messaging spans (#1171) Co-authored-by: Liudmila Molkova Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> --- .chloggen/1112.yaml | 4 ++++ docs/messaging/messaging-spans.md | 22 +++++++--------------- 2 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 .chloggen/1112.yaml diff --git a/.chloggen/1112.yaml b/.chloggen/1112.yaml new file mode 100644 index 0000000000..454aa19d76 --- /dev/null +++ b/.chloggen/1112.yaml @@ -0,0 +1,4 @@ +change_type: enhancement +component: messaging +note: Define span kind for unspecified cases of messaging `publish` and `process` spans. +issues: [1112] diff --git a/docs/messaging/messaging-spans.md b/docs/messaging/messaging-spans.md index 7f5b431983..9e3c32abcd 100644 --- a/docs/messaging/messaging-spans.md +++ b/docs/messaging/messaging-spans.md @@ -208,21 +208,13 @@ Span kind SHOULD be set according to the following table, based on the operation | Operation type | Span kind| |----------------|-------------| -| `create` | `PRODUCER` | -| `publish` | `PRODUCER` if the context of the "Publish" span is used as creation context. | -| `receive` | `CONSUMER` | -| `process` | `CONSUMER` for push-based scenarios where no "Receive" span exists. | - -For cases not covered by the table above, the span kind should be set according -to the [generic specification about span kinds](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.35.0/specification/trace/api.md#spankind), -e. g. it should be set to CLIENT for the "Publish" span if its context is not -used as creation context and if the "Publish" span models a synchronous call to -the intermediary. - -Setting span kinds according to this table ensures that span links between -consumers and producers always exist between a PRODUCER span on the producer -side and a CONSUMER span on the consumer side. This allows analysis tools to -interpret linked traces without the need for additional semantic hints. +| `create` | `PRODUCER` | +| `publish` | `PRODUCER` if the context of the "Publish" span is used as creation context, otherwise `CLIENT`. | +| `receive` | `CLIENT` | +| `process` | `CONSUMER` | + +Setting span kinds according to this table allows analysis tools to interpret spans +and relationships between them without the need for additional semantic hints. ### Trace structure From b855a36cf4b8a3c5461ad16fa4ace0c615d11c2a Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 16 Sep 2024 20:22:50 -0700 Subject: [PATCH 3/3] Group yaml files by root namespace instead of signal (#1345) --- .github/CODEOWNERS | 121 ++++++++---------- .github/ISSUE_TEMPLATE/bug_report.yaml | 4 +- .github/ISSUE_TEMPLATE/change_proposal.yaml | 4 +- .github/ISSUE_TEMPLATE/new-conventions.yaml | 4 +- .../generate-registry-area-labels.yml | 6 +- .../scripts/generate-registry-area-labels.sh | 16 +-- .../workflows/scripts/get-registry-areas.sh | 16 --- CONTRIBUTING.md | 33 +++++ Makefile | 14 +- docs/azure/events.md | 2 +- .../tools/scripts/registry/areas-weaver.yaml | 13 ++ internal/tools/scripts/registry/areas.md.j2 | 5 + .../scripts/update-issue-template-areas.sh | 9 +- .../deprecated/registry-deprecated.yaml} | 0 .../android.yaml => andrioid/registry.yaml} | 0 .../android.yaml => andrioid/resources.yaml} | 0 .../artifact.yaml => artifact/registry.yaml} | 0 .../metrics.yaml} | 0 .../registry.yaml} | 0 .../aws/ecs.yaml => aws/ecs-resources.yaml} | 0 .../aws/eks.yaml => aws/eks-resources.yaml} | 0 .../aws/lambda.yaml => aws/lambda-spans.yaml} | 0 .../aws/logs.yaml => aws/logs-resources.yaml} | 0 .../{registry/aws.yaml => aws/registry.yaml} | 0 .../aws-sdk.yml => aws/sdk-spans.yml} | 0 model/{logs/azure.yaml => azure/logs.yaml} | 0 .../azure.yaml => azure/registry.yaml} | 0 .../browser.yaml => browser/registry.yaml} | 0 .../browser.yaml => browser/resources.yaml} | 0 .../cicd.yaml => cicd/registry.yaml} | 0 model/client/common.yaml | 8 ++ .../client.yaml => client/registry.yaml} | 0 .../cloud.yaml => cloud/registry.yaml} | 0 .../cloud.yaml => cloud/resources.yaml} | 0 .../registry.yaml} | 0 .../spans.yaml} | 0 model/code/common.yaml | 13 ++ .../code.yaml => code/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../container.yaml => container/metrics.yaml} | 0 .../registry.yaml} | 0 .../resources.yaml} | 0 .../{registry/cpu.yaml => cpu/registry.yaml} | 0 .../{db-common.yaml => database/common.yaml} | 0 .../deprecated/metrics-deprecated.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../metrics.yaml} | 0 .../db.yaml => database/registry.yaml} | 0 .../database.yaml => database/spans.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../registry.yaml} | 0 .../resources.yaml} | 0 model/destination/common.yaml | 8 ++ .../registry.yaml} | 0 .../mobile-events.yaml => device/events.yaml} | 0 .../device.yaml => device/registry.yaml} | 0 .../device.yaml => device/resources.yaml} | 0 .../disk.yaml => disk/registry.yaml} | 0 model/{metrics/dns.yaml => dns/metrics.yaml} | 0 .../{registry/dns.yaml => dns/registry.yaml} | 0 .../dotnet.yaml => dotnet/registry.yaml} | 0 .../runtime-metrics.yaml} | 0 model/enduser/deprecated/common.yaml | 12 ++ .../deprecated/registry-deprecated.yaml} | 0 .../error.yaml => error/registry.yaml} | 0 model/{logs/events.yaml => event/common.yaml} | 0 .../event.yaml => event/registry.yaml} | 0 .../events.yaml} | 0 .../logs.yaml} | 0 .../registry.yaml} | 0 model/{faas-common.yaml => faas/common.yaml} | 0 .../faas-metrics.yaml => faas/metrics.yaml} | 0 .../faas.yaml => faas/registry.yaml} | 0 .../faas.yaml => faas/resources.yaml} | 0 model/{trace/faas.yaml => faas/spans.yaml} | 0 .../events.yaml} | 0 .../logs.yaml} | 0 .../registry.yaml} | 0 .../file.yaml => file/registry.yaml} | 0 .../cloud-run-resources.yaml} | 0 .../gcp-client.yml => gcp/common.yml} | 0 .../gcp/gce.yaml => gcp/gce-resources.yaml} | 0 .../{registry/gcp.yaml => gcp/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../gen-ai.yaml => gen-ai/metrics.yaml} | 0 .../gen-ai.yaml => gen-ai/registry.yaml} | 0 .../{trace/gen-ai.yaml => gen-ai/spans.yaml} | 0 model/general.yaml | 65 ---------- .../go-metrics.yaml => go/metrics.yaml} | 0 model/{registry/go.yaml => go/registry.yaml} | 0 .../graphql.yaml => graphgl/registry.yaml} | 0 .../graphql.yml => graphgl/spans.yml} | 0 .../common-metrics.yaml} | 0 .../common.yaml} | 0 .../hardware.yaml => hardware/registry.yaml} | 0 .../heroku.yaml => heroku/registry.yaml} | 0 .../heroku.yaml => heroku/resources.yaml} | 0 .../host.yaml => host/registry.yaml} | 0 .../host.yaml => host/resources.yaml} | 0 model/{http-common.yaml => http/common.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../{metrics/http.yaml => http/metrics.yaml} | 0 .../http.yaml => http/registry.yaml} | 0 model/{trace/http.yaml => http/spans.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../deprecated/metrics-deprecated.yaml} | 0 .../metrics-experimental.yaml} | 0 .../jvm-metrics.yaml => jvm/metrics.yaml} | 0 .../{registry/jvm.yaml => jvm/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 model/{metrics/k8s.yaml => k8s/metrics.yaml} | 0 .../{registry/k8s.yaml => k8s/registry.yaml} | 0 .../{resource/k8s.yaml => k8s/resources.yaml} | 0 .../metrics.yaml} | 0 .../linux.yaml => linux/registry.yaml} | 0 model/{logs/media.yaml => log/common.yaml} | 10 ++ .../{registry/log.yaml => log/registry.yaml} | 0 model/logs/general.yaml | 10 -- .../common.yaml} | 0 .../deprecated/metrics-deprecated.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../metrics.yaml} | 0 .../registry.yaml} | 0 .../messaging.yaml => messaging/spans.yaml} | 0 model/{network.yaml => network/common.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../network.yaml => network/registry.yaml} | 0 .../metrics.yaml} | 0 .../nodejs.yaml => nodejs/registry.yaml} | 0 .../{registry/oci.yaml => oci/registry.yaml} | 0 .../common.yaml} | 2 +- .../registry.yaml} | 0 model/{registry/os.yaml => os/registry.yaml} | 0 model/{resource/os.yaml => os/resources.yaml} | 0 .../exporter.yaml => otel/common.yaml} | 2 +- .../deprecated/registry-deprecated.yaml} | 0 .../otel.yaml => otel/registry.yaml} | 0 .../exporter.yaml => otel/resources.yaml} | 0 model/peer/common.yaml | 7 + .../peer.yaml => peer/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../metrics.yaml} | 0 .../process.yaml => process/registry.yaml} | 0 .../process.yaml => process/resources.yaml} | 0 .../frame.yaml => profile/common.yaml} | 0 .../profile.yaml => profile/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../rpc-metrics.yaml => rpc/metrics.yaml} | 0 .../{registry/rpc.yaml => rpc/registry.yaml} | 0 model/{trace/rpc.yaml => rpc/spans.yaml} | 0 model/server/common.yaml | 8 ++ .../server.yaml => server/registry.yaml} | 0 .../service.yaml => service/registry.yaml} | 0 .../resources-experimental.yaml} | 0 .../service.yaml => service/resources.yaml} | 0 model/{session.yaml => session/common.yaml} | 0 .../session.yaml => session/registry.yaml} | 0 .../metrics.yaml} | 0 .../signalr.yaml => signalr/registry.yaml} | 0 model/source/common.yaml | 8 ++ .../source.yaml => source/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../metrics.yaml} | 0 .../system.yaml => system/registry.yaml} | 0 .../registry.yaml} | 0 .../resources-experimental.yaml} | 0 .../resources.yaml} | 0 .../test.yaml => test/registry.yaml} | 0 model/thread/common.yaml | 8 ++ .../thread.yaml => thread/registry.yaml} | 0 .../deprecated/registry-deprecated.yaml} | 0 .../{registry/tls.yaml => tls/registry.yaml} | 0 model/{url.yaml => url/common.yaml} | 0 .../{registry/url.yaml => url/registry.yaml} | 0 .../registry.yaml} | 0 .../user.yaml => user/registry.yaml} | 0 .../v8js-metrics.yaml => v8js/metrics.yaml} | 0 .../v8js.yaml => v8js/registry.yaml} | 0 .../{registry/vcs.yaml => vcs/registry.yaml} | 0 .../registry.yaml} | 0 .../resources.yaml} | 0 181 files changed, 226 insertions(+), 182 deletions(-) mode change 100755 => 100644 .github/workflows/scripts/generate-registry-area-labels.sh delete mode 100755 .github/workflows/scripts/get-registry-areas.sh create mode 100644 internal/tools/scripts/registry/areas-weaver.yaml create mode 100644 internal/tools/scripts/registry/areas.md.j2 rename model/{registry/deprecated/android.yaml => andrioid/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/android.yaml => andrioid/registry.yaml} (100%) rename model/{resource/android.yaml => andrioid/resources.yaml} (100%) rename model/{registry/artifact.yaml => artifact/registry.yaml} (100%) rename model/{metrics/dotnet/dotnet-aspnetcore.yaml => aspnetcore/metrics.yaml} (100%) rename model/{registry/aspnetcore.yaml => aspnetcore/registry.yaml} (100%) rename model/{resource/cloud_provider/aws/ecs.yaml => aws/ecs-resources.yaml} (100%) rename model/{resource/cloud_provider/aws/eks.yaml => aws/eks-resources.yaml} (100%) rename model/{trace/aws/lambda.yaml => aws/lambda-spans.yaml} (100%) rename model/{resource/cloud_provider/aws/logs.yaml => aws/logs-resources.yaml} (100%) rename model/{registry/aws.yaml => aws/registry.yaml} (100%) rename model/{trace/instrumentation/aws-sdk.yml => aws/sdk-spans.yml} (100%) rename model/{logs/azure.yaml => azure/logs.yaml} (100%) rename model/{registry/azure.yaml => azure/registry.yaml} (100%) rename model/{registry/browser.yaml => browser/registry.yaml} (100%) rename model/{resource/browser.yaml => browser/resources.yaml} (100%) rename model/{registry/cicd.yaml => cicd/registry.yaml} (100%) create mode 100644 model/client/common.yaml rename model/{registry/client.yaml => client/registry.yaml} (100%) rename model/{registry/cloud.yaml => cloud/registry.yaml} (100%) rename model/{resource/cloud.yaml => cloud/resources.yaml} (100%) rename model/{registry/cloudevents.yaml => cloudevents/registry.yaml} (100%) rename model/{trace/cloudevents.yaml => cloudevents/spans.yaml} (100%) create mode 100644 model/code/common.yaml rename model/{registry/code.yaml => code/registry.yaml} (100%) rename model/{registry/deprecated/container.yaml => container/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/container.yaml => container/metrics.yaml} (100%) rename model/{registry/container.yaml => container/registry.yaml} (100%) rename model/{resource/container.yaml => container/resources.yaml} (100%) rename model/{registry/cpu.yaml => cpu/registry.yaml} (100%) rename model/{db-common.yaml => database/common.yaml} (100%) rename model/{metrics/deprecated/database.yaml => database/deprecated/metrics-deprecated.yaml} (100%) rename model/{registry/deprecated/db.yaml => database/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/database-metrics.yaml => database/metrics.yaml} (100%) rename model/{registry/db.yaml => database/registry.yaml} (100%) rename model/{trace/database.yaml => database/spans.yaml} (100%) rename model/{registry/deprecated/deployment.yaml => deployment/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/deployment.yaml => deployment/registry.yaml} (100%) rename model/{resource/deployment_environment.yaml => deployment/resources.yaml} (100%) create mode 100644 model/destination/common.yaml rename model/{registry/destination.yaml => destination/registry.yaml} (100%) rename model/{logs/mobile-events.yaml => device/events.yaml} (100%) rename model/{registry/device.yaml => device/registry.yaml} (100%) rename model/{resource/device.yaml => device/resources.yaml} (100%) rename model/{registry/disk.yaml => disk/registry.yaml} (100%) rename model/{metrics/dns.yaml => dns/metrics.yaml} (100%) rename model/{registry/dns.yaml => dns/registry.yaml} (100%) rename model/{registry/dotnet.yaml => dotnet/registry.yaml} (100%) rename model/{metrics/dotnet-metrics.yaml => dotnet/runtime-metrics.yaml} (100%) create mode 100644 model/enduser/deprecated/common.yaml rename model/{registry/deprecated/enduser.yaml => enduser/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/error.yaml => error/registry.yaml} (100%) rename model/{logs/events.yaml => event/common.yaml} (100%) rename model/{registry/event.yaml => event/registry.yaml} (100%) rename model/{trace/trace-exception.yaml => exceptions/events.yaml} (100%) rename model/{logs/log-exception.yaml => exceptions/logs.yaml} (100%) rename model/{registry/exception.yaml => exceptions/registry.yaml} (100%) rename model/{faas-common.yaml => faas/common.yaml} (100%) rename model/{metrics/faas-metrics.yaml => faas/metrics.yaml} (100%) rename model/{registry/faas.yaml => faas/registry.yaml} (100%) rename model/{resource/faas.yaml => faas/resources.yaml} (100%) rename model/{trace/faas.yaml => faas/spans.yaml} (100%) rename model/{trace/feature-flag.yaml => feature-flag/events.yaml} (100%) rename model/{logs/log-feature_flag.yaml => feature-flag/logs.yaml} (100%) rename model/{registry/feature-flag.yaml => feature-flag/registry.yaml} (100%) rename model/{registry/file.yaml => file/registry.yaml} (100%) rename model/{resource/cloud_provider/gcp/cloud_run.yaml => gcp/cloud-run-resources.yaml} (100%) rename model/{trace/instrumentation/gcp-client.yml => gcp/common.yml} (100%) rename model/{resource/cloud_provider/gcp/gce.yaml => gcp/gce-resources.yaml} (100%) rename model/{registry/gcp.yaml => gcp/registry.yaml} (100%) rename model/{registry/deprecated/gen-ai.yaml => gen-ai/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/gen-ai.yaml => gen-ai/metrics.yaml} (100%) rename model/{registry/gen-ai.yaml => gen-ai/registry.yaml} (100%) rename model/{trace/gen-ai.yaml => gen-ai/spans.yaml} (100%) delete mode 100644 model/general.yaml rename model/{metrics/go-metrics.yaml => go/metrics.yaml} (100%) rename model/{registry/go.yaml => go/registry.yaml} (100%) rename model/{registry/graphql.yaml => graphgl/registry.yaml} (100%) rename model/{trace/instrumentation/graphql.yml => graphgl/spans.yml} (100%) rename model/{metrics/hardware/common.yaml => hardware/common-metrics.yaml} (100%) rename model/{hardware-common.yaml => hardware/common.yaml} (100%) rename model/{registry/hardware.yaml => hardware/registry.yaml} (100%) rename model/{registry/heroku.yaml => heroku/registry.yaml} (100%) rename model/{resource/cloud_provider/heroku.yaml => heroku/resources.yaml} (100%) rename model/{registry/host.yaml => host/registry.yaml} (100%) rename model/{resource/host.yaml => host/resources.yaml} (100%) rename model/{http-common.yaml => http/common.yaml} (100%) rename model/{registry/deprecated/http.yaml => http/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/http.yaml => http/metrics.yaml} (100%) rename model/{registry/http.yaml => http/registry.yaml} (100%) rename model/{trace/http.yaml => http/spans.yaml} (100%) rename model/{registry/deprecated/ios.yaml => ios/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/deprecated/jvm-metrics.yaml => jvm/deprecated/metrics-deprecated.yaml} (100%) rename model/{metrics/jvm-metrics-experimental.yaml => jvm/metrics-experimental.yaml} (100%) rename model/{metrics/jvm-metrics.yaml => jvm/metrics.yaml} (100%) rename model/{registry/jvm.yaml => jvm/registry.yaml} (100%) rename model/{registry/deprecated/k8s.yaml => k8s/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/k8s.yaml => k8s/metrics.yaml} (100%) rename model/{registry/k8s.yaml => k8s/registry.yaml} (100%) rename model/{resource/k8s.yaml => k8s/resources.yaml} (100%) rename model/{metrics/dotnet/dotnet-kestrel.yaml => kestrel/metrics.yaml} (100%) rename model/{registry/linux.yaml => linux/registry.yaml} (100%) rename model/{logs/media.yaml => log/common.yaml} (63%) rename model/{registry/log.yaml => log/registry.yaml} (100%) delete mode 100644 model/logs/general.yaml rename model/{messaging-common.yaml => messaging/common.yaml} (100%) rename model/{metrics/deprecated/messaging-metrics.yaml => messaging/deprecated/metrics-deprecated.yaml} (100%) rename model/{registry/deprecated/messaging.yaml => messaging/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/messaging-metrics.yaml => messaging/metrics.yaml} (100%) rename model/{registry/messaging.yaml => messaging/registry.yaml} (100%) rename model/{trace/messaging.yaml => messaging/spans.yaml} (100%) rename model/{network.yaml => network/common.yaml} (100%) rename model/{registry/deprecated/network.yaml => network/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/network.yaml => network/registry.yaml} (100%) rename model/{metrics/nodejs-metrics.yaml => nodejs/metrics.yaml} (100%) rename model/{registry/nodejs.yaml => nodejs/registry.yaml} (100%) rename model/{registry/oci.yaml => oci/registry.yaml} (100%) rename model/{trace/compatibility.yaml => opentracing/common.yaml} (91%) rename model/{registry/opentracing.yaml => opentracing/registry.yaml} (100%) rename model/{registry/os.yaml => os/registry.yaml} (100%) rename model/{resource/os.yaml => os/resources.yaml} (100%) rename model/{trace/exporter/exporter.yaml => otel/common.yaml} (91%) rename model/{registry/deprecated/otel.yaml => otel/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/otel.yaml => otel/registry.yaml} (100%) rename model/{scope/exporter/exporter.yaml => otel/resources.yaml} (100%) create mode 100644 model/peer/common.yaml rename model/{registry/peer.yaml => peer/registry.yaml} (100%) rename model/{registry/deprecated/process.yaml => process/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/process-metrics.yaml => process/metrics.yaml} (100%) rename model/{registry/process.yaml => process/registry.yaml} (100%) rename model/{resource/process.yaml => process/resources.yaml} (100%) rename model/{profiles/frame.yaml => profile/common.yaml} (100%) rename model/{registry/profile.yaml => profile/registry.yaml} (100%) rename model/{registry/deprecated/rpc.yaml => rpc/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/rpc-metrics.yaml => rpc/metrics.yaml} (100%) rename model/{registry/rpc.yaml => rpc/registry.yaml} (100%) rename model/{trace/rpc.yaml => rpc/spans.yaml} (100%) create mode 100644 model/server/common.yaml rename model/{registry/server.yaml => server/registry.yaml} (100%) rename model/{registry/service.yaml => service/registry.yaml} (100%) rename model/{resource/service_experimental.yaml => service/resources-experimental.yaml} (100%) rename model/{resource/service.yaml => service/resources.yaml} (100%) rename model/{session.yaml => session/common.yaml} (100%) rename model/{registry/session.yaml => session/registry.yaml} (100%) rename model/{metrics/dotnet/dotnet-signalr.yaml => signalr/metrics.yaml} (100%) rename model/{registry/signalr.yaml => signalr/registry.yaml} (100%) create mode 100644 model/source/common.yaml rename model/{registry/source.yaml => source/registry.yaml} (100%) rename model/{registry/deprecated/system.yaml => system/deprecated/registry-deprecated.yaml} (100%) rename model/{metrics/system-metrics.yaml => system/metrics.yaml} (100%) rename model/{registry/system.yaml => system/registry.yaml} (100%) rename model/{registry/telemetry.yaml => telemetry/registry.yaml} (100%) rename model/{resource/telemetry_experimental.yaml => telemetry/resources-experimental.yaml} (100%) rename model/{resource/telemetry.yaml => telemetry/resources.yaml} (100%) rename model/{registry/test.yaml => test/registry.yaml} (100%) create mode 100644 model/thread/common.yaml rename model/{registry/thread.yaml => thread/registry.yaml} (100%) rename model/{registry/deprecated/tls.yaml => tls/deprecated/registry-deprecated.yaml} (100%) rename model/{registry/tls.yaml => tls/registry.yaml} (100%) rename model/{url.yaml => url/common.yaml} (100%) rename model/{registry/url.yaml => url/registry.yaml} (100%) rename model/{registry/user-agent.yaml => user-agent/registry.yaml} (100%) rename model/{registry/user.yaml => user/registry.yaml} (100%) rename model/{metrics/v8js-metrics.yaml => v8js/metrics.yaml} (100%) rename model/{registry/v8js.yaml => v8js/registry.yaml} (100%) rename model/{registry/vcs.yaml => vcs/registry.yaml} (100%) rename model/{registry/webengine.yaml => webengine/registry.yaml} (100%) rename model/{resource/webengine.yaml => webengine/resources.yaml} (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9be2aef1a2..140af28811 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,85 +16,74 @@ * @open-telemetry/specs-semconv-maintainers @open-telemetry/specs-semconv-approvers # Schemas and schema file tooling -/schemas/ @open-telemetry/specs-semconv-approvers @tigrannajaryan -/internal/tools/schema_check.sh @open-telemetry/specs-semconv-approvers @tigrannajaryan +/schemas/ @open-telemetry/specs-semconv-approvers @tigrannajaryan +/internal/tools/schema_check.sh @open-telemetry/specs-semconv-approvers @tigrannajaryan -# Logs semantic conventions -/model/logs/ @open-telemetry/specs-semconv-approvers @tigrannajaryan +# Logs and events semantic conventions /docs/exceptions/exceptions-logs.md @open-telemetry/specs-semconv-approvers @tigrannajaryan /docs/feature-flags/feature-flags-logs.md @open-telemetry/specs-semconv-approvers @tigrannajaryan /docs/general/events-general.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-event-approvers @tigrannajaryan /docs/general/logs-general.md @open-telemetry/specs-semconv-approvers @tigrannajaryan /docs/logs/ @open-telemetry/specs-semconv-approvers @tigrannajaryan +/model/log/ @open-telemetry/specs-semconv-approvers @tigrannajaryan +/model/event/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-event-approvers -# JVM semantic conventions approvers -/model/metrics/jvm-* @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-jvm-approvers -/docs/jvm/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-jvm-approvers +# JVM semantic conventions +/docs/jvm/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-jvm-approvers +/model/jvm/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-jvm-approvers -# HTTP semantic conventions approvers -/model/metrics/http.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/trace/http.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/http.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/server.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/client.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/network.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers @open-telemetry/semconv-security-approvers -/model/registry/error.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/url.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/model/registry/user-agent.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -/docs/http/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +# HTTP semantic conventions +/docs/http/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/http/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/error/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/client/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/network/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers @open-telemetry/semconv-security-approvers +/model/server/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/url/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers +/model/user-agent/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-http-approvers -# System semantic conventions approvers -/docs/system/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers -/model/metrics/system-* @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers -/docs/resource/host.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers -/model/resource/host.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers +# System semantic conventions +/docs/system/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers +/docs/resource/host.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers +/model/host/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers +/model/system/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-system-approvers -# Mobile semantic conventions approvers -/docs/mobile/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers -/model/logs/mobile* @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers +# Mobile semantic conventions +/docs/mobile/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers +/model/device/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers -# K8s semantic conventions approvers -/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers -/model/resource/k8s.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers -/model/registry/k8s.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers +# K8s semantic conventions +/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers +/model/k8s/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers -# Container semantic conventions approvers -/docs/resource/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers -/model/resource/container.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers -/model/registry/container.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers -/model/registry/oci.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers +# Container semantic conventions +/docs/resource/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers +/model/container/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers +/model/oci/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers -# .NET semantic conventions approvers -/model/metrics/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers -/model/registry/aspnetcore.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers -/model/registry/signalr.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers -/docs/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers -/model/metrics/dotnet-metrics.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver -/model/registry/dotnet.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver -/docs/runtime/dotnet-metrics.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver +# .NET semantic conventions +/docs/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers +/docs/runtime/dotnet-metrics.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver +/model/aspnetcore/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers +/model/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers +/model/signalr/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers -# Gen-AI semantic conventions approvers -/model/registry/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers -/model/metrics/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers -/model/trace/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers -/docs/gen-ai/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers +# Gen-AI semantic conventions +/docs/gen-ai/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers +/model/gen-ai/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers -# Security semantic conventions approvers -/model/registry/file.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/registry/dns.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/registry/process.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/registry/tls.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/registry/user.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers +# Security semantic conventions +/model/dns/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers +/model/file/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers +# /model/network/ is defined in HTTP section +/model/process/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers +/model/tls/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers +/model/user/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/metrics/dns.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/metrics/process-metrics.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/resource/process.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers -/model/network.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers - -# CICD semantic conventions approvers -/model/registry/artifact.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers -/model/registry/cicd.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers -/model/registry/code.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers -/model/registry/deployment.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers -/model/registry/test.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers -/model/registry/vcs.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +# CICD semantic conventions +/model/artifact/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +/model/cicd/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +/model/code/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +/model/deployment/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +/model/test/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers +/model/vcs/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 4fb558fba2..d0efd84320 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,8 +28,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu @@ -80,8 +80,8 @@ body: - area:thread - area:tls - area:url - - area:user-agent - area:user + - area:user-agent - area:v8js - area:vcs - area:webengine diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 9c7d3646ed..206cc1c715 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,8 +20,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu @@ -72,8 +72,8 @@ body: - area:thread - area:tls - area:url - - area:user-agent - area:user + - area:user-agent - area:v8js - area:vcs - area:webengine diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index f0d28f0055..1c9cfe8ef9 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,8 +29,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu @@ -81,8 +81,8 @@ body: - area:thread - area:tls - area:url - - area:user-agent - area:user + - area:user-agent - area:v8js - area:vcs - area:webengine diff --git a/.github/workflows/generate-registry-area-labels.yml b/.github/workflows/generate-registry-area-labels.yml index 58f3b62b3a..1b8ea3a59d 100644 --- a/.github/workflows/generate-registry-area-labels.yml +++ b/.github/workflows/generate-registry-area-labels.yml @@ -3,9 +3,10 @@ on: push: branches: [main] paths: - - model/registry/** + - model/** - ./.github/workflows/generate-registry-area-labels.yml - ./.github/workflows/scripts/generate-registry-area-labels.sh + workflow_dispatch: jobs: @@ -14,6 +15,9 @@ jobs: if: ${{ github.repository_owner == 'open-telemetry' }} steps: - uses: actions/checkout@v4 + - name: Generate registry area labels + run: | + make generate-gh-issue-templates - name: Run update permissions run: chmod +x ./.github/workflows/scripts/generate-registry-area-labels.sh diff --git a/.github/workflows/scripts/generate-registry-area-labels.sh b/.github/workflows/scripts/generate-registry-area-labels.sh old mode 100755 new mode 100644 index 3a2af777e6..63621a04dd --- a/.github/workflows/scripts/generate-registry-area-labels.sh +++ b/.github/workflows/scripts/generate-registry-area-labels.sh @@ -12,21 +12,19 @@ set -euo pipefail CUR_DIRECTORY=$(dirname "$0") -AREAS=$(sh "${CUR_DIRECTORY}/get-registry-areas.sh") +AREAS=$1 echo -e "\nStarting to create area labels" echo -e "--------------------------------\n" -for AREA in ${AREAS}; do - LABEL_NAME=$(basename "${AREA}" .yaml) - - if (( "${#LABEL_NAME}" > 50 )); then - echo "'${LABEL_NAME}' exceeds GitHubs 50-character limit on labels, skipping" +while IFS= read -r label; do + if (( "${#label}" > 50 )); then + echo -e "Label $label exceeds GitHubs 50-character limit on labels, skipping" continue fi - echo "area:${LABEL_NAME}" - gh label create "area:${LABEL_NAME}" -c "#425cc7" --force -done + echo "$label" + gh label create "$label" -c "#425cc7" --force +done < ${AREAS} echo -e "\nLabels created successfully" echo -e "--------------------------------\n" diff --git a/.github/workflows/scripts/get-registry-areas.sh b/.github/workflows/scripts/get-registry-areas.sh deleted file mode 100755 index b33c9b3c60..0000000000 --- a/.github/workflows/scripts/get-registry-areas.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 -# -# Get a list of the semantic conventions areas from the registry. - -CUR_DIRECTORY=$(dirname "$0") -REPO_DIR="$( cd "$CUR_DIRECTORY/../../../" && pwd )" -REGISTRY_DIR="$( cd "$REPO_DIR/model/registry" && pwd )" - -# Explicitly sort with `-d` (dictionary) so BSD and GNU work alike. -for entry in $(ls $REGISTRY_DIR | egrep '\.yaml$' | sort -d) -do - echo "$entry" -done diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a3637ee9a..cbdf29dc75 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,7 @@ requirements and recommendations. - [How to Contribute](#how-to-contribute) - [Prerequisites](#prerequisites) - [1. Modify the YAML model](#1-modify-the-yaml-model) + - [Code structure](#code-structure) - [Schema files](#schema-files) - [2. Update the markdown files](#2-update-the-markdown-files) - [Hugo frontmatter](#hugo-frontmatter) @@ -93,6 +94,38 @@ Refer to the [Semantic Convention YAML Language](https://github.com/open-telemetry/build-tools/blob/v0.25.0/semantic-conventions/syntax.md) to learn how to make changes to the YAML files. +#### Code structure + +The YAML (model definition) and Markdown (documentation) files are organized in the following way: + +``` +├── docs +│ ├── attribute_registry +│ ├── {root-namespace} +│ │ ├── README.md +│ │ ├── ....md +├── model +│ ├── {root-namespace} +│ │ ├── events.yaml +│ │ ├── metrics.yaml +│ │ ├── registry.yaml +│ │ ├── resources.yaml +│ │ ├── spans.yaml +``` + +All attributes must be defined in the folder matching their root namespace under +`/{root-namespace}/*registry.yaml` file. + +Corresponding markdown files are auto-generated (see [Update the markdown files](#2-update-the-markdown-files)) +in `/docs/attribute_registry` folder. + +All semantic conventions definitions for telemetry signals should be placed under +`/model/{root-namespace}` and should follow `*{signal}.yaml` pattern. For example, +HTTP spans are defined in `model/http/spans.yaml`. + +YAML definitions could be broken down into multiple files. For example, AWS spans +are defined in `/model/aws/lambda-spans.yaml` and `/model/aws/sdk-spans.yaml` files. + #### Schema files When making changes to existing semantic conventions (attributes, metrics, etc) diff --git a/Makefile b/Makefile index 603c9b43ae..3f9eba31c4 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,19 @@ chlog-update: $(CHLOGGEN) # files that have the "area" dropdown field .PHONY: generate-gh-issue-templates generate-gh-issue-templates: - $(TOOLS_DIR)/scripts/update-issue-template-areas.sh + mkdir -p $(TOOLS_DIR)/bin + docker run --rm \ + -u $(id -u ${USER}):$(id -g ${USER}) \ + --mount 'type=bind,source=$(PWD)/internal/tools/scripts,target=/home/weaver/templates,readonly' \ + --mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \ + --mount 'type=bind,source=$(TOOLS_DIR)/bin,target=/home/weaver/target' \ + $(WEAVER_CONTAINER) registry generate \ + --registry=/home/weaver/source \ + --templates=/home/weaver/templates \ + --config=/home/weaver/templates/registry/areas-weaver.yaml \ + . \ + /home/weaver/target + $(TOOLS_DIR)/scripts/update-issue-template-areas.sh $(PWD)/internal/tools/bin/areas.txt # A previous iteration of calculating "LATEST_RELEASED_SEMCONV_VERSION" # relied on "git describe". However, that approach does not work with diff --git a/docs/azure/events.md b/docs/azure/events.md index dd3a6cd53c..b832dc4371 100644 --- a/docs/azure/events.md +++ b/docs/azure/events.md @@ -52,6 +52,6 @@ The event name MUST be `az.resource.log`. | `tenant.id` | string | The tenant ID of the Active Directory tenant that this event is tied to. | `607964b6-41a5-4e24-a5db-db7aab3b9b34` | `Conditionally Required`: if the event is tied to an Active Directory tenant. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -See [Azure Resource Log definition](/model/logs/azure.yaml) for the details. +See [Azure Resource Log definition](/model/azure/logs.yaml) for the details. [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/internal/tools/scripts/registry/areas-weaver.yaml b/internal/tools/scripts/registry/areas-weaver.yaml new file mode 100644 index 0000000000..074629a1cf --- /dev/null +++ b/internal/tools/scripts/registry/areas-weaver.yaml @@ -0,0 +1,13 @@ +templates: + - pattern: areas.md.j2 + filter: > + semconv_grouped_attributes({"exclude_deprecated": true}) | .[].root_namespace + application_mode: single +whitespace_control: + trim_blocks: true + lstrip_blocks: true + keep_trailing_newline: true +text_maps: + areas: + az: azure + hw: hardware diff --git a/internal/tools/scripts/registry/areas.md.j2 b/internal/tools/scripts/registry/areas.md.j2 new file mode 100644 index 0000000000..f10bdea506 --- /dev/null +++ b/internal/tools/scripts/registry/areas.md.j2 @@ -0,0 +1,5 @@ +{{- template.set_file_name("areas.txt") -}} + +{% for item in ctx | map('map_text', 'areas') | sort %} +area:{{ item | kebab_case }} +{% endfor %} \ No newline at end of file diff --git a/internal/tools/scripts/update-issue-template-areas.sh b/internal/tools/scripts/update-issue-template-areas.sh index e905808a18..3b906dfc55 100755 --- a/internal/tools/scripts/update-issue-template-areas.sh +++ b/internal/tools/scripts/update-issue-template-areas.sh @@ -24,17 +24,16 @@ REPO_DIR="$( cd "$CUR_DIRECTORY/../../../" && pwd )" GITHUB_DIR="$( cd "$REPO_DIR/.github/" && pwd )" TEMPLATES_DIR="$( cd "$GITHUB_DIR/ISSUE_TEMPLATE" && pwd )" -AREAS=$(sh "${GITHUB_DIR}/workflows/scripts/get-registry-areas.sh") +AREAS=$1 START_AREA_LIST="# Start semconv area list" END_AREA_LIST="# End semconv area list" replacement=" ${START_AREA_LIST}" -for AREA in ${AREAS}; do - LABEL_NAME=$(basename "${AREA}" .yaml) - replacement="${replacement}\n - area:${LABEL_NAME}" -done +while IFS= read -r line; do + replacement="${replacement}\n - $line" +done < ${AREAS} echo -e "\nStarting to replace areas in ISSUE_TEMPLATES:" echo -e "---------------------------------------------\n" diff --git a/model/registry/deprecated/android.yaml b/model/andrioid/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/android.yaml rename to model/andrioid/deprecated/registry-deprecated.yaml diff --git a/model/registry/android.yaml b/model/andrioid/registry.yaml similarity index 100% rename from model/registry/android.yaml rename to model/andrioid/registry.yaml diff --git a/model/resource/android.yaml b/model/andrioid/resources.yaml similarity index 100% rename from model/resource/android.yaml rename to model/andrioid/resources.yaml diff --git a/model/registry/artifact.yaml b/model/artifact/registry.yaml similarity index 100% rename from model/registry/artifact.yaml rename to model/artifact/registry.yaml diff --git a/model/metrics/dotnet/dotnet-aspnetcore.yaml b/model/aspnetcore/metrics.yaml similarity index 100% rename from model/metrics/dotnet/dotnet-aspnetcore.yaml rename to model/aspnetcore/metrics.yaml diff --git a/model/registry/aspnetcore.yaml b/model/aspnetcore/registry.yaml similarity index 100% rename from model/registry/aspnetcore.yaml rename to model/aspnetcore/registry.yaml diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/aws/ecs-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/ecs.yaml rename to model/aws/ecs-resources.yaml diff --git a/model/resource/cloud_provider/aws/eks.yaml b/model/aws/eks-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/eks.yaml rename to model/aws/eks-resources.yaml diff --git a/model/trace/aws/lambda.yaml b/model/aws/lambda-spans.yaml similarity index 100% rename from model/trace/aws/lambda.yaml rename to model/aws/lambda-spans.yaml diff --git a/model/resource/cloud_provider/aws/logs.yaml b/model/aws/logs-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/logs.yaml rename to model/aws/logs-resources.yaml diff --git a/model/registry/aws.yaml b/model/aws/registry.yaml similarity index 100% rename from model/registry/aws.yaml rename to model/aws/registry.yaml diff --git a/model/trace/instrumentation/aws-sdk.yml b/model/aws/sdk-spans.yml similarity index 100% rename from model/trace/instrumentation/aws-sdk.yml rename to model/aws/sdk-spans.yml diff --git a/model/logs/azure.yaml b/model/azure/logs.yaml similarity index 100% rename from model/logs/azure.yaml rename to model/azure/logs.yaml diff --git a/model/registry/azure.yaml b/model/azure/registry.yaml similarity index 100% rename from model/registry/azure.yaml rename to model/azure/registry.yaml diff --git a/model/registry/browser.yaml b/model/browser/registry.yaml similarity index 100% rename from model/registry/browser.yaml rename to model/browser/registry.yaml diff --git a/model/resource/browser.yaml b/model/browser/resources.yaml similarity index 100% rename from model/resource/browser.yaml rename to model/browser/resources.yaml diff --git a/model/registry/cicd.yaml b/model/cicd/registry.yaml similarity index 100% rename from model/registry/cicd.yaml rename to model/cicd/registry.yaml diff --git a/model/client/common.yaml b/model/client/common.yaml new file mode 100644 index 0000000000..02ef815ede --- /dev/null +++ b/model/client/common.yaml @@ -0,0 +1,8 @@ +groups: + - id: client + type: attribute_group + brief: > + General client attributes. + attributes: + - ref: client.address + - ref: client.port diff --git a/model/registry/client.yaml b/model/client/registry.yaml similarity index 100% rename from model/registry/client.yaml rename to model/client/registry.yaml diff --git a/model/registry/cloud.yaml b/model/cloud/registry.yaml similarity index 100% rename from model/registry/cloud.yaml rename to model/cloud/registry.yaml diff --git a/model/resource/cloud.yaml b/model/cloud/resources.yaml similarity index 100% rename from model/resource/cloud.yaml rename to model/cloud/resources.yaml diff --git a/model/registry/cloudevents.yaml b/model/cloudevents/registry.yaml similarity index 100% rename from model/registry/cloudevents.yaml rename to model/cloudevents/registry.yaml diff --git a/model/trace/cloudevents.yaml b/model/cloudevents/spans.yaml similarity index 100% rename from model/trace/cloudevents.yaml rename to model/cloudevents/spans.yaml diff --git a/model/code/common.yaml b/model/code/common.yaml new file mode 100644 index 0000000000..b90efeec96 --- /dev/null +++ b/model/code/common.yaml @@ -0,0 +1,13 @@ +groups: + - id: code + type: attribute_group + brief: > + These attributes allow to report this unit of code and therefore to provide more context about the span. + attributes: + - ref: code.function + - ref: code.namespace + - ref: code.filepath + - ref: code.lineno + - ref: code.column + - ref: code.stacktrace + requirement_level: opt_in diff --git a/model/registry/code.yaml b/model/code/registry.yaml similarity index 100% rename from model/registry/code.yaml rename to model/code/registry.yaml diff --git a/model/registry/deprecated/container.yaml b/model/container/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/container.yaml rename to model/container/deprecated/registry-deprecated.yaml diff --git a/model/metrics/container.yaml b/model/container/metrics.yaml similarity index 100% rename from model/metrics/container.yaml rename to model/container/metrics.yaml diff --git a/model/registry/container.yaml b/model/container/registry.yaml similarity index 100% rename from model/registry/container.yaml rename to model/container/registry.yaml diff --git a/model/resource/container.yaml b/model/container/resources.yaml similarity index 100% rename from model/resource/container.yaml rename to model/container/resources.yaml diff --git a/model/registry/cpu.yaml b/model/cpu/registry.yaml similarity index 100% rename from model/registry/cpu.yaml rename to model/cpu/registry.yaml diff --git a/model/db-common.yaml b/model/database/common.yaml similarity index 100% rename from model/db-common.yaml rename to model/database/common.yaml diff --git a/model/metrics/deprecated/database.yaml b/model/database/deprecated/metrics-deprecated.yaml similarity index 100% rename from model/metrics/deprecated/database.yaml rename to model/database/deprecated/metrics-deprecated.yaml diff --git a/model/registry/deprecated/db.yaml b/model/database/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/db.yaml rename to model/database/deprecated/registry-deprecated.yaml diff --git a/model/metrics/database-metrics.yaml b/model/database/metrics.yaml similarity index 100% rename from model/metrics/database-metrics.yaml rename to model/database/metrics.yaml diff --git a/model/registry/db.yaml b/model/database/registry.yaml similarity index 100% rename from model/registry/db.yaml rename to model/database/registry.yaml diff --git a/model/trace/database.yaml b/model/database/spans.yaml similarity index 100% rename from model/trace/database.yaml rename to model/database/spans.yaml diff --git a/model/registry/deprecated/deployment.yaml b/model/deployment/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/deployment.yaml rename to model/deployment/deprecated/registry-deprecated.yaml diff --git a/model/registry/deployment.yaml b/model/deployment/registry.yaml similarity index 100% rename from model/registry/deployment.yaml rename to model/deployment/registry.yaml diff --git a/model/resource/deployment_environment.yaml b/model/deployment/resources.yaml similarity index 100% rename from model/resource/deployment_environment.yaml rename to model/deployment/resources.yaml diff --git a/model/destination/common.yaml b/model/destination/common.yaml new file mode 100644 index 0000000000..e45dd4e365 --- /dev/null +++ b/model/destination/common.yaml @@ -0,0 +1,8 @@ +groups: + - id: destination + type: attribute_group + brief: > + General destination attributes. + attributes: + - ref: destination.address + - ref: destination.port diff --git a/model/registry/destination.yaml b/model/destination/registry.yaml similarity index 100% rename from model/registry/destination.yaml rename to model/destination/registry.yaml diff --git a/model/logs/mobile-events.yaml b/model/device/events.yaml similarity index 100% rename from model/logs/mobile-events.yaml rename to model/device/events.yaml diff --git a/model/registry/device.yaml b/model/device/registry.yaml similarity index 100% rename from model/registry/device.yaml rename to model/device/registry.yaml diff --git a/model/resource/device.yaml b/model/device/resources.yaml similarity index 100% rename from model/resource/device.yaml rename to model/device/resources.yaml diff --git a/model/registry/disk.yaml b/model/disk/registry.yaml similarity index 100% rename from model/registry/disk.yaml rename to model/disk/registry.yaml diff --git a/model/metrics/dns.yaml b/model/dns/metrics.yaml similarity index 100% rename from model/metrics/dns.yaml rename to model/dns/metrics.yaml diff --git a/model/registry/dns.yaml b/model/dns/registry.yaml similarity index 100% rename from model/registry/dns.yaml rename to model/dns/registry.yaml diff --git a/model/registry/dotnet.yaml b/model/dotnet/registry.yaml similarity index 100% rename from model/registry/dotnet.yaml rename to model/dotnet/registry.yaml diff --git a/model/metrics/dotnet-metrics.yaml b/model/dotnet/runtime-metrics.yaml similarity index 100% rename from model/metrics/dotnet-metrics.yaml rename to model/dotnet/runtime-metrics.yaml diff --git a/model/enduser/deprecated/common.yaml b/model/enduser/deprecated/common.yaml new file mode 100644 index 0000000000..e17dde1bec --- /dev/null +++ b/model/enduser/deprecated/common.yaml @@ -0,0 +1,12 @@ +groups: + - id: identity + type: attribute_group + brief: > + These attributes may be used for any operation with an authenticated and/or authorized enduser. + attributes: + - ref: enduser.id + requirement_level: recommended + - ref: enduser.role + requirement_level: recommended + - ref: enduser.scope + requirement_level: recommended diff --git a/model/registry/deprecated/enduser.yaml b/model/enduser/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/enduser.yaml rename to model/enduser/deprecated/registry-deprecated.yaml diff --git a/model/registry/error.yaml b/model/error/registry.yaml similarity index 100% rename from model/registry/error.yaml rename to model/error/registry.yaml diff --git a/model/logs/events.yaml b/model/event/common.yaml similarity index 100% rename from model/logs/events.yaml rename to model/event/common.yaml diff --git a/model/registry/event.yaml b/model/event/registry.yaml similarity index 100% rename from model/registry/event.yaml rename to model/event/registry.yaml diff --git a/model/trace/trace-exception.yaml b/model/exceptions/events.yaml similarity index 100% rename from model/trace/trace-exception.yaml rename to model/exceptions/events.yaml diff --git a/model/logs/log-exception.yaml b/model/exceptions/logs.yaml similarity index 100% rename from model/logs/log-exception.yaml rename to model/exceptions/logs.yaml diff --git a/model/registry/exception.yaml b/model/exceptions/registry.yaml similarity index 100% rename from model/registry/exception.yaml rename to model/exceptions/registry.yaml diff --git a/model/faas-common.yaml b/model/faas/common.yaml similarity index 100% rename from model/faas-common.yaml rename to model/faas/common.yaml diff --git a/model/metrics/faas-metrics.yaml b/model/faas/metrics.yaml similarity index 100% rename from model/metrics/faas-metrics.yaml rename to model/faas/metrics.yaml diff --git a/model/registry/faas.yaml b/model/faas/registry.yaml similarity index 100% rename from model/registry/faas.yaml rename to model/faas/registry.yaml diff --git a/model/resource/faas.yaml b/model/faas/resources.yaml similarity index 100% rename from model/resource/faas.yaml rename to model/faas/resources.yaml diff --git a/model/trace/faas.yaml b/model/faas/spans.yaml similarity index 100% rename from model/trace/faas.yaml rename to model/faas/spans.yaml diff --git a/model/trace/feature-flag.yaml b/model/feature-flag/events.yaml similarity index 100% rename from model/trace/feature-flag.yaml rename to model/feature-flag/events.yaml diff --git a/model/logs/log-feature_flag.yaml b/model/feature-flag/logs.yaml similarity index 100% rename from model/logs/log-feature_flag.yaml rename to model/feature-flag/logs.yaml diff --git a/model/registry/feature-flag.yaml b/model/feature-flag/registry.yaml similarity index 100% rename from model/registry/feature-flag.yaml rename to model/feature-flag/registry.yaml diff --git a/model/registry/file.yaml b/model/file/registry.yaml similarity index 100% rename from model/registry/file.yaml rename to model/file/registry.yaml diff --git a/model/resource/cloud_provider/gcp/cloud_run.yaml b/model/gcp/cloud-run-resources.yaml similarity index 100% rename from model/resource/cloud_provider/gcp/cloud_run.yaml rename to model/gcp/cloud-run-resources.yaml diff --git a/model/trace/instrumentation/gcp-client.yml b/model/gcp/common.yml similarity index 100% rename from model/trace/instrumentation/gcp-client.yml rename to model/gcp/common.yml diff --git a/model/resource/cloud_provider/gcp/gce.yaml b/model/gcp/gce-resources.yaml similarity index 100% rename from model/resource/cloud_provider/gcp/gce.yaml rename to model/gcp/gce-resources.yaml diff --git a/model/registry/gcp.yaml b/model/gcp/registry.yaml similarity index 100% rename from model/registry/gcp.yaml rename to model/gcp/registry.yaml diff --git a/model/registry/deprecated/gen-ai.yaml b/model/gen-ai/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/gen-ai.yaml rename to model/gen-ai/deprecated/registry-deprecated.yaml diff --git a/model/metrics/gen-ai.yaml b/model/gen-ai/metrics.yaml similarity index 100% rename from model/metrics/gen-ai.yaml rename to model/gen-ai/metrics.yaml diff --git a/model/registry/gen-ai.yaml b/model/gen-ai/registry.yaml similarity index 100% rename from model/registry/gen-ai.yaml rename to model/gen-ai/registry.yaml diff --git a/model/trace/gen-ai.yaml b/model/gen-ai/spans.yaml similarity index 100% rename from model/trace/gen-ai.yaml rename to model/gen-ai/spans.yaml diff --git a/model/general.yaml b/model/general.yaml deleted file mode 100644 index 85377316e1..0000000000 --- a/model/general.yaml +++ /dev/null @@ -1,65 +0,0 @@ -groups: - - id: client - type: attribute_group - brief: > - General client attributes. - attributes: - - ref: client.address - - ref: client.port - - id: server - type: attribute_group - brief: > - General server attributes. - attributes: - - ref: server.address - - ref: server.port - - id: source - type: attribute_group - brief: > - General source attributes. - attributes: - - ref: source.address - - ref: source.port - - id: destination - type: attribute_group - brief: > - General destination attributes. - attributes: - - ref: destination.address - - ref: destination.port - - id: peer - type: span - brief: "Operations that access some remote service." - attributes: - - ref: peer.service - requirement_level: recommended - - id: identity - type: span - brief: > - These attributes may be used for any operation with an authenticated and/or authorized enduser. - attributes: - - ref: enduser.id - requirement_level: recommended - - ref: enduser.role - requirement_level: recommended - - ref: enduser.scope - requirement_level: recommended - - id: thread - type: span - brief: > - These attributes may be used for any operation to store information about a thread that started a span. - attributes: - - ref: thread.id - - ref: thread.name - - id: code - type: span - brief: > - These attributes allow to report this unit of code and therefore to provide more context about the span. - attributes: - - ref: code.function - - ref: code.namespace - - ref: code.filepath - - ref: code.lineno - - ref: code.column - - ref: code.stacktrace - requirement_level: opt_in diff --git a/model/metrics/go-metrics.yaml b/model/go/metrics.yaml similarity index 100% rename from model/metrics/go-metrics.yaml rename to model/go/metrics.yaml diff --git a/model/registry/go.yaml b/model/go/registry.yaml similarity index 100% rename from model/registry/go.yaml rename to model/go/registry.yaml diff --git a/model/registry/graphql.yaml b/model/graphgl/registry.yaml similarity index 100% rename from model/registry/graphql.yaml rename to model/graphgl/registry.yaml diff --git a/model/trace/instrumentation/graphql.yml b/model/graphgl/spans.yml similarity index 100% rename from model/trace/instrumentation/graphql.yml rename to model/graphgl/spans.yml diff --git a/model/metrics/hardware/common.yaml b/model/hardware/common-metrics.yaml similarity index 100% rename from model/metrics/hardware/common.yaml rename to model/hardware/common-metrics.yaml diff --git a/model/hardware-common.yaml b/model/hardware/common.yaml similarity index 100% rename from model/hardware-common.yaml rename to model/hardware/common.yaml diff --git a/model/registry/hardware.yaml b/model/hardware/registry.yaml similarity index 100% rename from model/registry/hardware.yaml rename to model/hardware/registry.yaml diff --git a/model/registry/heroku.yaml b/model/heroku/registry.yaml similarity index 100% rename from model/registry/heroku.yaml rename to model/heroku/registry.yaml diff --git a/model/resource/cloud_provider/heroku.yaml b/model/heroku/resources.yaml similarity index 100% rename from model/resource/cloud_provider/heroku.yaml rename to model/heroku/resources.yaml diff --git a/model/registry/host.yaml b/model/host/registry.yaml similarity index 100% rename from model/registry/host.yaml rename to model/host/registry.yaml diff --git a/model/resource/host.yaml b/model/host/resources.yaml similarity index 100% rename from model/resource/host.yaml rename to model/host/resources.yaml diff --git a/model/http-common.yaml b/model/http/common.yaml similarity index 100% rename from model/http-common.yaml rename to model/http/common.yaml diff --git a/model/registry/deprecated/http.yaml b/model/http/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/http.yaml rename to model/http/deprecated/registry-deprecated.yaml diff --git a/model/metrics/http.yaml b/model/http/metrics.yaml similarity index 100% rename from model/metrics/http.yaml rename to model/http/metrics.yaml diff --git a/model/registry/http.yaml b/model/http/registry.yaml similarity index 100% rename from model/registry/http.yaml rename to model/http/registry.yaml diff --git a/model/trace/http.yaml b/model/http/spans.yaml similarity index 100% rename from model/trace/http.yaml rename to model/http/spans.yaml diff --git a/model/registry/deprecated/ios.yaml b/model/ios/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/ios.yaml rename to model/ios/deprecated/registry-deprecated.yaml diff --git a/model/metrics/deprecated/jvm-metrics.yaml b/model/jvm/deprecated/metrics-deprecated.yaml similarity index 100% rename from model/metrics/deprecated/jvm-metrics.yaml rename to model/jvm/deprecated/metrics-deprecated.yaml diff --git a/model/metrics/jvm-metrics-experimental.yaml b/model/jvm/metrics-experimental.yaml similarity index 100% rename from model/metrics/jvm-metrics-experimental.yaml rename to model/jvm/metrics-experimental.yaml diff --git a/model/metrics/jvm-metrics.yaml b/model/jvm/metrics.yaml similarity index 100% rename from model/metrics/jvm-metrics.yaml rename to model/jvm/metrics.yaml diff --git a/model/registry/jvm.yaml b/model/jvm/registry.yaml similarity index 100% rename from model/registry/jvm.yaml rename to model/jvm/registry.yaml diff --git a/model/registry/deprecated/k8s.yaml b/model/k8s/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/k8s.yaml rename to model/k8s/deprecated/registry-deprecated.yaml diff --git a/model/metrics/k8s.yaml b/model/k8s/metrics.yaml similarity index 100% rename from model/metrics/k8s.yaml rename to model/k8s/metrics.yaml diff --git a/model/registry/k8s.yaml b/model/k8s/registry.yaml similarity index 100% rename from model/registry/k8s.yaml rename to model/k8s/registry.yaml diff --git a/model/resource/k8s.yaml b/model/k8s/resources.yaml similarity index 100% rename from model/resource/k8s.yaml rename to model/k8s/resources.yaml diff --git a/model/metrics/dotnet/dotnet-kestrel.yaml b/model/kestrel/metrics.yaml similarity index 100% rename from model/metrics/dotnet/dotnet-kestrel.yaml rename to model/kestrel/metrics.yaml diff --git a/model/registry/linux.yaml b/model/linux/registry.yaml similarity index 100% rename from model/registry/linux.yaml rename to model/linux/registry.yaml diff --git a/model/logs/media.yaml b/model/log/common.yaml similarity index 63% rename from model/logs/media.yaml rename to model/log/common.yaml index 34c7631d5c..47b7af71f5 100644 --- a/model/logs/media.yaml +++ b/model/log/common.yaml @@ -1,4 +1,14 @@ groups: + - id: log.record + type: attribute_group + brief: > + The attributes described in this section are rather generic. They may be used in any Log Record they apply to. + attributes: + - ref: log.record.uid + requirement_level: opt_in + - ref: log.record.original + requirement_level: opt_in + - id: attributes.log type: attribute_group brief: "Describes Log attributes" diff --git a/model/registry/log.yaml b/model/log/registry.yaml similarity index 100% rename from model/registry/log.yaml rename to model/log/registry.yaml diff --git a/model/logs/general.yaml b/model/logs/general.yaml deleted file mode 100644 index d4835d6982..0000000000 --- a/model/logs/general.yaml +++ /dev/null @@ -1,10 +0,0 @@ -groups: - - id: log.record - type: attribute_group - brief: > - The attributes described in this section are rather generic. They may be used in any Log Record they apply to. - attributes: - - ref: log.record.uid - requirement_level: opt_in - - ref: log.record.original - requirement_level: opt_in diff --git a/model/messaging-common.yaml b/model/messaging/common.yaml similarity index 100% rename from model/messaging-common.yaml rename to model/messaging/common.yaml diff --git a/model/metrics/deprecated/messaging-metrics.yaml b/model/messaging/deprecated/metrics-deprecated.yaml similarity index 100% rename from model/metrics/deprecated/messaging-metrics.yaml rename to model/messaging/deprecated/metrics-deprecated.yaml diff --git a/model/registry/deprecated/messaging.yaml b/model/messaging/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/messaging.yaml rename to model/messaging/deprecated/registry-deprecated.yaml diff --git a/model/metrics/messaging-metrics.yaml b/model/messaging/metrics.yaml similarity index 100% rename from model/metrics/messaging-metrics.yaml rename to model/messaging/metrics.yaml diff --git a/model/registry/messaging.yaml b/model/messaging/registry.yaml similarity index 100% rename from model/registry/messaging.yaml rename to model/messaging/registry.yaml diff --git a/model/trace/messaging.yaml b/model/messaging/spans.yaml similarity index 100% rename from model/trace/messaging.yaml rename to model/messaging/spans.yaml diff --git a/model/network.yaml b/model/network/common.yaml similarity index 100% rename from model/network.yaml rename to model/network/common.yaml diff --git a/model/registry/deprecated/network.yaml b/model/network/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/network.yaml rename to model/network/deprecated/registry-deprecated.yaml diff --git a/model/registry/network.yaml b/model/network/registry.yaml similarity index 100% rename from model/registry/network.yaml rename to model/network/registry.yaml diff --git a/model/metrics/nodejs-metrics.yaml b/model/nodejs/metrics.yaml similarity index 100% rename from model/metrics/nodejs-metrics.yaml rename to model/nodejs/metrics.yaml diff --git a/model/registry/nodejs.yaml b/model/nodejs/registry.yaml similarity index 100% rename from model/registry/nodejs.yaml rename to model/nodejs/registry.yaml diff --git a/model/registry/oci.yaml b/model/oci/registry.yaml similarity index 100% rename from model/registry/oci.yaml rename to model/oci/registry.yaml diff --git a/model/trace/compatibility.yaml b/model/opentracing/common.yaml similarity index 91% rename from model/trace/compatibility.yaml rename to model/opentracing/common.yaml index 3f906d18cf..001ba4042e 100644 --- a/model/trace/compatibility.yaml +++ b/model/opentracing/common.yaml @@ -1,6 +1,6 @@ groups: - id: opentracing - type: span + type: attribute_group brief: 'This document defines semantic conventions for the OpenTracing Shim' note: > These conventions are used by the OpenTracing Shim layer. diff --git a/model/registry/opentracing.yaml b/model/opentracing/registry.yaml similarity index 100% rename from model/registry/opentracing.yaml rename to model/opentracing/registry.yaml diff --git a/model/registry/os.yaml b/model/os/registry.yaml similarity index 100% rename from model/registry/os.yaml rename to model/os/registry.yaml diff --git a/model/resource/os.yaml b/model/os/resources.yaml similarity index 100% rename from model/resource/os.yaml rename to model/os/resources.yaml diff --git a/model/trace/exporter/exporter.yaml b/model/otel/common.yaml similarity index 91% rename from model/trace/exporter/exporter.yaml rename to model/otel/common.yaml index 0c4e8c6a8f..ddb8dd1e22 100644 --- a/model/trace/exporter/exporter.yaml +++ b/model/otel/common.yaml @@ -1,6 +1,6 @@ groups: - id: otel_span - type: span + type: attribute_group brief: Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts. attributes: - ref: otel.status_code diff --git a/model/registry/deprecated/otel.yaml b/model/otel/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/otel.yaml rename to model/otel/deprecated/registry-deprecated.yaml diff --git a/model/registry/otel.yaml b/model/otel/registry.yaml similarity index 100% rename from model/registry/otel.yaml rename to model/otel/registry.yaml diff --git a/model/scope/exporter/exporter.yaml b/model/otel/resources.yaml similarity index 100% rename from model/scope/exporter/exporter.yaml rename to model/otel/resources.yaml diff --git a/model/peer/common.yaml b/model/peer/common.yaml new file mode 100644 index 0000000000..53807af234 --- /dev/null +++ b/model/peer/common.yaml @@ -0,0 +1,7 @@ +groups: + - id: peer + type: attribute_group + brief: "Operations that access some remote service." + attributes: + - ref: peer.service + requirement_level: recommended diff --git a/model/registry/peer.yaml b/model/peer/registry.yaml similarity index 100% rename from model/registry/peer.yaml rename to model/peer/registry.yaml diff --git a/model/registry/deprecated/process.yaml b/model/process/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/process.yaml rename to model/process/deprecated/registry-deprecated.yaml diff --git a/model/metrics/process-metrics.yaml b/model/process/metrics.yaml similarity index 100% rename from model/metrics/process-metrics.yaml rename to model/process/metrics.yaml diff --git a/model/registry/process.yaml b/model/process/registry.yaml similarity index 100% rename from model/registry/process.yaml rename to model/process/registry.yaml diff --git a/model/resource/process.yaml b/model/process/resources.yaml similarity index 100% rename from model/resource/process.yaml rename to model/process/resources.yaml diff --git a/model/profiles/frame.yaml b/model/profile/common.yaml similarity index 100% rename from model/profiles/frame.yaml rename to model/profile/common.yaml diff --git a/model/registry/profile.yaml b/model/profile/registry.yaml similarity index 100% rename from model/registry/profile.yaml rename to model/profile/registry.yaml diff --git a/model/registry/deprecated/rpc.yaml b/model/rpc/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/rpc.yaml rename to model/rpc/deprecated/registry-deprecated.yaml diff --git a/model/metrics/rpc-metrics.yaml b/model/rpc/metrics.yaml similarity index 100% rename from model/metrics/rpc-metrics.yaml rename to model/rpc/metrics.yaml diff --git a/model/registry/rpc.yaml b/model/rpc/registry.yaml similarity index 100% rename from model/registry/rpc.yaml rename to model/rpc/registry.yaml diff --git a/model/trace/rpc.yaml b/model/rpc/spans.yaml similarity index 100% rename from model/trace/rpc.yaml rename to model/rpc/spans.yaml diff --git a/model/server/common.yaml b/model/server/common.yaml new file mode 100644 index 0000000000..08806f02b3 --- /dev/null +++ b/model/server/common.yaml @@ -0,0 +1,8 @@ +groups: + - id: server + type: attribute_group + brief: > + General server attributes. + attributes: + - ref: server.address + - ref: server.port diff --git a/model/registry/server.yaml b/model/server/registry.yaml similarity index 100% rename from model/registry/server.yaml rename to model/server/registry.yaml diff --git a/model/registry/service.yaml b/model/service/registry.yaml similarity index 100% rename from model/registry/service.yaml rename to model/service/registry.yaml diff --git a/model/resource/service_experimental.yaml b/model/service/resources-experimental.yaml similarity index 100% rename from model/resource/service_experimental.yaml rename to model/service/resources-experimental.yaml diff --git a/model/resource/service.yaml b/model/service/resources.yaml similarity index 100% rename from model/resource/service.yaml rename to model/service/resources.yaml diff --git a/model/session.yaml b/model/session/common.yaml similarity index 100% rename from model/session.yaml rename to model/session/common.yaml diff --git a/model/registry/session.yaml b/model/session/registry.yaml similarity index 100% rename from model/registry/session.yaml rename to model/session/registry.yaml diff --git a/model/metrics/dotnet/dotnet-signalr.yaml b/model/signalr/metrics.yaml similarity index 100% rename from model/metrics/dotnet/dotnet-signalr.yaml rename to model/signalr/metrics.yaml diff --git a/model/registry/signalr.yaml b/model/signalr/registry.yaml similarity index 100% rename from model/registry/signalr.yaml rename to model/signalr/registry.yaml diff --git a/model/source/common.yaml b/model/source/common.yaml new file mode 100644 index 0000000000..5644041e24 --- /dev/null +++ b/model/source/common.yaml @@ -0,0 +1,8 @@ +groups: + - id: source + type: attribute_group + brief: > + General source attributes. + attributes: + - ref: source.address + - ref: source.port diff --git a/model/registry/source.yaml b/model/source/registry.yaml similarity index 100% rename from model/registry/source.yaml rename to model/source/registry.yaml diff --git a/model/registry/deprecated/system.yaml b/model/system/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/system.yaml rename to model/system/deprecated/registry-deprecated.yaml diff --git a/model/metrics/system-metrics.yaml b/model/system/metrics.yaml similarity index 100% rename from model/metrics/system-metrics.yaml rename to model/system/metrics.yaml diff --git a/model/registry/system.yaml b/model/system/registry.yaml similarity index 100% rename from model/registry/system.yaml rename to model/system/registry.yaml diff --git a/model/registry/telemetry.yaml b/model/telemetry/registry.yaml similarity index 100% rename from model/registry/telemetry.yaml rename to model/telemetry/registry.yaml diff --git a/model/resource/telemetry_experimental.yaml b/model/telemetry/resources-experimental.yaml similarity index 100% rename from model/resource/telemetry_experimental.yaml rename to model/telemetry/resources-experimental.yaml diff --git a/model/resource/telemetry.yaml b/model/telemetry/resources.yaml similarity index 100% rename from model/resource/telemetry.yaml rename to model/telemetry/resources.yaml diff --git a/model/registry/test.yaml b/model/test/registry.yaml similarity index 100% rename from model/registry/test.yaml rename to model/test/registry.yaml diff --git a/model/thread/common.yaml b/model/thread/common.yaml new file mode 100644 index 0000000000..572fb26996 --- /dev/null +++ b/model/thread/common.yaml @@ -0,0 +1,8 @@ +groups: + - id: thread + type: attribute_group + brief: > + These attributes may be used for any operation to store information about a thread that started a span. + attributes: + - ref: thread.id + - ref: thread.name diff --git a/model/registry/thread.yaml b/model/thread/registry.yaml similarity index 100% rename from model/registry/thread.yaml rename to model/thread/registry.yaml diff --git a/model/registry/deprecated/tls.yaml b/model/tls/deprecated/registry-deprecated.yaml similarity index 100% rename from model/registry/deprecated/tls.yaml rename to model/tls/deprecated/registry-deprecated.yaml diff --git a/model/registry/tls.yaml b/model/tls/registry.yaml similarity index 100% rename from model/registry/tls.yaml rename to model/tls/registry.yaml diff --git a/model/url.yaml b/model/url/common.yaml similarity index 100% rename from model/url.yaml rename to model/url/common.yaml diff --git a/model/registry/url.yaml b/model/url/registry.yaml similarity index 100% rename from model/registry/url.yaml rename to model/url/registry.yaml diff --git a/model/registry/user-agent.yaml b/model/user-agent/registry.yaml similarity index 100% rename from model/registry/user-agent.yaml rename to model/user-agent/registry.yaml diff --git a/model/registry/user.yaml b/model/user/registry.yaml similarity index 100% rename from model/registry/user.yaml rename to model/user/registry.yaml diff --git a/model/metrics/v8js-metrics.yaml b/model/v8js/metrics.yaml similarity index 100% rename from model/metrics/v8js-metrics.yaml rename to model/v8js/metrics.yaml diff --git a/model/registry/v8js.yaml b/model/v8js/registry.yaml similarity index 100% rename from model/registry/v8js.yaml rename to model/v8js/registry.yaml diff --git a/model/registry/vcs.yaml b/model/vcs/registry.yaml similarity index 100% rename from model/registry/vcs.yaml rename to model/vcs/registry.yaml diff --git a/model/registry/webengine.yaml b/model/webengine/registry.yaml similarity index 100% rename from model/registry/webengine.yaml rename to model/webengine/registry.yaml diff --git a/model/resource/webengine.yaml b/model/webengine/resources.yaml similarity index 100% rename from model/resource/webengine.yaml rename to model/webengine/resources.yaml