From d182f9e66f48d854e8afcc74a0962bad89f9dd3c Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 1 Aug 2024 05:27:51 +0900 Subject: [PATCH 1/5] Add attribute name and const names checks (#1209) --- .github/workflows/checks.yml | 7 ++++ Makefile | 8 ++++ policies/attribute_name_collisions.rego | 56 +++++++++++++++++++++++++ policies/registry.rego | 33 ++++++++++++--- 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 policies/attribute_name_collisions.rego diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a889670d86..ceaf8ef7f6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -108,3 +108,10 @@ jobs: run: | make generate-gh-issue-templates git diff --exit-code '.github/ISSUE_TEMPLATE' || (echo 'Dropdowns in issue templates is out of date, please run "make generate-gh-issue-templates" and commit the changes in this PR. Please note, if you are running it on Mac OS X, please make sure to use GNU version of sed instead of default "sed".' && exit 1) + + policies-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: verify semantic conventions yaml definitions + run: make check-policies diff --git a/Makefile b/Makefile index 06e7b7d1b1..80772401b4 100644 --- a/Makefile +++ b/Makefile @@ -228,3 +228,11 @@ chlog-update: $(CHLOGGEN) .PHONY: generate-gh-issue-templates generate-gh-issue-templates: $(TOOLS_DIR)/scripts/update-issue-template-areas.sh + +.PHONY: check-policies +check-policies: + docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \ + otel/weaver:${WEAVER_VERSION} registry check \ + --registry=/source \ + --policy=/policies/registry.rego \ + --policy=/policies/attribute_name_collisions.rego diff --git a/policies/attribute_name_collisions.rego b/policies/attribute_name_collisions.rego new file mode 100644 index 0000000000..3d38dab177 --- /dev/null +++ b/policies/attribute_name_collisions.rego @@ -0,0 +1,56 @@ +package after_resolution + +deny[attr_registry_collision(description, name)] { + names := attr_names_except(excluded_const_collisions) + name := names[_] + const_name := to_const_name(name) + collisions:= { n | n := attr_names_except(excluded_const_collisions)[_]; n != name; to_const_name(n) == const_name } + count(collisions) > 0 + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + description := sprintf("Attribute '%s' has the same constant name '%s' as '%s'.", [name, const_name, collisions]) +} + +deny[attr_registry_collision(description, name)] { + names := attr_names_except(excluded_namespace_collisions) + name := names[_] + + collisions:= { n | n := input.groups[_].attributes[_].name; startswith(n, to_namespace_prefix(name)) } + count(collisions) > 0 + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + description := sprintf("Attribute '%s' name is used as a namespace in the following attributes '%s'.", [name, collisions]) +} + +attr_registry_collision(description, attr_name) = violation { + violation := { + "id": description, + "type": "semconv_attribute", + "category": "naming_collision", + "attr": attr_name, + "group": "", + } +} + +to_namespace_prefix(name) = namespace { + namespace := concat("", [name, "."]) +} + +to_const_name(name) = const_name { + const_name := replace(name, ".", "_") +} + +attr_names_except(excluded) = names { + names := { n | n := input.groups[_].attributes[_].name } - excluded +} + +# These lists contain exceptions for existing collisions that were introduced unintentionally. +# We'll have a way to specify how collision resolution happens in the schema - +# see phase 2 in https://github.com/open-telemetry/semantic-conventions/issues/1118#issuecomment-2173803006 +# For now we'll exclude existing collisions from the checks. +# ADDING NEW EXCEPTIONS IS NOT ALLOWED. + +# DO NOT ADD ATTRIBUTES TO THIS LIST +excluded_const_collisions := {"messaging.client_id"} +# DO NOT ADD ATTRIBUTES TO THIS LIST +excluded_namespace_collisions := {"messaging.operation", "db.operation", "deployment.environment"} diff --git a/policies/registry.rego b/policies/registry.rego index cc30c75f48..a1925c0887 100644 --- a/policies/registry.rego +++ b/policies/registry.rego @@ -5,10 +5,10 @@ package before_resolution # used by semantic conventions. # Helper to create attribute registry violations. -attr_registry_violation(violation_id, group_id, attr_id) = violation { +attr_registry_violation(description, group_id, attr_id) = violation { violation := { - "id": violation_id, - "type": "semantic_convention_policies", + "id": description, + "type": "semconv_attribute", "category": "attribute_registry_checks", "group": group_id, "attr": attr_id, @@ -16,27 +16,48 @@ attr_registry_violation(violation_id, group_id, attr_id) = violation { } # We only allow attribute groups in the attribute registry. -deny[attr_registry_violation("attribute_registry_can_only_contain_attribute_groups", group.id, "")] { +deny[attr_registry_violation(description, group.id, "")] { group := input.groups[_] startswith(group.id, "registry.") group.type != "attribute_group" + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + # violation_id := "attribute_registry_can_only_contain_attribute_groups" + description := sprintf("Registry group '%s' has invalid type '%s'. Groups in attribute registry must have `attribute_group` type.", [group.id, group.type]) } # Any group that is NOT in the attribute registry that has an attribute id is # in violation of not using the attribute registry. -deny[attr_registry_violation("attributes_must_be_defined_in_attribute_registry", group.id, attr.id)] { +deny[attr_registry_violation(description, group.id, attr.id)] { group := input.groups[_] not startswith(group.id, "registry.") attr := group.attributes[_] attr.id != null + + attr_name := get_attribute_name(attr, group) + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + # violation_id := "attributes_must_be_defined_in_attribute_registry" + description := sprintf("Attribute '%s' is defined in the group '%s' which is not part of the attribute registy. Attributes can be defined in the registry group only.", [attr_name, group.id]) } # A registry `attribute_group` containing at least one `ref` attribute is # considered invalid if it's not in the registry group. -deny[attr_registry_violation("attributes_in_registry_cannot_reference_each_other", group.id, attr.ref)] { +deny[attr_registry_violation(description, group.id, attr.ref)] { # TODO - this will need to be updated to support `embed` in the future. group := input.groups[_] startswith(group.id, "registry.") attr := group.attributes[_] attr.ref != null + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + # violation_id := "attributes_in_registry_cannot_reference_each_other" + description := sprintf("Registy group '%s' references attribute '%s'. Registry groups can only define new attributes.", [group.id, attr.ref]) +} + +get_attribute_name(attr, group) = name { + full_name = concat(".", [group.prefix, attr.id]) + + # if there was no prefix, we have a leading dot + name := trim(full_name, ".") } From 798e939837b70eb83e0662d071084a1440a09ee9 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Thu, 1 Aug 2024 06:08:37 +0100 Subject: [PATCH 2/5] Add Azure SDK attributes & Logs events (#1028) Co-authored-by: Liudmila Molkova --- .chloggen/add-azure-logs.yaml | 22 +++++ .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/change_proposal.yaml | 1 + .github/ISSUE_TEMPLATE/new-conventions.yaml | 1 + docs/attributes-registry/README.md | 1 + docs/attributes-registry/azure.md | 15 +++ docs/azure/README.md | 19 ++++ docs/azure/events.md | 57 +++++++++++ model/logs/azure.yaml | 102 ++++++++++++++++++++ model/registry/azure.yaml | 13 +++ 10 files changed, 232 insertions(+) create mode 100644 .chloggen/add-azure-logs.yaml create mode 100644 docs/attributes-registry/azure.md create mode 100644 docs/azure/README.md create mode 100644 docs/azure/events.md create mode 100644 model/logs/azure.yaml create mode 100644 model/registry/azure.yaml diff --git a/.chloggen/add-azure-logs.yaml b/.chloggen/add-azure-logs.yaml new file mode 100644 index 0000000000..2d14fa50a1 --- /dev/null +++ b/.chloggen/add-azure-logs.yaml @@ -0,0 +1,22 @@ +# 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: new_component + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: azure + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add Azure SDK attributes & Logs event semantic conventions + +# 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: [1027] + +# (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: diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 40af0a175b..450551ce21 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -23,6 +23,7 @@ body: - area:artifact - area:aspnetcore - area:aws + - area:azure - area:browser - area:cicd - area:client diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index cc7c77ee8b..e30d0a4630 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -16,6 +16,7 @@ body: - area:artifact - area:aspnetcore - area:aws + - area:azure - area:browser - area:cicd - area:client diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 5787556938..8301d9b1bc 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -25,6 +25,7 @@ body: - area:artifact - area:aspnetcore - area:aws + - area:azure - area:browser - area:cicd - area:client diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 49d5806716..003b21c5b4 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -35,6 +35,7 @@ Currently, the following namespaces exist: - [Artifact](artifact.md) - [Aspnetcore](aspnetcore.md) - [AWS](aws.md) +- [Azure](azure.md) - [Browser](browser.md) - [CICD](cicd.md) - [Client](client.md) diff --git a/docs/attributes-registry/azure.md b/docs/attributes-registry/azure.md new file mode 100644 index 0000000000..95dbf95a15 --- /dev/null +++ b/docs/attributes-registry/azure.md @@ -0,0 +1,15 @@ + + + + + +# Azure + +## Azure Sdk Attributes + +This document defines generic attributes for Azure SDK. + +| Attribute | Type | Description | Examples | Stability | +| ----------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------- | +| `az.service_request_id` | string | The unique identifier of the service request. It's generated by the Azure service and returned with the response. | `00000000-0000-0000-0000-000000000000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/azure/README.md b/docs/azure/README.md new file mode 100644 index 0000000000..3cfbc26ad0 --- /dev/null +++ b/docs/azure/README.md @@ -0,0 +1,19 @@ + + +# Semantic Convention for Azure Resource Logs + +**Status**: [Experimental][DocumentStatus] + +This document describes Azure Resource Logs, see [Azure Resource Log Top-level Schema][AzureResourceSchema]. + +Semantic conventions are defined for the following signals: + +* [Events](events.md) + +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status +[AzureResourceSchema]: https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema diff --git a/docs/azure/events.md b/docs/azure/events.md new file mode 100644 index 0000000000..495a596a67 --- /dev/null +++ b/docs/azure/events.md @@ -0,0 +1,57 @@ +# Semantic Conventions for Azure Resource Log events + +**Status**: [Experimental][DocumentStatus] + +This document defines semantic conventions for instrumentations that emit Azure +Resource Log events. + +## Azure Resource Log + +### Attributes + + + + + + + + +The event name MUST be `az.resource.log`. + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`az.service_request_id`](/docs/attributes-registry/azure.md) | string | The unique identifier of the service request. It's generated by the Azure service and returned with the response. | `00000000-0000-0000-0000-000000000000` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloud.resource_id`](/docs/attributes-registry/cloud.md) | string | The [Fully Qualified Azure Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for. | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`event.name`](/docs/attributes-registry/event.md) | string | Identifies the class / type of event. [1] | `browser.mouse.click`; `device.app.lifecycle` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. + + + + + + + + + +### Body Fields + + +| Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| `category` | string | The Azure category of the log entry. | `AuditEvent`, `GatewayLogs`, `ApplicationGatewayAccessLog` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `correlation.id` | string | The correlation ID of the log entry. | `607964b6-41a5-4e24-a5db-db7aab3b9b34` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `duration` | int | The duration of the operations in milliseconds. | `1000` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `identity` | string | A JSON blob that describes the identity of the user or application that performed the operation. | `someone` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `operation.name` | string | The name of the operation. | `SecretGet`, `Microsoft.ApiManagement/GatewayLogs`, `ApplicationGatewayAccess` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `operation.version` | string | The version of the operation. | `1.0` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `properties` | keyvaluelist | The properties provided in the Azure Resource Log. | {
  "statusCode": "Created",
  "serviceRequestId": "50d5cddb-8ca0-47ad-9b80-6cde2207f97c"
}
| `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `result.type` | string | The status associated with the logged event. | `Started`, `In Progress`, `Succeeded`, `Failed`, `Active`, `Resolved` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `result.signature` | string | The substatus of associated with the logged event. | `OK` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `result.description` | string | The description of the result. | `The operation was successful`, `The operation failed` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `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. + +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/model/logs/azure.yaml b/model/logs/azure.yaml new file mode 100644 index 0000000000..da061e5f31 --- /dev/null +++ b/model/logs/azure.yaml @@ -0,0 +1,102 @@ +groups: + - id: az.resource.log + stability: experimental + type: event + name: az.resource.log + brief: > + Describes Azure Resource Log event, see + [Azure Resource Log Top-level Schema](https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema) + for more details. + attributes: + - ref: az.service_request_id + - ref: cloud.resource_id + brief: The [Fully Qualified Azure Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for. + note: "" + - ref: event.name + # Future Note: When the build tools support this definition please uncomment and validate the details + # included here and what has been added to the manual markdown table + # body: + # fields: + # - id: category + # type: string + # stability: experimental + # brief: "The Azure category of the log entry." + # examples: + # - AuditEvent + # - GatewayLogs + # - ApplicationGatewayAccessLog + # - id: correlation.id + # type: string + # stability: experimental + # brief: "The correlation ID of the log entry." + # examples: + # - 607964b6-41a5-4e24-a5db-db7aab3b9b34 + # - id: duration + # type: int + # stability: experimental + # brief: "The duration of the operations in milliseconds." + # examples: + # - 1000 + # - id: identity + # type: string + # stability: experimental + # brief: > + # "A JSON blob that describes the identity of the user or application that performed the operation." + # note: > + # Typically, this field includes the authorization and claims or JWT token from Active Directory. + # > Warning: + # > this field contains sensitive (PII) information." + # requirement_level: opt-in + # examples: + # - "someone" + # - id: operation.name + # type: string + # stability: experimental + # brief: "The name of the operation." + # examples: + # - SecretGet + # - Microsoft.ApiManagement/GatewayLogs + # - ApplicationGatewayAccess + # - id: operation.version + # type: string + # stability: experimental + # brief: "The version of the operation." + # examples: + # - "1.0" + # - id: properties + # type: KeyValueList # note: this is not a supported type in the current build tools + # stability: experimental + # brief: "The properties provided in the Azure Resource Log." + # examples: {
  "statusCode": "Created",
  "serviceRequestId": "50d5cddb-8ca0-47ad-9b80-6cde2207f97c"
}
+ # - id: result.type + # type: string + # stability: experimental + # brief: "The status associated with the logged event." + # examples: + # - "Started" + # - "In Progress" + # - "Succeeded" + # - "Failed" + # - "Active" + # - "Resolved" + # - id: result.signature + # type: string + # stability: experimental + # brief: "The substatus of associated with the logged event. " + # examples: + # - "OK" + # - id: result.description + # type: string + # stability: experimental + # brief: "The description of the result." + # examples: + # - "The operation was successful" + # - "The operation failed" + # - id: tenant.id + # type: string + # stability: experimental + # brief: "The tenant ID of the Active Directory tenant that this event is tied to." + # requirement_level: + # conditionally_required: "if the event is tied to an Active Directory tenant." + # examples: + # - "00000000-0000-0000-0000-000000000000" diff --git a/model/registry/azure.yaml b/model/registry/azure.yaml new file mode 100644 index 0000000000..0ef9dc1dcc --- /dev/null +++ b/model/registry/azure.yaml @@ -0,0 +1,13 @@ +groups: + - id: registry.azure.sdk + prefix: az + type: attribute_group + brief: > + This document defines generic attributes for Azure SDK. + attributes: + - id: service_request_id + type: string + stability: experimental + brief: "The unique identifier of the service request. It's generated by the Azure service and returned with the response." + examples: + - "00000000-0000-0000-0000-000000000000" From 93cc98b634758dfe9dbcf3f8d5536dade67b0b23 Mon Sep 17 00:00:00 2001 From: jason plumb <75337021+breedx-splk@users.noreply.github.com> Date: Wed, 31 Jul 2024 22:13:21 -0700 Subject: [PATCH 3/5] Session start and end events (#1091) Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Co-authored-by: Liudmila Molkova --- .chloggen/session_start_end_event.yaml | 22 +++++++++++++++ docs/general/session.md | 39 +++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100755 .chloggen/session_start_end_event.yaml diff --git a/.chloggen/session_start_end_event.yaml b/.chloggen/session_start_end_event.yaml new file mode 100755 index 0000000000..1dd2bf020d --- /dev/null +++ b/.chloggen/session_start_end_event.yaml @@ -0,0 +1,22 @@ +# 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: 'session' + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add new experimental `session.start` and `session.end` events + +# 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: [1091] + +# (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: diff --git a/docs/general/session.md b/docs/general/session.md index 3c4d50209f..99ab4d63f5 100644 --- a/docs/general/session.md +++ b/docs/general/session.md @@ -13,7 +13,7 @@ the Logs, Events, and Spans generated during the Session's lifecycle. When a session reaches end of life, typically due to user inactivity or session timeout, a new session identifier will be assigned. The previous session identifier may be provided by the instrumentation so that telemetry -backends can link the two sessions. +backends can link the two sessions (see [Session Start Event](#session-start-event) below). ## Attributes @@ -35,4 +35,41 @@ backends can link the two sessions. +## Session Events + +### Session Start Event + +![Experimental](https://img.shields.io/badge/-experimental-blue) + +`event.name` MUST be`session.start` + +For instrumentation that tracks user behavior during user sessions, a `session.start` event MUST be emitted +every time a session is created. When a new session is created as a continuation of a prior session, +the `session.previous_id` SHOULD be included in the event. The values of `session.id` and `session.previous_id` +MUST be different. + +When the `session.start` event contains both `session.id` and `session.previous_id` fields, the event then implies +that the previous session has ended. If the session ID in `session.previous_id` has not yet ended via explicit +`session.end` event, then the consumer SHOULD treat this continuation event as semantically equivalent to +`session.end(session.previous_id)` and `session.start(session.id)`. + +| Body field | Type | Description | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---------------------------------------------------------------|--------|------------------------------------------------------|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------| +| [`session.id`](/docs/attributes-registry/session.md) | string | The ID of the new session being started. | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`session.previous_id`](/docs/attributes-registry/session.md) | string | The previous `session.id` for this user, when known. | `Conditionally Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +### Session End Event + +![Experimental](https://img.shields.io/badge/-experimental-blue) + +`event.name` MUST be `session.end` + +For instrumentation that tracks user behavior during user sessions, a `session.end` event SHOULD be emitted +every time a session ends. When a session ends and continues as a new session, this event SHOULD be +emitted prior to the `session.start` event. + +| Body field | Type | Description | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---------------------------------------------------------------|--------|----------------------------------------|--------------------------|------------------------------------------------------------------| +| [`session.id`](/docs/attributes-registry/session.md) | string | The ID of the new session being ended. | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status From 69b07449d4232eec1461b15fb684213eea545b38 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 1 Aug 2024 14:15:19 +0900 Subject: [PATCH 4/5] Update docs to use weaver for code generation (#1296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Co-authored-by: Laurent Quérel --- .chloggen/1296.yaml | 4 + .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + docs/non-normative/code-generation.md | 193 +++++++++++++++++++++++++ docs/non-normative/libraries.md | 123 ---------------- 4 files changed, 198 insertions(+), 123 deletions(-) create mode 100644 .chloggen/1296.yaml create mode 100644 docs/non-normative/code-generation.md delete mode 100644 docs/non-normative/libraries.md diff --git a/.chloggen/1296.yaml b/.chloggen/1296.yaml new file mode 100644 index 0000000000..8a1347f20a --- /dev/null +++ b/.chloggen/1296.yaml @@ -0,0 +1,4 @@ +change_type: enhancement +component: docs +note: Update semantic conventions code generation documentation to use weaver instead of build-tools. +issues: [ 1296 ] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 450551ce21..b09b4102e4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -16,6 +16,7 @@ body: multiple: true options: - area:other + - area:docs # NOTE: The list below is autogenerated using `make generate-gh-issue-templates` # DO NOT manually edit it. # Start semconv area list diff --git a/docs/non-normative/code-generation.md b/docs/non-normative/code-generation.md new file mode 100644 index 0000000000..e8e22d8848 --- /dev/null +++ b/docs/non-normative/code-generation.md @@ -0,0 +1,193 @@ + + +# Generating Semantic Convention libraries + + + +- [Stability and Versioning](#stability-and-versioning) + - [Deprecated Conventions](#deprecated-conventions) +- [Semantic Conventions Artifact Structure](#semantic-conventions-artifact-structure) +- [Generating semantic conventions](#generating-semantic-conventions) + - [Migrating from build-tools](#migrating-from-build-tools) + - [Weaver config](#weaver-config) + - [Jinja templates](#jinja-templates) + + + +The code for OpenTelemetry Semantic Conventions defined in this repository can be auto-generated. + +OpenTelemetry Language SIGs can generate Semantic Conventions code in the form that's idiomatic for +their language and may (or may not) ship it as a stand-alone library. + +This document outlines common patterns and provides non-normative guidance on how to structure semantic conventions artifacts +and generate the code. + +## Stability and Versioning + +Semantic Conventions contain a mix of stability levels. +Language SIGs that ship semantic conventions library may decide to ship a stable artifact with stable part of the Semantic Conventions, a preview artifact with all Semantic Conventions, or other combination that's idiomatic for this language and provides [SemVer 2.0](https://semver.org/) stability guarantees. + +Possible solutions include: + +- Generate all Semantic Conventions for a given version in specific folder while keeping old versions intact. It is used by [opentelemetry-go](https://github.com/open-telemetry/opentelemetry-go/tree/main/semconv/) but could be problematic if the artifact size is a concern. +- Follow language-specific conventions to annotate experimental parts. For example, Semantic Conventions in Python puts experimental attributes in `opentelemetry.semconv._incubating` import path which is considered (following Python underscore convention) to be internal and subject to change. +- Ship two different artifacts: one that contains stable Semantic Conventions and another one with all available conventions. For example, [semantic-conventions in Java](https://github.com/open-telemetry/semantic-conventions-java) are shipped in two artifacts: `opentelemetry-semconv` and `opentelemetry-semconv-incubating`. + +> Note: +> Shipping two versions of the same artifact (stable and preview) could be problematic due to diamond-dependency problems. +> For example, if user application depends on the `semconv v1.0.0-preview` and some library brings transitive dependency on `semconv v1.1.0` that does not contain +> experimental conventions, the latter would be resolved leading to compilation or runtime issues in the application. + +Instrumentation libraries should depend on the stable (part of) semantic convention artifact or copy relevant definitions into their own code base. +Experimental semantic conventions are intended for end-user applications. + +### Deprecated Conventions + +It's recommended to generate code for deprecated attributes, metrics, and other conventions. Use appropriate annotations to mark them as deprecated. +Conventions have a `stability` property which provide the stability level at the deprecation time (`experimental` or `stable`) and +the `deprecated` property that describes deprecation reason which can be used to generate documentation. + +- Deprecated conventions that reached stability should not be removed without major version update according to SemVer. +- Conventions that were deprecated while being experimental should still be generated and kept in the preview (part of) semantic conventions artifact. It minimizes runtime issues + and breaking changes in user applications. + +Keep stable convention definitions inside the preview (part of) semantic conversions artifact. It prevents user code from breaking when semantic convention stabilizes. Deprecate stable definitions inside the preview artifact and point users to the stable location in generated documentation. +For example, in Java, the attribute `http.request.method` is defined as deprecated in both stable and preview artifacts (e.g., `io.opentelemetry.semconv.incubating.HttpIncubatingAttributes.HTTP_REQUEST_METHOD`, `io.opentelemetry.semconv.HttpAttributes.HTTP_REQUEST_METHOD`). + +## Semantic Conventions Artifact Structure + +This section contains suggestions on how to structure semantic convention artifact(s). + +- Artifact name: + - `opentelemetry-semconv` - stable conventions + - `opentelemetry-semconv-incubating` - (if applicable) the preview artifact containing all (stable and experimental) conventions +- Namespace: `opentelemetry.semconv` and `opentelemetry.semconv.incubating` +- All supported Schema URLs should be listed to allow different instrumentations in the same application to provide the exact version of conventions they follow. +- Attributes, metrics, and other convention definitions should be grouped by the convention type and the root namespace. See the example below: + +``` +├── SchemaUrls.code +├── attributes +│ ├── ClientAttributes.code +│ ├── HttpAttributes.code +│ └── ... +├── metrics +│ ├── HttpMetrics.code +│ └── ... +└── events + └── ... +``` + +## Generating semantic conventions + +This section describes how to do code-generation with weaver. + +> [!IMPORTANT] +> We're transitioning from [build-tools](https://github.com/open-telemetry/build-tools/blob/main/semantic-conventions/README.md#code-generator) +> to [opentelemetry-weaver](https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md) to generate code for semantic conventions. +> All new code-generation should be done using weaver, build-tools may become incompatible with future version of semantic conventions. + +Code-generation is based on YAML definitions in the specific version of semantic conventions. +Usually, it involves several steps where some can be semi-automated: +involves several steps which could be semi-automated: + +1. Manually update the Semantic Conventions version in config +2. Add the new Schema URL to the list of supported versions + - If it's not automated, then it can, at least, be automatically checked. +3. Check out (or download) the new version of Semantic Conventions +4. Run code-generation script (see below for the details) +5. Fix lint violations in the auto-generated code (if any) +6. Send the PR with new code to the corresponding repository + +Here are examples of how steps 2-5 are implemented for [Python](https://github.com/open-telemetry/opentelemetry-python/pull/4091) and [Erlang](https://github.com/open-telemetry/opentelemetry-erlang/pull/733). + +Step 4 (running code generation) depends on language-specific customizations. It's also the only step that's affected by tooling migration. + +Check out [weaver code-generation documentation for more details](https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md) + +### Migrating from build-tools + +Migration from build-tools involves changing Jinja templates and adding a [weaver config file](https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md#configuration-file---weaveryaml). + +#### Weaver config + +Here's a simplified example of this file that generates all attributes. + +```yaml +params: + excluded_namespaces: [ios, aspnetcore, signalr, android, dotnet, jvm, kestrel] + +templates: + - pattern: semantic_attributes.j2 + filter: > + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces + }) + | map({ + root_namespace: .root_namespace, + attributes: .attributes, + output: $output + "attributes/" + }) + application_mode: each +``` + +You can configure language-specific parameters in the `params` section of the config or pass them with `-DparamName=value` arguments when +running weaver command from the code generation script (similarly to build-tools). + +Weaver is able to run code-generation for multiple templates (defined in the corresponding section) at once. + +Before executing Jinja, weaver allows to filter or process semantic convention definitions in the `filter` section for each template. +In this example, it uses `semconv_grouped_attributes` filter - a helper method that groups attribute definitions by root namespace and excludes +attributes not relevant to this language. You can write alternative or additional filters and massage semantic conventions data using [JQ](https://jqlang.github.io/jq/manual/). + +In certain cases, calling `semconv_grouped_attributes` with namespace exclusion and stability filters may be enough and post-processing is not necessary. + +The `application_mode: each` configures weaver to run code generation for each semantic convention group and, as a consequence, +generate code for each group in a different file. The application mode `single` is also supported to apply the template to all groups at once. + +See +[weaver code-generation docs](https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md) +for the details on the config, data schema, JQ filters, and more. + +#### Jinja templates + +Jinja templates need to be changed to leverage (better) data structure and helper methods. +The first key difference is that each jinja template can define how to name the corresponding file(s). If you +don't specify the name of the output file via the method `set_file_name`, Weaver will use the relative path +and the name of the template itself to determine the output file. + +E.g. here's an example that uses root namespace in a subfolder provided in the `output` parameter. + +```jinja +{% set file_name = ctx.output + (ctx.root_namespace | snake_case ) ~ "_attributes.py" -%} +{{- template.set_file_name(file_name) -}} +``` + +Notable changes on data structure: + +- `attributes_and_templates` -> `ctx.attributes` +- `enum_attributes` -> `ctx.attributes | select("enum")` +- `metrics` -> `ctx.metrics` +- `root_namespace` -> `ctx.root_namespace` (only available if using `semconv_grouped_attributes` or similar filter)' +- all custom parameters are provided as properties under `ctx` variable. +- `attribute.fqn` -> `attribute.name` +- `attribute.type | instantiated_type` (gets underlying type of enum values) +- `attribute.attr_type.members` -> `attribute.type.members` (gets members of enum type) +- `member.member_id` -> `member.id` (gets id of the enum member) + +Notable changes on helper methods: + +- `attr.fqn | to_const_name` -> `attr.name | screaming_snake_case` +- `attr.fqn | to_camelcase(True)` -> `attr.name | pascal_case` +- `attr.brief | to_doc_brief | indent` -> `attr.brief | comment_with_prefix(" ")` (prefix is used to indent) +- stability/deprecation checks: + - `attribute is stable` if checking one attribute, `attributes | select("stable")` to filter stable attributes + - `attribute is experimental` if checking one attribute, `attributes | select("experimental")` to filter experimental attributes + - `attribute is deprecated` if checking one attribute, `attributes | select("deprecated")` to filter deprecated attributes +- check if attribute is a template: `attribute.type is template_type` +- `print_member_value` - no replacement at this time, use something like `{%- if type == "string" -%}"{{value}}"{%-else-%}{{value}}{%-endif-%}` +- new way to simplify switch-like logic: `key | map_text("map_name")`. Maps can be defined in the weaver config. + It can be very useful to convert semantic convention attribute types to language-specific types. diff --git a/docs/non-normative/libraries.md b/docs/non-normative/libraries.md deleted file mode 100644 index 320627ed3e..0000000000 --- a/docs/non-normative/libraries.md +++ /dev/null @@ -1,123 +0,0 @@ - - -# Semantic convention libraries - - - -- [Stability and Versioning](#stability-and-versioning) - - [Deprecated Conventions](#deprecated-conventions) -- [Semantic Conventions Artifact Structure](#semantic-conventions-artifact-structure) -- [Generating semantic conventions](#generating-semantic-conventions) - - - -The code for OpenTelemetry Semantic Conventions defined in this repository can be auto-generated. - -OpenTelemetry Language SIGs can generate Semantic Conventions code in the form that's idiomatic for -their language and may (or may not) ship it as a stand-alone library. - -This document outlines common patterns and provides non-normative guidance on how to structure semantic conventions artifact -and generate the code. - -## Stability and Versioning - -Semantic Conventions contain a mix of stability levels. -Language SIGs that ship semantic conventions library may decide to ship a stable artifact with stable part of the Semantic Conventions, a preview artifact with all Semantic Conventions, or other combination that's idiomatic for this language and provides [SemVer 2.0](https://semver.org/) stability guarantees. - -Possible solutions include: - -- Generate all Semantic Conventions for a given version in specific folder while keeping old versions intact. It is used by [opentelemetry-go](https://github.com/open-telemetry/opentelemetry-go/tree/main/semconv/) but could be problematic if the artifact size is a concern. -- Follow language-specific conventions to annotate experimental parts. For example, Semantic Conventions in Python puts experimental attributes in `opentelemetry.semconv._incubating` import path which is considered (following Python underscore convention) to be internal and subject to change. -- Ship two different artifacts: one that contains stable Semantic Conventions and another one with all available conventions. For example, [semantic-conventions in Java](https://github.com/open-telemetry/semantic-conventions-java) are shipped in two artifacts: `opentelemetry-semconv` and `opentelemetry-semconv-incubating`. - -> Note: -> Shipping two versions of the same artifact (stable and preview) could be problematic due to diamond-dependency problems. -> For example, if user application depends on the `semconv v1.0.0-preview` and some library brings transitive dependency on `semconv v1.1.0` that does not contain -> experimental conventions, the latter would be resolved leading to compilation or runtime issues in the application. - -Instrumentation libraries should depend on the stable (part of) semantic convention artifact or copy relevant definitions into their own code base. -Experimental semantic conventions are intended for end-user applications. - -### Deprecated Conventions - -It's recommended to generate code for deprecated attributes, metrics, and other conventions. Use appropriate annotations to mark them as deprecated. -Conventions have a `stability` property which provide the stability level at the deprecation time (`experimental` or `stable`) and -the `deprecated` property that describes deprecation reason which can be used to generate documentation. - -- Deprecated conventions that reached stability should not be removed without major version update according to SemVer. -- Conventions that were deprecated while being experimental should still be generated and kept in the preview (part of) semantic conventions artifact. It minimizes runtime issues - and breaking changes in user applications. - -Keep stable convention definitions inside the preview (part of) semantic conversions artifact. It prevents user code from breaking when semantic convention stabilizes. Deprecate stable definitions inside the preview artifact and point users to the stable location in generated documentation. -For example, in Java `http.request.method` attribute is defined as the deprecated `io.opentelemetry.semconv.incubating.HttpIncubatingAttributes.HTTP_REQUEST_METHOD` field and also as stable `io.opentelemetry.semconv.HttpAttributes.HTTP_REQUEST_METHOD`. - -## Semantic Conventions Artifact Structure - -This section contains suggestions on structuring semantic convention artifact(s) which should be adjusted to the specific language. - -- Artifact name: - - `opentelemetry-semconv` - stable conventions - - `opentelemetry-semconv-incubating` - (if applicable) the preview artifact containing all conventions -- Namespace: `opentelemetry.semconv` and `opentelemetry.semconv.incubating` -- All supported Schema URLs should be listed to allow different instrumentations in the same application to provide the exact version of conventions they follow. -- Attributes, metrics, and other convention definitions should be grouped by the convention type and the root namespace. See the example below: - -``` -├── SchemaUrls.code -├── attributes -│ ├── ClientAttributes.code -│ ├── HttpAttributes.code -│ └── ... -├── metrics -│ ├── HttpMetrics.code -│ └── ... -└── events - └── ... -``` - -## Generating semantic conventions - -> Note: -> The tooling used for code generation may change to [opentelemetry-weaver](https://github.com/open-telemetry/weaver), -> without any breaking changes in the generated code and with minimal changes to generation process and templates. - -The generation is done using [build-tools code generator](https://github.com/open-telemetry/build-tools/blob/main/semantic-conventions/README.md#code-generator). -It's based on YAML definitions of the semantic conventions and uses [Jinja templates](https://palletsprojects.com/p/jinja/). - -For example, this Jinja template can be used to generate Python constant for an attribute name along with the docstring. - -```jinja -{{attribute.fqn | to_const_name}} = "{{attribute.fqn}}" -""" -{{attribute.brief | to_doc_brief}}. -{%- if attribute.note %} -Note: {{attribute.note | to_doc_brief | indent}}. -{%- endif %} -""" -``` - -It generates the following code: - -```python -SERVER_ADDRESS = "server.address" -""" -Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. -""" -``` - -Language SIGs are expected to create Jinja templates specific to their language. -Code-generation usually involves several steps which could be semi-automated: - -1. Manually update the Semantic Conventions version when necessary -2. Add the new Schema URL to the list of supported versions - - If it's not automated, then it can, at least, be automatically checked. -3. Check out (or download) this version of Semantic Conventions -4. Run code-generation script for each template -5. Fix lint violations in the auto-generated code (if any) -6. Send the PR with new code to the corresponding repository - -Here are examples of how steps 2-5 are implemented for [Java](https://github.com/open-telemetry/semantic-conventions-java/blob/7da24068eea69dff11a78d59750b115dc4c5854d/build.gradle.kts#L55-L137) and [Python](https://github.com/open-telemetry/opentelemetry-python/blob/397e357dfad3e6ff42c09c74d5945dfdcad24bdd/scripts/semconv/generate.sh). From a3cf57fcc3ffda6dd5a9d168e0dbd0d618dac25a Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 2 Aug 2024 00:47:32 +0900 Subject: [PATCH 5/5] Remove prefix in yaml, add policy check to block future usages (and minor cleanups) (#1293) Co-authored-by: Alexandra Konrad --- Makefile | 3 +- docs/attributes-registry/gcp.md | 8 -- model/faas-common.yaml | 1 - model/general.yaml | 1 - model/logs/log-exception.yaml | 1 - model/logs/mobile-events.yaml | 2 - model/messaging-common.yaml | 1 - model/metrics/go-metrics.yaml | 1 - model/metrics/jvm-metrics-experimental.yaml | 1 - model/metrics/jvm-metrics.yaml | 2 - model/metrics/process-metrics.yaml | 1 - model/metrics/v8js-metrics.yaml | 2 - model/network.yaml | 2 - model/registry/android.yaml | 3 +- model/registry/artifact.yaml | 15 ++-- model/registry/aspnetcore.yaml | 17 ++-- model/registry/aws.yaml | 92 ++++++++++----------- model/registry/browser.yaml | 9 +- model/registry/cicd.yaml | 13 ++- model/registry/client.yaml | 5 +- model/registry/cloud.yaml | 15 ++-- model/registry/cloudevents.yaml | 11 ++- model/registry/code.yaml | 13 ++- model/registry/container.yaml | 23 +++--- model/registry/cpu.yaml | 4 +- model/registry/db.yaml | 56 ++++++------- model/registry/deployment.yaml | 9 +- model/registry/deprecated/android.yaml | 4 +- model/registry/deprecated/container.yaml | 1 - model/registry/deprecated/db.yaml | 31 ++++--- model/registry/deprecated/deployment.yaml | 3 +- model/registry/deprecated/enduser.yaml | 7 +- model/registry/deprecated/http.yaml | 30 ++++--- model/registry/deprecated/ios.yaml | 4 +- model/registry/deprecated/network.yaml | 33 ++++---- model/registry/deprecated/otel.yaml | 9 +- model/registry/deprecated/process.yaml | 1 - model/registry/deprecated/system.yaml | 2 - model/registry/destination.yaml | 5 +- model/registry/device.yaml | 9 +- model/registry/disk.yaml | 4 +- model/registry/dns.yaml | 3 +- model/registry/error.yaml | 4 +- model/registry/event.yaml | 3 +- model/registry/exception.yaml | 9 +- model/registry/faas.yaml | 36 ++++---- model/registry/feature-flag.yaml | 7 +- model/registry/file.yaml | 11 ++- model/registry/gcp.yaml | 18 ++-- model/registry/gen-ai.yaml | 38 ++++----- model/registry/go.yaml | 4 +- model/registry/graphql.yaml | 8 +- model/registry/heroku.yaml | 7 +- model/registry/host.yaml | 32 ++++--- model/registry/http.yaml | 27 +++--- model/registry/jvm.yaml | 17 ++-- model/registry/k8s.yaml | 49 ++++++----- model/registry/linux.yaml | 3 +- model/registry/log.yaml | 18 ++-- model/registry/messaging.yaml | 86 +++++++++---------- model/registry/network.yaml | 36 ++++---- model/registry/oci.yaml | 3 +- model/registry/opentracing.yaml | 4 +- model/registry/os.yaml | 12 ++- model/registry/otel.yaml | 11 +-- model/registry/peer.yaml | 3 +- model/registry/process.yaml | 55 ++++++------ model/registry/rpc.yaml | 36 ++++---- model/registry/server.yaml | 5 +- model/registry/service.yaml | 9 +- model/registry/session.yaml | 5 +- model/registry/signalr.yaml | 6 +- model/registry/source.yaml | 5 +- model/registry/system.yaml | 39 +++------ model/registry/telemetry.yaml | 12 ++- model/registry/test.yaml | 9 +- model/registry/thread.yaml | 5 +- model/registry/tls.yaml | 58 +++++++------ model/registry/url.yaml | 27 +++--- model/registry/user-agent.yaml | 7 +- model/registry/user.yaml | 13 ++- model/registry/v8js.yaml | 5 +- model/registry/vcs.yaml | 13 ++- model/registry/webengine.yaml | 7 +- model/resource/android.yaml | 1 - model/resource/browser.yaml | 1 - model/resource/cloud.yaml | 1 - model/resource/container.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 | 1 - model/resource/service_experimental.yaml | 1 - model/session.yaml | 1 - model/trace/database.yaml | 1 - model/trace/faas.yaml | 5 -- model/trace/instrumentation/aws-sdk.yml | 1 - model/trace/instrumentation/gcp-client.yml | 1 - model/trace/rpc.yaml | 4 +- model/trace/trace-exception.yaml | 2 +- model/url.yaml | 1 - policies/yaml_schema.rego | 21 +++++ templates/registry/markdown/event_macros.j2 | 2 +- 106 files changed, 542 insertions(+), 740 deletions(-) create mode 100644 policies/yaml_schema.rego diff --git a/Makefile b/Makefile index 80772401b4..a424f222f6 100644 --- a/Makefile +++ b/Makefile @@ -235,4 +235,5 @@ check-policies: otel/weaver:${WEAVER_VERSION} registry check \ --registry=/source \ --policy=/policies/registry.rego \ - --policy=/policies/attribute_name_collisions.rego + --policy=/policies/attribute_name_collisions.rego \ + --policy=/policies/yaml_schema.rego diff --git a/docs/attributes-registry/gcp.md b/docs/attributes-registry/gcp.md index 04f6f981bf..d19a0fc8e2 100644 --- a/docs/attributes-registry/gcp.md +++ b/docs/attributes-registry/gcp.md @@ -6,18 +6,10 @@ # GCP -- [GCP Attributes](#gcp-attributes) - [GCP Client Attributes](#gcp-client-attributes) - [GCP - Google Cloud Run Attributes](#gcp---google-cloud-run-attributes) - [GCP - Google Compute Engine (GCE) Attributes](#gcp---google-compute-engine-gce-attributes) -## GCP Attributes - -Attributes for Google Cloud - -| Attribute | Type | Description | Examples | Stability | -| --------- | ---- | ----------- | -------- | --------- | - ## GCP Client Attributes Attributes for Google Cloud client libraries. diff --git a/model/faas-common.yaml b/model/faas-common.yaml index 9d951485b2..94e60f2b96 100644 --- a/model/faas-common.yaml +++ b/model/faas-common.yaml @@ -2,7 +2,6 @@ groups: - id: attributes.faas.common type: attribute_group brief: "Describes FaaS attributes." - prefix: faas attributes: - ref: faas.trigger - ref: faas.invoked_name diff --git a/model/general.yaml b/model/general.yaml index 26df3efc1a..85377316e1 100644 --- a/model/general.yaml +++ b/model/general.yaml @@ -28,7 +28,6 @@ groups: - ref: destination.address - ref: destination.port - id: peer - prefix: peer type: span brief: "Operations that access some remote service." attributes: diff --git a/model/logs/log-exception.yaml b/model/logs/log-exception.yaml index ab20cb7250..c8b664c0bf 100644 --- a/model/logs/log-exception.yaml +++ b/model/logs/log-exception.yaml @@ -1,7 +1,6 @@ groups: - id: log-exception type: attribute_group - prefix: exception brief: > This document defines attributes for exceptions represented using Log Records. diff --git a/model/logs/mobile-events.yaml b/model/logs/mobile-events.yaml index 4b1d956b21..dbf3abceeb 100644 --- a/model/logs/mobile-events.yaml +++ b/model/logs/mobile-events.yaml @@ -23,7 +23,6 @@ groups: # brief: > # This attribute represents the state the application has transitioned into at the occurrence of the event. # type: - # allow_custom_values: false # members: # - id: active # value: 'active' @@ -57,7 +56,6 @@ groups: # The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), # and from which the `OS identifiers` are derived. # type: - # allow_custom_values: false # members: # - id: created # value: 'created' diff --git a/model/messaging-common.yaml b/model/messaging-common.yaml index ab020e5fe6..e7ca9af636 100644 --- a/model/messaging-common.yaml +++ b/model/messaging-common.yaml @@ -2,7 +2,6 @@ groups: - id: attributes.messaging.common.minimal type: attribute_group brief: "Common cross-signal messaging attributes." - prefix: messaging attributes: # TODO: Not adding `messaging.system` to the minimal because of https://github.com/open-telemetry/build-tools/issues/192 - ref: error.type diff --git a/model/metrics/go-metrics.yaml b/model/metrics/go-metrics.yaml index 8b7c14c79a..f52a12b4c8 100644 --- a/model/metrics/go-metrics.yaml +++ b/model/metrics/go-metrics.yaml @@ -6,7 +6,6 @@ groups: note: > Computed from `(/memory/classes/total:bytes - /memory/classes/heap/released:bytes)`. instrument: updowncounter - prefix: go.memory unit: "By" attributes: - ref: go.memory.type diff --git a/model/metrics/jvm-metrics-experimental.yaml b/model/metrics/jvm-metrics-experimental.yaml index 33b7a89c4b..80e3a99041 100644 --- a/model/metrics/jvm-metrics-experimental.yaml +++ b/model/metrics/jvm-metrics-experimental.yaml @@ -37,7 +37,6 @@ groups: - id: attributes.jvm.buffer type: attribute_group brief: "Describes JVM buffer metric attributes." - prefix: jvm.buffer attributes: - ref: jvm.buffer.pool.name requirement_level: recommended diff --git a/model/metrics/jvm-metrics.yaml b/model/metrics/jvm-metrics.yaml index b0e4224086..1930e83659 100644 --- a/model/metrics/jvm-metrics.yaml +++ b/model/metrics/jvm-metrics.yaml @@ -2,7 +2,6 @@ groups: - id: attributes.jvm.memory type: attribute_group brief: "Describes JVM memory metric attributes." - prefix: jvm.memory attributes: - ref: jvm.memory.type requirement_level: recommended @@ -52,7 +51,6 @@ groups: brief: "Duration of JVM garbage collection actions." instrument: histogram unit: "s" - prefix: jvm.gc attributes: - ref: jvm.gc.name requirement_level: recommended diff --git a/model/metrics/process-metrics.yaml b/model/metrics/process-metrics.yaml index 86d224d543..9b174de0e0 100644 --- a/model/metrics/process-metrics.yaml +++ b/model/metrics/process-metrics.yaml @@ -51,7 +51,6 @@ groups: type: metric metric_name: process.disk.io stability: experimental - prefix: process.disk brief: "Disk bytes transferred." instrument: counter unit: "By" diff --git a/model/metrics/v8js-metrics.yaml b/model/metrics/v8js-metrics.yaml index be0a43b09a..67e67ae282 100644 --- a/model/metrics/v8js-metrics.yaml +++ b/model/metrics/v8js-metrics.yaml @@ -6,7 +6,6 @@ groups: instrument: histogram unit: "s" stability: experimental - prefix: v8js.gc attributes: - ref: v8js.gc.type requirement_level: required @@ -61,7 +60,6 @@ groups: instrument: updowncounter unit: "By" stability: experimental - prefix: v8js.heap.space.physical_size attributes: - ref: v8js.heap.space.name requirement_level: required diff --git a/model/network.yaml b/model/network.yaml index 7e1ee396f6..d346131cf3 100644 --- a/model/network.yaml +++ b/model/network.yaml @@ -1,6 +1,5 @@ groups: - id: network-core - prefix: network type: attribute_group brief: > These attributes may be used for any network related operation. @@ -15,7 +14,6 @@ groups: - ref: network.local.port - id: network-connection-and-carrier - prefix: network type: attribute_group brief: > These attributes may be used for any network related operation. diff --git a/model/registry/android.yaml b/model/registry/android.yaml index c9c23e46ae..b55ef0fd12 100644 --- a/model/registry/android.yaml +++ b/model/registry/android.yaml @@ -1,12 +1,11 @@ groups: - id: registry.android - prefix: android type: attribute_group display_name: Android Attributes brief: > The Android platform on which the Android application is running. attributes: - - id: os.api_level + - id: android.os.api_level type: string stability: experimental brief: > diff --git a/model/registry/artifact.yaml b/model/registry/artifact.yaml index 9bed81bbb1..11cb388eb6 100644 --- a/model/registry/artifact.yaml +++ b/model/registry/artifact.yaml @@ -1,6 +1,5 @@ groups: - id: registry.artifact - prefix: artifact type: attribute_group brief: > This group describes attributes specific to artifacts. Artifacts are @@ -9,7 +8,7 @@ groups: [SLSA](https://slsa.dev/spec/v1.0/terminology#package-model) package model. attributes: - - id: filename + - id: artifact.filename type: string stability: experimental brief: > @@ -28,13 +27,13 @@ groups: "release-1.tar.gz", "file-name-package.tar.gz", ] - - id: version + - id: artifact.version type: string stability: experimental brief: > The version of the artifact. examples: ["v0.1.0", "1.2.1", "122691-build"] - - id: purl + - id: artifact.purl type: string stability: experimental brief: > @@ -46,7 +45,7 @@ groups: "pkg:github/package-url/purl-spec@1209109710924", "pkg:npm/foo@12.12.3", ] - - id: hash + - id: artifact.hash type: string stability: experimental brief: > @@ -64,13 +63,13 @@ groups: deem necessary. examples: ["9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9"] - - id: attestation.id + - id: artifact.attestation.id type: string stability: experimental brief: > The id of the build [software attestation](https://slsa.dev/attestation-model). examples: ["123"] - - id: attestation.filename + - id: artifact.attestation.filename type: string stability: experimental brief: > @@ -86,7 +85,7 @@ groups: "release-1.tar.gz.attestation", "file-name-package.tar.gz.intoto.json1", ] - - id: attestation.hash + - id: artifact.attestation.hash type: string stability: experimental brief: > diff --git a/model/registry/aspnetcore.yaml b/model/registry/aspnetcore.yaml index c5e36497e1..16a28a5535 100644 --- a/model/registry/aspnetcore.yaml +++ b/model/registry/aspnetcore.yaml @@ -1,18 +1,16 @@ groups: - id: registry.aspnetcore - prefix: aspnetcore type: attribute_group display_name: ASP.NET Core Attributes brief: ASP.NET Core attributes attributes: - - id: rate_limiting.policy + - id: aspnetcore.rate_limiting.policy type: string brief: Rate limiting policy name. stability: stable examples: ["fixed", "sliding", "token"] - - id: rate_limiting.result + - id: aspnetcore.rate_limiting.result type: - allow_custom_values: true members: - id: acquired value: 'acquired' @@ -34,12 +32,12 @@ groups: brief: Rate-limiting result, shows whether the lease was acquired or contains a rejection reason examples: ["acquired", "request_canceled"] requirement_level: required - - id: routing.is_fallback + - id: aspnetcore.routing.is_fallback type: boolean stability: stable brief: A value that indicates whether the matched route is a fallback route. examples: [true] - - id: diagnostics.handler.type + - id: aspnetcore.diagnostics.handler.type type: string stability: stable brief: Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) @@ -47,14 +45,13 @@ groups: examples: ["Contoso.MyHandler"] requirement_level: conditionally_required: if and only if the exception was handled by this handler. - - id: request.is_unhandled + - id: aspnetcore.request.is_unhandled type: boolean stability: stable brief: Flag indicating if request was handled by the application pipeline. examples: [true] - - id: routing.match_status + - id: aspnetcore.routing.match_status type: - allow_custom_values: true members: - id: success value: 'success' @@ -67,7 +64,7 @@ groups: stability: stable brief: Match result - success or failure examples: ["success", "failure"] - - id: diagnostics.exception.result + - id: aspnetcore.diagnostics.exception.result type: members: - id: handled diff --git a/model/registry/aws.yaml b/model/registry/aws.yaml index 4ed5f82ff8..bc47121531 100644 --- a/model/registry/aws.yaml +++ b/model/registry/aws.yaml @@ -1,12 +1,11 @@ groups: - id: registry.aws - prefix: aws type: attribute_group display_name: General AWS Attributes brief: > This document defines generic attributes for AWS services. attributes: - - id: request_id + - id: aws.request_id type: string stability: experimental brief: "The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`." @@ -14,20 +13,19 @@ groups: - 79b9da39-b7ae-508a-a6bc-864b2829c622 - C9ER4AJX75574TDJ - id: registry.aws.dynamodb - prefix: aws.dynamodb type: attribute_group display_name: Amazon DynamoDB Attributes brief: > This document defines attributes for AWS DynamoDB. attributes: - - id: table_names + - id: aws.dynamodb.table_names type: string[] stability: experimental brief: The keys in the `RequestItems` object field. examples: - Users - Cats - - id: consumed_capacity + - id: aws.dynamodb.consumed_capacity type: string[] stability: experimental brief: "The JSON-serialized value of each item in the `ConsumedCapacity` response field." @@ -57,7 +55,7 @@ groups: "TableName": "string", "WriteCapacityUnits": number }' - - id: item_collection_metrics + - id: aws.dynamodb.item_collection_metrics type: string stability: experimental brief: "The JSON-serialized value of the `ItemCollectionMetrics` response field." @@ -87,25 +85,25 @@ groups: } ] }' - - id: provisioned_read_capacity + - id: aws.dynamodb.provisioned_read_capacity type: double stability: experimental brief: "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter." examples: - 1.0 - 2.0 - - id: provisioned_write_capacity + - id: aws.dynamodb.provisioned_write_capacity type: double stability: experimental brief: "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter." examples: - 1.0 - 2.0 - - id: consistent_read + - id: aws.dynamodb.consistent_read type: boolean stability: experimental brief: "The value of the `ConsistentRead` request parameter." - - id: projection + - id: aws.dynamodb.projection type: string stability: experimental brief: "The value of the `ProjectionExpression` request parameter." @@ -113,33 +111,33 @@ groups: - Title - Title, Price, Color - Title, Description, RelatedItems, ProductReviews - - id: limit + - id: aws.dynamodb.limit type: int stability: experimental brief: "The value of the `Limit` request parameter." examples: - 10 - - id: attributes_to_get + - id: aws.dynamodb.attributes_to_get type: string[] stability: experimental brief: "The value of the `AttributesToGet` request parameter." examples: - lives - id - - id: index_name + - id: aws.dynamodb.index_name type: string stability: experimental brief: "The value of the `IndexName` request parameter." examples: - name_to_group - - id: select + - id: aws.dynamodb.select type: string stability: experimental brief: "The value of the `Select` request parameter." examples: - ALL_ATTRIBUTES - COUNT - - id: global_secondary_indexes + - id: aws.dynamodb.global_secondary_indexes type: string[] stability: experimental brief: "The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field" @@ -161,7 +159,7 @@ groups: "WriteCapacityUnits": number } }' - - id: local_secondary_indexes + - id: aws.dynamodb.local_secondary_indexes type: string[] stability: experimental brief: "The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field." @@ -182,48 +180,48 @@ groups: "ProjectionType": "string" } }' - - id: exclusive_start_table + - id: aws.dynamodb.exclusive_start_table type: string stability: experimental brief: "The value of the `ExclusiveStartTableName` request parameter." examples: - Users - CatsTable - - id: table_count + - id: aws.dynamodb.table_count type: int stability: experimental brief: "The number of items in the `TableNames` response parameter." examples: - 20 - - id: scan_forward + - id: aws.dynamodb.scan_forward type: boolean stability: experimental brief: "The value of the `ScanIndexForward` request parameter." - - id: segment + - id: aws.dynamodb.segment type: int stability: experimental brief: "The value of the `Segment` request parameter." examples: - 10 - - id: total_segments + - id: aws.dynamodb.total_segments type: int stability: experimental brief: "The value of the `TotalSegments` request parameter." examples: - 100 - - id: count + - id: aws.dynamodb.count type: int stability: experimental brief: "The value of the `Count` response parameter." examples: - 10 - - id: scanned_count + - id: aws.dynamodb.scanned_count type: int stability: experimental brief: "The value of the `ScannedCount` response parameter." examples: - 50 - - id: attribute_definitions + - id: aws.dynamodb.attribute_definitions type: string[] stability: experimental brief: "The JSON-serialized value of each item in the `AttributeDefinitions` request field." @@ -232,7 +230,7 @@ groups: "AttributeName": "string", "AttributeType": "string" }' - - id: global_secondary_index_updates + - id: aws.dynamodb.global_secondary_index_updates type: string[] stability: experimental brief: "The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field." @@ -256,27 +254,25 @@ groups: } }' - id: registry.aws.ecs - prefix: aws.ecs type: attribute_group display_name: Amazon ECS Attributes brief: > This document defines attributes for AWS Elastic Container Service (ECS). attributes: - - id: container.arn + - id: aws.ecs.container.arn type: string stability: experimental brief: > The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). examples: ['arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'] - - id: cluster.arn + - id: aws.ecs.cluster.arn type: string stability: experimental brief: > The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'] - - id: launchtype + - id: aws.ecs.launchtype type: - allow_custom_values: true members: - id: ec2 value: "ec2" @@ -287,7 +283,7 @@ groups: stability: experimental brief: > The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - - id: task.arn + - id: aws.ecs.task.arn type: string stability: experimental brief: > @@ -296,13 +292,13 @@ groups: 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' ] - - id: task.family + - id: aws.ecs.task.family type: string stability: experimental brief: > The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. examples: ['opentelemetry-family'] - - id: task.id + - id: aws.ecs.task.id type: string stability: experimental brief: > @@ -310,33 +306,31 @@ groups: requirement_level: conditionally_required: If and only if `task.arn` is populated. examples: [ '10838bed-421f-43ef-870a-f43feacbbb5b', '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' ] - - id: task.revision + - id: aws.ecs.task.revision type: string stability: experimental brief: > The revision for the task definition used to create the ECS task. examples: ["8", "26"] - id: registry.aws.eks - prefix: aws.eks type: attribute_group display_name: Amazon EKS Attributes brief: > This document defines attributes for AWS Elastic Kubernetes Service (EKS). attributes: - - id: cluster.arn + - id: aws.eks.cluster.arn type: string stability: experimental brief: > The ARN of an EKS cluster. examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'] - id: registry.aws.log - prefix: aws.log type: attribute_group display_name: Amazon Logs Attributes brief: > This document defines attributes for AWS Logs. attributes: - - id: group.names + - id: aws.log.group.names type: string[] stability: experimental brief: > @@ -346,7 +340,7 @@ groups: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - - id: group.arns + - id: aws.log.group.arns type: string[] stability: experimental brief: > @@ -355,13 +349,13 @@ groups: note: > See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - - id: stream.names + - id: aws.log.stream.names type: string[] stability: experimental brief: > The name(s) of the AWS log stream(s) an application is writing to. examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'] - - id: stream.arns + - id: aws.log.stream.arns type: string[] stability: experimental brief: > @@ -374,13 +368,12 @@ groups: group and a log stream. - id: registry.aws.lambda - prefix: aws.lambda type: attribute_group display_name: Amazon Lambda Attributes brief: > This document defines attributes for AWS Lambda. attributes: - - id: invoked_arn + - id: aws.lambda.invoked_arn type: string stability: experimental brief: > @@ -389,13 +382,12 @@ groups: note: This may be different from `cloud.resource_id` if an alias is involved. examples: ['arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'] - id: registry.aws.s3 - prefix: aws.s3 type: attribute_group display_name: Amazon S3 Attributes brief: > This document defines attributes for AWS S3. attributes: - - id: bucket + - id: aws.s3.bucket type: string stability: experimental brief: "The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations." @@ -404,7 +396,7 @@ groups: note: | The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 operations except `list-buckets`. - - id: key + - id: aws.s3.key type: string stability: experimental brief: "The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations." @@ -427,7 +419,7 @@ groups: - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - - id: copy_source + - id: aws.s3.copy_source type: string stability: experimental brief: "The source object (in the form `bucket`/`key`) for the copy operation." @@ -440,7 +432,7 @@ groups: - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - - id: upload_id + - id: aws.s3.upload_id type: string stability: experimental brief: "Upload ID that identifies the multipart upload." @@ -456,7 +448,7 @@ groups: - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - - id: delete + - id: aws.s3.delete type: string stability: experimental brief: "The delete request container that specifies the objects to be deleted." @@ -466,7 +458,7 @@ groups: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. The `delete` attribute corresponds to the `--delete` parameter of the [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). - - id: part_number + - id: aws.s3.part_number type: int stability: experimental brief: "The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000." diff --git a/model/registry/browser.yaml b/model/registry/browser.yaml index 4e6f39c3e3..fcf09c6da5 100644 --- a/model/registry/browser.yaml +++ b/model/registry/browser.yaml @@ -1,12 +1,11 @@ groups: - id: registry.browser - prefix: browser type: attribute_group display_name: Browser Attributes brief: > The web browser attributes attributes: - - id: brands + - id: browser.brands type: string[] stability: experimental brief: 'Array of brand name and version separated by a space' @@ -15,7 +14,7 @@ groups: [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). examples: [ " Not A;Brand 99", "Chromium 99", "Chrome 99" ] - - id: platform + - id: browser.platform type: string stability: experimental brief: 'The platform on which the browser is running' @@ -33,7 +32,7 @@ groups: However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides. examples: ['Windows', 'macOS', 'Android'] - - id: mobile + - id: browser.mobile type: boolean stability: experimental brief: 'A boolean that is true if the browser is running on a mobile device' @@ -42,7 +41,7 @@ groups: [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset. - - id: language + - id: browser.language type: string stability: experimental brief: 'Preferred language of the user using the browser' diff --git a/model/registry/cicd.yaml b/model/registry/cicd.yaml index 16b381274b..a57b8c7b4b 100644 --- a/model/registry/cicd.yaml +++ b/model/registry/cicd.yaml @@ -1,6 +1,5 @@ groups: - id: registry.cicd.pipeline - prefix: cicd.pipeline type: attribute_group brief: > This group describes attributes specific to pipelines within a Continuous @@ -13,7 +12,7 @@ groups: producing something. In the context of CI/CD, a pipeline produces or delivers software. attributes: - - id: name + - id: cicd.pipeline.name type: string stability: experimental brief: > @@ -25,13 +24,13 @@ groups: "Deploy Go Project", "deploy_to_environment", ] - - id: run.id + - id: cicd.pipeline.run.id type: string stability: experimental brief: > The unique identifier of a pipeline run within a CI/CD system. examples: ["120912"] - - id: task.name + - id: cicd.pipeline.task.name type: string stability: experimental brief: > @@ -40,13 +39,13 @@ groups: in a pipeline. Other terms for tasks include commands, steps, and procedures. examples: ["Run GoLang Linter", "Go Build", "go-test", "deploy_binary"] - - id: task.run.id + - id: cicd.pipeline.task.run.id type: string stability: experimental brief: > The unique identifier of a task run within a pipeline. examples: ["12097"] - - id: task.run.url.full + - id: cicd.pipeline.task.run.url.full type: string stability: experimental brief: > @@ -56,7 +55,7 @@ groups: [ "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075", ] - - id: task.type + - id: cicd.pipeline.task.type type: members: - id: build diff --git a/model/registry/client.yaml b/model/registry/client.yaml index 507dfd53a7..58061c12f1 100644 --- a/model/registry/client.yaml +++ b/model/registry/client.yaml @@ -1,6 +1,5 @@ groups: - id: registry.client - prefix: client type: attribute_group display_name: Client Attributes brief: > @@ -11,7 +10,7 @@ groups: protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. attributes: - - id: address + - id: client.address stability: stable type: string brief: "Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name." @@ -19,7 +18,7 @@ groups: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available. examples: ['client.example.com', '10.1.2.80', '/tmp/my.sock'] - - id: port + - id: client.port stability: stable type: int brief: Client port number. diff --git a/model/registry/cloud.yaml b/model/registry/cloud.yaml index c86357be9d..184ab0e96b 100644 --- a/model/registry/cloud.yaml +++ b/model/registry/cloud.yaml @@ -1,14 +1,12 @@ groups: - id: registry.cloud - prefix: cloud type: attribute_group display_name: Cloud Attributes brief: > A cloud environment (e.g. GCP, Azure, AWS). attributes: - - id: provider + - id: cloud.provider type: - allow_custom_values: true members: - id: 'alibaba_cloud' value: 'alibaba_cloud' @@ -41,13 +39,13 @@ groups: stability: experimental brief: > Name of the cloud provider. - - id: account.id + - id: cloud.account.id type: string stability: experimental brief: > The cloud account ID the resource is assigned to. examples: ['111111111111', 'opentelemetry'] - - id: region + - id: cloud.region type: string stability: experimental brief: > @@ -60,7 +58,7 @@ groups: [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). examples: ['us-central1', 'us-east-1'] - - id: resource_id + - id: cloud.resource_id type: string stability: experimental brief: > @@ -90,7 +88,7 @@ groups: - 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function' - '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID' - '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' - - id: availability_zone + - id: cloud.availability_zone type: string stability: experimental brief: > @@ -100,9 +98,8 @@ groups: note: > Availability zones are called "zones" on Alibaba Cloud and Google Cloud. examples: ['us-east-1c'] - - id: platform + - id: cloud.platform type: - allow_custom_values: true members: - id: alibaba_cloud_ecs value: 'alibaba_cloud_ecs' diff --git a/model/registry/cloudevents.yaml b/model/registry/cloudevents.yaml index 61952f29b2..f933451853 100644 --- a/model/registry/cloudevents.yaml +++ b/model/registry/cloudevents.yaml @@ -1,36 +1,35 @@ groups: - id: registry.cloudevents - prefix: cloudevents type: attribute_group display_name: CloudEvents Attributes brief: > This document defines attributes for CloudEvents. attributes: - - id: event_id + - id: cloudevents.event_id type: string stability: experimental brief: > The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. examples: ['123e4567-e89b-12d3-a456-426614174000', '0001'] - - id: event_source + - id: cloudevents.event_source type: string stability: experimental brief: > The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. examples: ['https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my-service' ] - - id: event_spec_version + - id: cloudevents.event_spec_version type: string stability: experimental brief: > The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. examples: '1.0' - - id: event_type + - id: cloudevents.event_type type: string stability: experimental brief: > The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. examples: ['com.github.pull_request.opened', 'com.example.object.deleted.v2'] - - id: event_subject + - id: cloudevents.event_subject type: string stability: experimental brief: > diff --git a/model/registry/code.yaml b/model/registry/code.yaml index b7119d5150..d67740f4ec 100644 --- a/model/registry/code.yaml +++ b/model/registry/code.yaml @@ -1,43 +1,42 @@ groups: - id: registry.code - prefix: code type: attribute_group display_name: Code Attributes brief: > These attributes allow to report this unit of code and therefore to provide more context about the span. attributes: - - id: function + - id: code.function type: string stability: experimental brief: > The method or function name, or equivalent (usually rightmost part of the code unit's name). examples: serveRequest - - id: namespace + - id: code.namespace type: string stability: experimental brief: > The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. examples: com.example.MyHttpService - - id: filepath + - id: code.filepath type: string stability: experimental brief: > The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). examples: /usr/local/MyApplication/content_root/app/index.php - - id: lineno + - id: code.lineno type: int stability: experimental brief: > The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. examples: 42 - - id: column + - id: code.column type: int stability: experimental brief: > The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. examples: 16 - - id: stacktrace + - id: code.stacktrace type: string stability: experimental brief: > diff --git a/model/registry/container.yaml b/model/registry/container.yaml index 750d8854bd..52cb7ff22b 100644 --- a/model/registry/container.yaml +++ b/model/registry/container.yaml @@ -1,18 +1,17 @@ groups: - id: registry.container - prefix: container type: attribute_group display_name: Container Attributes brief: > A container instance. attributes: - - id: name + - id: container.name type: string stability: experimental brief: > Container name used by container runtime. examples: ['opentelemetry-autoconf'] - - id: id + - id: container.id type: string stability: experimental brief: > @@ -20,19 +19,19 @@ groups: [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. examples: ['a3bf90e006b2'] - - id: runtime + - id: container.runtime type: string stability: experimental brief: > The container runtime managing this container. examples: ['docker', 'containerd', 'rkt'] - - id: image.name + - id: container.image.name type: string stability: experimental brief: > Name of the image the container was built on. examples: ['gcr.io/opentelemetry/operator'] - - id: image.tags + - id: container.image.tags type: string[] stability: experimental brief: > @@ -41,7 +40,7 @@ groups: Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. examples: ['v1.27.1', '3.5.7-0'] - - id: image.id + - id: container.image.id type: string stability: experimental brief: > @@ -58,7 +57,7 @@ groups: Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. examples: ['sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'] - - id: image.repo_digests + - id: container.image.repo_digests type: string[] stability: experimental brief: > @@ -70,7 +69,7 @@ groups: examples: - 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb' - 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' - - id: command + - id: container.command type: string stability: experimental note: > @@ -78,19 +77,19 @@ groups: brief: > The command used to run the container (i.e. the command name). examples: [ 'otelcontribcol' ] - - id: command_line + - id: container.command_line type: string stability: experimental brief: > The full command run by the container as a single string representing the full command. [2] examples: [ 'otelcontribcol --config config.yaml' ] - - id: command_args + - id: container.command_args type: string[] stability: experimental brief: > All the command arguments (including the command/executable itself) run by the container. [2] examples: [ 'otelcontribcol, --config, config.yaml' ] - - id: label + - id: container.label type: template[string] stability: experimental brief: > diff --git a/model/registry/cpu.yaml b/model/registry/cpu.yaml index 93a327f9fa..0ff9e4d226 100644 --- a/model/registry/cpu.yaml +++ b/model/registry/cpu.yaml @@ -1,14 +1,12 @@ groups: - id: registry.cpu - prefix: cpu type: attribute_group brief: Attributes specific to a cpu instance. display_name: CPU Attributes attributes: - - id: mode + - id: cpu.mode brief: "The mode of the CPU" type: - allow_custom_values: true # TODO: Fix how enum members are used in semantic conventions after https://github.com/open-telemetry/build-tools/issues/192 is merged members: - id: user diff --git a/model/registry/db.yaml b/model/registry/db.yaml index 8529414fbe..143d221bb1 100644 --- a/model/registry/db.yaml +++ b/model/registry/db.yaml @@ -1,12 +1,11 @@ groups: - id: registry.db - prefix: db type: attribute_group display_name: General Database Attributes brief: > This group defines the attributes used to describe telemetry in the context of databases. attributes: - - id: collection.name + - id: db.collection.name type: string stability: experimental brief: The name of a collection (table, container) within the database. @@ -19,7 +18,7 @@ groups: For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured. examples: ['public.users', 'customers'] - - id: namespace + - id: db.namespace type: string stability: experimental brief: > @@ -35,7 +34,7 @@ groups: It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. examples: [ 'customers', 'test.users' ] - - id: operation.name + - id: db.operation.name type: string stability: experimental brief: > @@ -49,7 +48,7 @@ groups: then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable. examples: ['findAndModify', 'HMSET', 'SELECT'] - - id: query.text + - id: db.query.text type: string stability: experimental brief: > @@ -65,7 +64,7 @@ groups: the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. examples: ['SELECT * FROM wuser_table where username = ?', 'SET mykey "WuValue"'] - - id: query.parameter + - id: db.query.parameter type: template[string] stability: experimental brief: > @@ -77,7 +76,7 @@ groups: If a parameter has no name and instead is referenced only by index, then `` SHOULD be the 0-based index. examples: ['someval', '55'] - - id: operation.batch.size + - id: db.operation.batch.size type: int stability: experimental brief: The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). @@ -85,14 +84,13 @@ groups: Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`. examples: [ 2, 3, 4 ] - - id: system + - id: db.system brief: The database management system (DBMS) product as identified by the client instrumentation. note: > The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge. type: - allow_custom_values: true members: - id: other_sql value: 'other_sql' @@ -316,10 +314,9 @@ groups: brief: 'Vertica' stability: experimental stability: experimental - - id: client.connection.state + - id: db.client.connection.state stability: experimental type: - allow_custom_values: true members: - id: idle value: 'idle' @@ -329,7 +326,7 @@ groups: stability: experimental brief: "The state of a connection in the pool" examples: ["idle"] - - id: client.connection.pool.name + - id: db.client.connection.pool.name type: string stability: experimental brief: > @@ -339,25 +336,24 @@ groups: formatted as `server.address:server.port`. examples: ["myDataSource"] - id: registry.db.cassandra - prefix: db type: attribute_group display_name: Cassandra Attributes brief: > This group defines attributes for Cassandra. attributes: - - id: cassandra.coordinator.dc + - id: db.cassandra.coordinator.dc type: string stability: experimental brief: > The data center of the coordinating node for a query. examples: 'us-west-2' - - id: cassandra.coordinator.id + - id: db.cassandra.coordinator.id type: string stability: experimental brief: > The ID of the coordinating node for a query. examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - - id: cassandra.consistency_level + - id: db.cassandra.consistency_level brief: > The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). type: @@ -396,38 +392,36 @@ groups: value: 'local_serial' stability: experimental stability: experimental - - id: cassandra.idempotence + - id: db.cassandra.idempotence type: boolean stability: experimental brief: > Whether or not the query is idempotent. - - id: cassandra.page_size + - id: db.cassandra.page_size type: int stability: experimental brief: > The fetch size used for paging, i.e. how many rows will be returned at once. examples: [5000] - - id: cassandra.speculative_execution_count + - id: db.cassandra.speculative_execution_count type: int stability: experimental brief: > The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. examples: [0, 2] - id: registry.db.cosmosdb - prefix: db type: attribute_group display_name: Azure Cosmos DB Attributes brief: > This group defines attributes for Azure Cosmos DB. attributes: - - id: cosmosdb.client_id + - id: db.cosmosdb.client_id type: string stability: experimental brief: Unique Cosmos client instance id. examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - - id: cosmosdb.connection_mode + - id: db.cosmosdb.connection_mode type: - allow_custom_values: false members: - id: gateway value: 'gateway' @@ -439,9 +433,8 @@ groups: stability: experimental stability: experimental brief: Cosmos client connection mode. - - id: cosmosdb.operation_type + - id: db.cosmosdb.operation_type type: - allow_custom_values: true members: - id: invalid value: 'Invalid' @@ -490,39 +483,38 @@ groups: stability: experimental stability: experimental brief: CosmosDB Operation Type. - - id: cosmosdb.request_charge + - id: db.cosmosdb.request_charge type: double stability: experimental brief: RU consumed for that operation examples: [46.18, 1.0] - - id: cosmosdb.request_content_length + - id: db.cosmosdb.request_content_length type: int stability: experimental brief: Request payload size in bytes - - id: cosmosdb.status_code + - id: db.cosmosdb.status_code type: int stability: experimental brief: Cosmos DB status code. examples: [200, 201] - - id: cosmosdb.sub_status_code + - id: db.cosmosdb.sub_status_code type: int stability: experimental brief: Cosmos DB sub status code. examples: [1000, 1002] - id: registry.db.elasticsearch - prefix: db type: attribute_group display_name: Elasticsearch Attributes brief: > This group defines attributes for Elasticsearch. attributes: - - id: elasticsearch.node.name + - id: db.elasticsearch.node.name type: string stability: experimental brief: > Represents the human-readable identifier of the node/instance to which a request was routed. examples: ["instance-0000000001"] - - id: elasticsearch.path_parts + - id: db.elasticsearch.path_parts type: template[string] stability: experimental brief: > diff --git a/model/registry/deployment.yaml b/model/registry/deployment.yaml index 2cf5ec0666..a43a5d13a3 100644 --- a/model/registry/deployment.yaml +++ b/model/registry/deployment.yaml @@ -1,24 +1,23 @@ groups: - id: registry.deployment - prefix: deployment type: attribute_group display_name: Deployment Attributes brief: > This document defines attributes for software deployments. attributes: - - id: name + - id: deployment.name type: string stability: experimental brief: > The name of the deployment. examples: ['deploy my app', 'deploy-frontend'] - - id: id + - id: deployment.id type: string stability: experimental brief: > The id of the deployment. examples: ['1208'] - - id: status + - id: deployment.status type: members: - id: failed @@ -32,7 +31,7 @@ groups: brief: > The status of the deployment. stability: experimental - - id: environment.name + - id: deployment.environment.name type: string stability: experimental brief: > diff --git a/model/registry/deprecated/android.yaml b/model/registry/deprecated/android.yaml index 9445a91d5c..fdf2018447 100644 --- a/model/registry/deprecated/android.yaml +++ b/model/registry/deprecated/android.yaml @@ -1,12 +1,11 @@ groups: - id: registry.android.deprecated - prefix: android type: attribute_group display_name: Deprecated Android Attributes brief: > This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform. attributes: - - id: state + - id: android.state stability: experimental brief: > Deprecated use the `device.app.lifecycle` event definition including @@ -15,7 +14,6 @@ groups: The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. type: - allow_custom_values: true members: - id: created value: 'created' diff --git a/model/registry/deprecated/container.yaml b/model/registry/deprecated/container.yaml index 01312d6865..b99b0f43b3 100644 --- a/model/registry/deprecated/container.yaml +++ b/model/registry/deprecated/container.yaml @@ -13,7 +13,6 @@ groups: - id: container.cpu.state brief: "Deprecated, use `cpu.mode` instead." type: - allow_custom_values: true members: - id: user value: 'user' diff --git a/model/registry/deprecated/db.yaml b/model/registry/deprecated/db.yaml index 4bdf5f1de3..9f8e56eb48 100644 --- a/model/registry/deprecated/db.yaml +++ b/model/registry/deprecated/db.yaml @@ -1,91 +1,90 @@ groups: - id: registry.db.deprecated - prefix: db type: attribute_group display_name: Deprecated Database Attributes brief: > "Describes deprecated db attributes." attributes: - - id: connection_string + - id: db.connection_string type: string brief: 'Deprecated, use `server.address`, `server.port` attributes instead.' stability: experimental deprecated: > "Replaced by `server.address` and `server.port`." examples: Server=(localdb)\v11.0;Integrated Security=true; - - id: jdbc.driver_classname + - id: db.jdbc.driver_classname type: string brief: 'Removed, no replacement at this time.' stability: experimental deprecated: 'Removed as not used.' examples: ['org.postgresql.Driver', 'com.microsoft.sqlserver.jdbc.SQLServerDriver'] - - id: operation + - id: db.operation type: string brief: 'Deprecated, use `db.operation.name` instead.' stability: experimental deprecated: "Replaced by `db.operation.name`." examples: ['findAndModify', 'HMSET', 'SELECT'] - - id: user + - id: db.user type: string brief: 'Deprecated, no replacement at this time.' deprecated: "No replacement at this time." stability: experimental examples: ['readonly_user', 'reporting_user'] - - id: statement + - id: db.statement type: string brief: The database statement being executed. deprecated: "Replaced by `db.query.text`." stability: experimental examples: ['SELECT * FROM wuser_table', 'SET mykey "WuValue"'] - - id: cassandra.table + - id: db.cassandra.table type: string stability: experimental brief: 'Deprecated, use `db.collection.name` instead.' deprecated: "Replaced by `db.collection.name`." examples: 'mytable' - - id: cosmosdb.container + - id: db.cosmosdb.container type: string stability: experimental brief: 'Deprecated, use `db.collection.name` instead.' deprecated: "Replaced by `db.collection.name`." examples: 'mytable' - - id: mongodb.collection + - id: db.mongodb.collection type: string stability: experimental brief: 'Deprecated, use `db.collection.name` instead.' deprecated: "Replaced by `db.collection.name`." examples: 'mytable' - - id: sql.table + - id: db.sql.table type: string stability: experimental brief: 'Deprecated, use `db.collection.name` instead.' deprecated: "Replaced by `db.collection.name`." examples: 'mytable' - - id: redis.database_index + - id: db.redis.database_index type: int stability: experimental brief: 'Deprecated, use `db.namespace` instead.' deprecated: "Replaced by `db.namespace`." examples: [0, 1, 15] - - id: name + - id: db.name type: string stability: experimental brief: 'Deprecated, use `db.namespace` instead.' deprecated: "Replaced by `db.namespace`." examples: [ 'customers', 'main' ] - - id: mssql.instance_name + - id: db.mssql.instance_name type: string stability: experimental brief: 'Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute.' deprecated: 'Deprecated, no replacement at this time.' examples: 'MSSQLSERVER' - - id: instance.id + - id: db.instance.id type: string stability: experimental brief: 'Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead.' deprecated: 'Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead.' examples: 'mysql-e26b99z.example.com' - - id: elasticsearch.cluster.name + - id: db.elasticsearch.cluster.name type: string stability: experimental deprecated: Replaced by `db.namespace`. @@ -102,7 +101,6 @@ groups: - id: state stability: experimental type: - allow_custom_values: true members: - id: idle value: 'idle' @@ -122,7 +120,6 @@ groups: - id: db.client.connections.state stability: experimental type: - allow_custom_values: true members: - id: idle value: 'idle' diff --git a/model/registry/deprecated/deployment.yaml b/model/registry/deprecated/deployment.yaml index fa02533e25..5ac9727db0 100644 --- a/model/registry/deprecated/deployment.yaml +++ b/model/registry/deprecated/deployment.yaml @@ -1,11 +1,10 @@ groups: - id: registry.deployment.deprecated - prefix: deployment type: attribute_group brief: > "Describes deprecated deployment attributes." attributes: - - id: environment + - id: deployment.environment type: string stability: experimental deprecated: 'Deprecated, use `deployment.environment.name` instead.' diff --git a/model/registry/deprecated/enduser.yaml b/model/registry/deprecated/enduser.yaml index 54e97dcde6..0f5723e19a 100644 --- a/model/registry/deprecated/enduser.yaml +++ b/model/registry/deprecated/enduser.yaml @@ -1,23 +1,22 @@ groups: - id: registry.enduser.deprecated - prefix: enduser type: attribute_group display_name: Deprecated End User Attributes brief: Describes deprecated enduser attributes. Complete enduser namespace has been deprecated attributes: - - id: id + - id: enduser.id type: string stability: experimental deprecated: Replaced by `user.id` attribute. brief: "Deprecated, use `user.id` instead." examples: 'username' - - id: role + - id: enduser.role type: string stability: experimental deprecated: Replaced by `user.roles` attribute. brief: "Deprecated, use `user.roles` instead." examples: 'admin' - - id: scope + - id: enduser.scope type: string stability: experimental deprecated: Removed. diff --git a/model/registry/deprecated/http.yaml b/model/registry/deprecated/http.yaml index 1c35ecdc5e..1a1a0f3bbe 100644 --- a/model/registry/deprecated/http.yaml +++ b/model/registry/deprecated/http.yaml @@ -3,83 +3,81 @@ groups: type: attribute_group display_name: Deprecated HTTP Attributes brief: "Describes deprecated HTTP attributes." - prefix: http attributes: - - id: method + - id: http.method type: string brief: 'Deprecated, use `http.request.method` instead.' stability: experimental deprecated: "Replaced by `http.request.method`." examples: ["GET", "POST", "HEAD"] - - id: status_code + - id: http.status_code type: int brief: 'Deprecated, use `http.response.status_code` instead.' stability: experimental deprecated: "Replaced by `http.response.status_code`." examples: [200] - - id: scheme + - id: http.scheme type: string brief: 'Deprecated, use `url.scheme` instead.' stability: experimental deprecated: "Replaced by `url.scheme` instead." examples: ['http', 'https'] - - id: url + - id: http.url type: string brief: 'Deprecated, use `url.full` instead.' stability: experimental deprecated: "Replaced by `url.full`." examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv'] - - id: target + - id: http.target type: string brief: 'Deprecated, use `url.path` and `url.query` instead.' stability: experimental deprecated: "Split to `url.path` and `url.query." examples: ['/search?q=OpenTelemetry#SemConv'] - - id: request_content_length + - id: http.request_content_length type: int brief: 'Deprecated, use `http.request.header.content-length` instead.' stability: experimental deprecated: "Replaced by `http.request.header.content-length`." examples: 3495 - - id: response_content_length + - id: http.response_content_length type: int brief: 'Deprecated, use `http.response.header.content-length` instead.' stability: experimental deprecated: "Replaced by `http.response.header.content-length`." examples: 3495 - - id: client_ip + - id: http.client_ip type: string stability: experimental deprecated: "Replaced by `client.address`." brief: "Deprecated, use `client.address` instead." examples: '83.164.160.102' - - id: host + - id: http.host type: string stability: experimental deprecated: "Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage." brief: "Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage." examples: ['www.example.org'] - - id: request_content_length_uncompressed + - id: http.request_content_length_uncompressed stability: experimental deprecated: "Replaced by `http.request.body.size`." type: int brief: "Deprecated, use `http.request.body.size` instead." examples: 5493 - - id: response_content_length_uncompressed + - id: http.response_content_length_uncompressed stability: experimental deprecated: "Replace by `http.response.body.size`." type: int brief: "Deprecated, use `http.response.body.size` instead." examples: 5493 - - id: server_name + - id: http.server_name type: string stability: experimental deprecated: "Replaced by `server.address`." brief: "Deprecated, use `server.address` instead." examples: ['example.com'] - - id: flavor + - id: http.flavor type: - allow_custom_values: true members: - id: http_1_0 value: '1.0' @@ -108,7 +106,7 @@ groups: brief: 'Deprecated, use `network.protocol.name` instead.' deprecated: "Replaced by `network.protocol.name`." stability: experimental - - id: user_agent + - id: http.user_agent type: string brief: 'Deprecated, use `user_agent.original` instead.' examples: ['CERN-LineMode/2.15 libwww/2.17b3', diff --git a/model/registry/deprecated/ios.yaml b/model/registry/deprecated/ios.yaml index 326a40fcfd..14d4ba313d 100644 --- a/model/registry/deprecated/ios.yaml +++ b/model/registry/deprecated/ios.yaml @@ -1,12 +1,11 @@ groups: - id: registry.ios.deprecated - prefix: ios type: attribute_group display_name: Deprecated iOS Attributes brief: > The iOS platform on which the iOS application is running. attributes: - - id: state + - id: ios.state stability: experimental deprecated: "Moved to a payload field of `device.app.lifecycle`." note: > @@ -16,7 +15,6 @@ groups: Deprecated use the `device.app.lifecycle` event definition including `ios.state` as a payload field instead. type: - allow_custom_values: true members: - id: active value: 'active' diff --git a/model/registry/deprecated/network.yaml b/model/registry/deprecated/network.yaml index 7487f69adf..b27f51bcc1 100644 --- a/model/registry/deprecated/network.yaml +++ b/model/registry/deprecated/network.yaml @@ -1,80 +1,78 @@ groups: - id: registry.network.deprecated - prefix: net type: attribute_group display_name: Deprecated Network Attributes brief: > These attributes may be used for any network related operation. attributes: - - id: sock.peer.name + - id: net.sock.peer.name type: string deprecated: "Removed." stability: experimental brief: Deprecated, no replacement at this time. examples: ['/var/my.sock'] - - id: sock.peer.addr + - id: net.sock.peer.addr type: string deprecated: "Replaced by `network.peer.address`." stability: experimental brief: Deprecated, use `network.peer.address`. examples: ['192.168.0.1'] - - id: sock.peer.port + - id: net.sock.peer.port type: int deprecated: "Replaced by `network.peer.port`." stability: experimental examples: [65531] brief: Deprecated, use `network.peer.port`. - - id: peer.name + - id: net.peer.name type: string deprecated: "Replaced by `server.address` on client spans and `client.address` on server spans." stability: experimental brief: Deprecated, use `server.address` on client spans and `client.address` on server spans. examples: ['example.com'] - - id: peer.port + - id: net.peer.port type: int deprecated: "Replaced by `server.port` on client spans and `client.port` on server spans." stability: experimental brief: Deprecated, use `server.port` on client spans and `client.port` on server spans. examples: [8080] - - id: peer.ip + - id: net.peer.ip type: string deprecated: "Replaced by `network.peer.address`." stability: experimental brief: Deprecated, use `network.peer.address`. examples: '127.0.0.1' - - id: host.name + - id: net.host.name type: string deprecated: "Replaced by `server.address`." stability: experimental brief: Deprecated, use `server.address`. examples: ['example.com'] - - id: host.ip + - id: net.host.ip type: string deprecated: "Replaced by `network.local.address`." stability: experimental brief: Deprecated, use `network.local.address`. examples: '192.168.0.1' - - id: host.port + - id: net.host.port type: int deprecated: "Replaced by `server.port`." stability: experimental brief: Deprecated, use `server.port`. examples: [8080] - - id: sock.host.addr + - id: net.sock.host.addr type: string deprecated: "Replaced by `network.local.address`." stability: experimental brief: Deprecated, use `network.local.address`. examples: ['/var/my.sock'] - - id: sock.host.port + - id: net.sock.host.port type: int deprecated: "Replaced by `network.local.port`." stability: experimental brief: Deprecated, use `network.local.port`. examples: [8080] - - id: transport + - id: net.transport type: - allow_custom_values: true members: - id: ip_tcp value: "ip_tcp" @@ -101,21 +99,20 @@ groups: deprecated: "Replaced by `network.transport`." stability: experimental brief: Deprecated, use `network.transport`. - - id: protocol.name + - id: net.protocol.name type: string deprecated: "Replaced by `network.protocol.name`." stability: experimental brief: Deprecated, use `network.protocol.name`. examples: ['amqp', 'http', 'mqtt'] - - id: protocol.version + - id: net.protocol.version type: string deprecated: "Replaced by `network.protocol.version`." stability: experimental brief: Deprecated, use `network.protocol.version`. examples: '3.1.1' - - id: sock.family + - id: net.sock.family type: - allow_custom_values: true members: - id: inet value: 'inet' diff --git a/model/registry/deprecated/otel.yaml b/model/registry/deprecated/otel.yaml index b0b9cf0a8b..634eb4ea1d 100644 --- a/model/registry/deprecated/otel.yaml +++ b/model/registry/deprecated/otel.yaml @@ -1,19 +1,18 @@ groups: - id: registry.otel.library.deprecated - prefix: otel.library type: attribute_group display_name: Deprecated OTel Library Attributes brief: "Describes deprecated otel.library attributes." attributes: - - id: name + - id: otel.library.name type: string deprecated: use the `otel.scope.name` attribute. stability: experimental - brief: + brief: "" examples: ['io.opentelemetry.contrib.mongodb'] - - id: version + - id: otel.library.version type: string deprecated: use the `otel.scope.version` attribute. stability: experimental - brief: + brief: "" examples: ['1.0.0'] diff --git a/model/registry/deprecated/process.yaml b/model/registry/deprecated/process.yaml index 1c79cf81b2..7941674529 100644 --- a/model/registry/deprecated/process.yaml +++ b/model/registry/deprecated/process.yaml @@ -8,7 +8,6 @@ groups: brief: "Deprecated, use `cpu.mode` instead." deprecated: 'Replaced by `cpu.mode`' type: - allow_custom_values: true members: - id: system value: 'system' diff --git a/model/registry/deprecated/system.yaml b/model/registry/deprecated/system.yaml index 8f2ece9d84..70ea9583ae 100644 --- a/model/registry/deprecated/system.yaml +++ b/model/registry/deprecated/system.yaml @@ -6,7 +6,6 @@ groups: attributes: - id: system.processes.status type: - allow_custom_values: true members: - id: running value: 'running' @@ -26,7 +25,6 @@ groups: examples: ["running"] - id: system.cpu.state type: - allow_custom_values: true members: - id: user value: 'user' diff --git a/model/registry/destination.yaml b/model/registry/destination.yaml index a0631c5201..f0dc4fba43 100644 --- a/model/registry/destination.yaml +++ b/model/registry/destination.yaml @@ -1,6 +1,5 @@ groups: - id: registry.destination - prefix: destination type: attribute_group display_name: Destination Attributes brief: > @@ -11,7 +10,7 @@ groups: This also covers unidirectional UDP flows and peer-to-peer communication where the "user-facing" surface of the protocol / API doesn't expose a clear notion of client and server. attributes: - - id: address + - id: destination.address type: string stability: experimental brief: "Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name." @@ -19,7 +18,7 @@ groups: When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available. examples: ['destination.example.com', '10.1.2.80', '/tmp/my.sock'] - - id: port + - id: destination.port type: int stability: experimental brief: 'Destination port number' diff --git a/model/registry/device.yaml b/model/registry/device.yaml index 901bf1869c..6fc25d8f6f 100644 --- a/model/registry/device.yaml +++ b/model/registry/device.yaml @@ -1,12 +1,11 @@ groups: - id: registry.device - prefix: device type: attribute_group display_name: Device Attributes brief: > Describes device attributes. attributes: - - id: id + - id: device.id type: string stability: experimental brief: > @@ -21,7 +20,7 @@ groups: Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. examples: ['2ab2916d-a51f-4ac8-80ee-45ac31a28092'] - - id: manufacturer + - id: device.manufacturer type: string stability: experimental brief: > @@ -30,7 +29,7 @@ groups: The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`. examples: ['Apple', 'Samsung'] - - id: model.identifier + - id: device.model.identifier type: string stability: experimental brief: > @@ -40,7 +39,7 @@ groups: the model identifier rather than the market or consumer-friendly name of the device. examples: ['iPhone3,4', 'SM-G920F'] - - id: model.name + - id: device.model.name type: string stability: experimental brief: > diff --git a/model/registry/disk.yaml b/model/registry/disk.yaml index b8dc420351..ecaffd1f05 100644 --- a/model/registry/disk.yaml +++ b/model/registry/disk.yaml @@ -1,14 +1,12 @@ groups: - id: registry.disk - prefix: disk type: attribute_group display_name: Disk Attributes brief: > These attributes may be used for any disk related operation. attributes: - - id: io.direction + - id: disk.io.direction type: - allow_custom_values: false members: - id: read value: 'read' diff --git a/model/registry/dns.yaml b/model/registry/dns.yaml index f58187e0c9..78310e93d1 100644 --- a/model/registry/dns.yaml +++ b/model/registry/dns.yaml @@ -2,11 +2,10 @@ groups: - id: registry.dns type: attribute_group display_name: DNS Attributes - prefix: dns brief: > This document defines the shared attributes used to report a DNS query. attributes: - - id: question.name + - id: dns.question.name type: string stability: experimental brief: The name being queried. diff --git a/model/registry/error.yaml b/model/registry/error.yaml index 95183df639..35f8b57222 100644 --- a/model/registry/error.yaml +++ b/model/registry/error.yaml @@ -2,16 +2,14 @@ groups: - id: registry.error type: attribute_group display_name: Error Attributes - prefix: error brief: > This document defines the shared attributes used to report an error. attributes: - - id: type + - id: error.type stability: stable brief: > Describes a class of error the operation ended with. type: - allow_custom_values: true members: - id: other value: "_OTHER" diff --git a/model/registry/event.yaml b/model/registry/event.yaml index 0c1e32400e..7fdfe7feea 100644 --- a/model/registry/event.yaml +++ b/model/registry/event.yaml @@ -1,12 +1,11 @@ groups: - id: registry.event - prefix: event type: attribute_group display_name: Event Attributes brief: > Attributes for Events represented using Log Records. attributes: - - id: name + - id: event.name type: string stability: experimental brief: > diff --git a/model/registry/exception.yaml b/model/registry/exception.yaml index def10422b2..63897ae5d2 100644 --- a/model/registry/exception.yaml +++ b/model/registry/exception.yaml @@ -2,12 +2,11 @@ groups: - id: registry.exception type: attribute_group display_name: Exception Attributes - prefix: exception brief: > This document defines the shared attributes used to report a single exception associated with a span or log. attributes: - - id: type + - id: exception.type type: string stability: stable brief: > @@ -15,12 +14,12 @@ groups: The dynamic type of the exception should be preferred over the static type in languages that support it. examples: ["java.net.ConnectException", "OSError"] - - id: message + - id: exception.message type: string stability: stable brief: The exception message. examples: ["Division by zero", "Can't convert 'int' object to str implicitly"] - - id: stacktrace + - id: exception.stacktrace type: string stability: stable brief: > @@ -30,7 +29,7 @@ groups: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)' - - id: escaped + - id: exception.escaped type: boolean stability: stable brief: > diff --git a/model/registry/faas.yaml b/model/registry/faas.yaml index 6fb139fbf0..4d3e4d0eb1 100644 --- a/model/registry/faas.yaml +++ b/model/registry/faas.yaml @@ -3,9 +3,8 @@ groups: brief: FaaS attributes type: attribute_group display_name: Function as a Service Attributes - prefix: faas attributes: - - id: name + - id: faas.name type: string stability: experimental brief: > @@ -28,7 +27,7 @@ groups: app can host multiple functions that would usually share a TracerProvider (see also the `cloud.resource_id` attribute). examples: ['my-function', 'myazurefunctionapp/some-function-name'] - - id: version + - id: faas.version type: string stability: experimental brief: The immutable version of the function being executed. @@ -43,7 +42,7 @@ groups: [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). * **Azure Functions:** Not applicable. Do not set this attribute. examples: ['26', 'pinkfroid-00002'] - - id: instance + - id: faas.instance type: string stability: experimental brief: > @@ -52,7 +51,7 @@ groups: note: > * **AWS Lambda:** Use the (full) log stream name. examples: ['2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'] - - id: max_memory + - id: faas.max_memory type: int stability: experimental brief: > @@ -63,12 +62,11 @@ groups: On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576). examples: 134217728 - - id: trigger + - id: faas.trigger stability: experimental brief: > Type of the trigger which caused this function invocation. type: - allow_custom_values: false members: - id: datasource value: 'datasource' @@ -90,7 +88,7 @@ groups: value: 'other' brief: 'If none of the others apply' stability: experimental - - id: invoked_name + - id: faas.invoked_name type: string stability: experimental brief: > @@ -99,10 +97,9 @@ groups: SHOULD be equal to the `faas.name` resource attribute of the invoked function. examples: 'my-function' - - id: invoked_provider + - id: faas.invoked_provider stability: experimental type: - allow_custom_values: true members: - id: 'alibaba_cloud' value: 'alibaba_cloud' @@ -129,7 +126,7 @@ groups: note: > SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - - id: invoked_region + - id: faas.invoked_region type: string stability: experimental brief: > @@ -138,13 +135,13 @@ groups: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. examples: 'eu-central-1' - - id: invocation_id + - id: faas.invocation_id type: string stability: experimental brief: > The invocation ID of the current function invocation. examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - - id: time + - id: faas.time type: string stability: experimental brief: > @@ -152,20 +149,20 @@ groups: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). examples: "2020-01-23T13:47:06Z" - - id: cron + - id: faas.cron type: string stability: experimental brief: > A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). examples: "0/5 * * * ? *" - - id: coldstart + - id: faas.coldstart type: boolean stability: experimental brief: > A boolean that is true if the serverless function is executed for the first time (aka cold-start). - - id: document.collection + - id: faas.document.collection type: string stability: experimental brief: > @@ -173,10 +170,9 @@ groups: For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. examples: ['myBucketName', 'myDbName'] - - id: document.operation + - id: faas.document.operation stability: experimental type: - allow_custom_values: true members: - id: insert value: 'insert' @@ -191,7 +187,7 @@ groups: brief: 'When an object is deleted.' stability: experimental brief: 'Describes the type of the operation that was performed on the data.' - - id: document.time + - id: faas.document.time type: string stability: experimental brief: > @@ -199,7 +195,7 @@ groups: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). examples: "2020-01-23T13:47:06Z" - - id: document.name + - id: faas.document.name type: string stability: experimental brief: > diff --git a/model/registry/feature-flag.yaml b/model/registry/feature-flag.yaml index 1b41ff3898..1533d685ec 100644 --- a/model/registry/feature-flag.yaml +++ b/model/registry/feature-flag.yaml @@ -1,22 +1,21 @@ groups: - id: registry.feature_flag - prefix: feature_flag type: attribute_group display_name: Feature Flag Attributes brief: > This document defines attributes for Feature Flags. attributes: - - id: key + - id: feature_flag.key type: string stability: experimental brief: The unique identifier of the feature flag. examples: ["logo-color"] - - id: provider_name + - id: feature_flag.provider_name type: string stability: experimental brief: The name of the service provider that performs the flag evaluation. examples: ["Flag Manager"] - - id: variant + - id: feature_flag.variant type: string stability: experimental examples: ["red", "true", "on"] diff --git a/model/registry/file.yaml b/model/registry/file.yaml index 57d33a4106..742f95afee 100644 --- a/model/registry/file.yaml +++ b/model/registry/file.yaml @@ -1,17 +1,16 @@ groups: - id: registry.file - prefix: file type: attribute_group display_name: File Attributes brief: "Describes file attributes." attributes: - - id: directory + - id: file.directory type: string brief: > Directory where the file is located. It should include the drive letter, when appropriate. stability: experimental examples: ['/home/user', 'C:\Program Files\MyApp'] - - id: extension + - id: file.extension type: string brief: > File extension, excluding the leading dot. @@ -20,19 +19,19 @@ groups: note: > When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - - id: name + - id: file.name type: string brief: > Name of the file including the extension, without the directory. stability: experimental examples: ['example.png'] - - id: path + - id: file.path type: string brief: > Full path to the file, including the file name. It should include the drive letter, when appropriate. stability: experimental examples: ['/home/alice/example.png', 'C:\Program Files\MyApp\myapp.exe'] - - id: size + - id: file.size type: int brief: > File size in bytes. diff --git a/model/registry/gcp.yaml b/model/registry/gcp.yaml index 66f9273d20..df2dcbbd36 100644 --- a/model/registry/gcp.yaml +++ b/model/registry/gcp.yaml @@ -1,17 +1,11 @@ groups: - - id: registry.gcp - prefix: gcp - type: attribute_group - display_name: GCP Attributes - brief: Attributes for Google Cloud - id: registry.gcp.client - prefix: gcp.client type: attribute_group display_name: GCP Client Attributes brief: > Attributes for Google Cloud client libraries. attributes: - - id: service + - id: gcp.client.service type: string stability: experimental brief: Identifies the Google Cloud service for which the official client library is intended. @@ -22,13 +16,12 @@ groups: example, 'foo.googleapis.com' should result in a value of 'foo'. examples: ['appengine', 'run', 'firestore', 'alloydb', 'spanner'] - id: registry.gcp.cloud_run - prefix: gcp.cloud_run type: attribute_group display_name: GCP - Google Cloud Run Attributes brief: > This document defines attributes for Google Cloud Run. attributes: - - id: job.execution + - id: gcp.cloud_run.job.execution type: string stability: experimental brief: > @@ -38,7 +31,7 @@ groups: [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. examples: ['job-name-xxxx', 'sample-job-mdw84'] - - id: job.task_index + - id: gcp.cloud_run.job.task_index type: int stability: experimental brief: > @@ -47,13 +40,12 @@ groups: environment variable. examples: [0, 1] - id: registry.gcp.gce - prefix: gcp.gce type: attribute_group display_name: GCP - Google Compute Engine (GCE) Attributes brief: > This document defines attributes for Google Compute Engine (GCE). attributes: - - id: instance.name + - id: gcp.gce.instance.name type: string stability: experimental brief: > @@ -64,7 +56,7 @@ groups: DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). examples: ['instance-1', 'my-vm-name'] - - id: instance.hostname + - id: gcp.gce.instance.hostname type: string stability: experimental brief: > diff --git a/model/registry/gen-ai.yaml b/model/registry/gen-ai.yaml index 820906f108..ac9d6c5e54 100644 --- a/model/registry/gen-ai.yaml +++ b/model/registry/gen-ai.yaml @@ -1,12 +1,11 @@ groups: - id: registry.gen_ai - prefix: gen_ai type: attribute_group display_name: GenAI Attributes brief: > This document defines the attributes used to describe telemetry in the context of Generative Artificial Intelligence (GenAI) Models requests and responses. attributes: - - id: system + - id: gen_ai.system stability: experimental type: members: @@ -38,73 +37,72 @@ groups: For custom model, a custom friendly name SHOULD be used. If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`. examples: 'openai' - - id: request.model + - id: gen_ai.request.model stability: experimental type: string brief: The name of the GenAI model a request is being made to. examples: 'gpt-4' - - id: request.max_tokens + - id: gen_ai.request.max_tokens stability: experimental type: int brief: The maximum number of tokens the model generates for a request. examples: [100] - - id: request.temperature + - id: gen_ai.request.temperature stability: experimental type: double brief: The temperature setting for the GenAI request. examples: [0.0] - - id: request.top_p + - id: gen_ai.request.top_p stability: experimental type: double brief: The top_p sampling setting for the GenAI request. examples: [1.0] - tag: llm-generic-request - - id: request.top_k + - id: gen_ai.request.top_k stability: experimental type: double brief: The top_k sampling setting for the GenAI request. examples: [1.0] - - id: request.stop_sequences + - id: gen_ai.request.stop_sequences stability: experimental type: string[] brief: List of sequences that the model will use to stop generating further tokens. examples: ['forest', 'lived'] - - id: request.frequency_penalty + - id: gen_ai.request.frequency_penalty stability: experimental type: double brief: The frequency penalty setting for the GenAI request. examples: [0.1] - - id: request.presence_penalty + - id: gen_ai.request.presence_penalty stability: experimental type: double brief: The presence penalty setting for the GenAI request. examples: [0.1] - - id: response.id + - id: gen_ai.response.id stability: experimental type: string brief: The unique identifier for the completion. examples: ['chatcmpl-123'] - - id: response.model + - id: gen_ai.response.model stability: experimental type: string brief: The name of the model that generated the response. examples: ['gpt-4-0613'] - - id: response.finish_reasons + - id: gen_ai.response.finish_reasons stability: experimental type: string[] brief: Array of reasons the model stopped generating tokens, corresponding to each generation received. examples: ['stop'] - - id: usage.input_tokens + - id: gen_ai.usage.input_tokens stability: experimental type: int brief: The number of tokens used in the GenAI input (prompt). examples: [100] - - id: usage.output_tokens + - id: gen_ai.usage.output_tokens stability: experimental type: int brief: The number of tokens used in the GenAI response (completion). examples: [180] - - id: token.type + - id: gen_ai.token.type stability: experimental type: members: @@ -118,19 +116,19 @@ groups: brief: 'Output tokens (completion, response, etc.)' brief: The type of token being counted. examples: ['input', 'output'] - - id: prompt + - id: gen_ai.prompt stability: experimental type: string brief: The full prompt sent to the GenAI model. note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) examples: ["[{'role': 'user', 'content': 'What is the capital of France?'}]"] - - id: completion + - id: gen_ai.completion stability: experimental type: string brief: The full response received from the GenAI model. note: It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) examples: ["[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"] - - id: operation.name + - id: gen_ai.operation.name stability: experimental type: members: diff --git a/model/registry/go.yaml b/model/registry/go.yaml index 2c3727d5c7..5814394ca6 100644 --- a/model/registry/go.yaml +++ b/model/registry/go.yaml @@ -2,14 +2,12 @@ groups: - id: registry.go type: attribute_group display_name: Go Attributes - prefix: go brief: > This document defines Go related attributes. attributes: - - id: memory.type + - id: go.memory.type stability: experimental type: - allow_custom_values: false members: - id: stack value: 'stack' diff --git a/model/registry/graphql.yaml b/model/registry/graphql.yaml index ca015d017f..acb5e312e7 100644 --- a/model/registry/graphql.yaml +++ b/model/registry/graphql.yaml @@ -1,20 +1,18 @@ groups: - id: registry.graphql - prefix: graphql type: attribute_group display_name: GraphQL Attributes brief: 'This document defines attributes for GraphQL.' attributes: - - id: operation.name + - id: graphql.operation.name brief: "The name of the operation being executed." type: string stability: experimental examples: 'findBookById' - - id: operation.type + - id: graphql.operation.type brief: "The type of the operation being executed." stability: experimental type: - allow_custom_values: false members: - id: query value: "query" @@ -29,7 +27,7 @@ groups: brief: "GraphQL subscription" stability: experimental examples: ['query', 'mutation', 'subscription'] - - id: document + - id: graphql.document brief: "The GraphQL document being executed." type: string stability: experimental diff --git a/model/registry/heroku.yaml b/model/registry/heroku.yaml index f9ff7a85e2..8ec5f9e1a2 100644 --- a/model/registry/heroku.yaml +++ b/model/registry/heroku.yaml @@ -1,24 +1,23 @@ groups: - id: registry.heroku - prefix: heroku type: attribute_group display_name: Heroku Attributes brief: > This document defines attributes for the Android platform on which the Android application is running. attributes: - - id: release.creation_timestamp + - id: heroku.release.creation_timestamp type: string stability: experimental brief: > Time and date the release was created examples: [ '2022-10-23T18:00:42Z' ] - - id: release.commit + - id: heroku.release.commit type: string stability: experimental brief: > Commit hash for the current release examples: [ 'e6134959463efd8966b20e75b913cafe3f5ec' ] - - id: app.id + - id: heroku.app.id type: string stability: experimental brief: > diff --git a/model/registry/host.yaml b/model/registry/host.yaml index fd2d3db9e1..201f622f7d 100644 --- a/model/registry/host.yaml +++ b/model/registry/host.yaml @@ -1,12 +1,11 @@ groups: - id: registry.host - prefix: host type: attribute_group display_name: Host Attributes brief: > A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. attributes: - - id: id + - id: host.id type: string stability: experimental brief: > @@ -14,7 +13,7 @@ groups: For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. examples: ['fdbf79e8af94cb7f9e8df36789187052'] - - id: name + - id: host.name type: string stability: experimental brief: > @@ -22,15 +21,14 @@ groups: command returns, or the fully qualified hostname, or another name specified by the user. examples: ['opentelemetry-test'] - - id: type + - id: host.type type: string stability: experimental brief: > Type of host. For Cloud, this must be the machine type. examples: ['n1-standard-1'] - - id: arch + - id: host.arch type: - allow_custom_values: true members: - id: amd64 value: 'amd64' @@ -67,26 +65,26 @@ groups: stability: experimental brief: > The CPU architecture the host system is running on. - - id: image.name + - id: host.image.name type: string stability: experimental brief: > Name of the VM image or OS install the host was instantiated from. examples: ['infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'] - - id: image.id + - id: host.image.id stability: experimental type: string brief: > VM image ID or host OS image ID. For Cloud, this value is from the provider. examples: ['ami-07b06b442921831e5'] - - id: image.version + - id: host.image.version stability: experimental type: string brief: > The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). examples: ['0.1'] - - id: ip + - id: host.ip stability: experimental type: string[] brief: > @@ -95,7 +93,7 @@ groups: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. examples: ["192.168.1.140", "fe80::abc2:4a28:737a:609e"] - - id: mac + - id: host.mac stability: experimental type: string[] brief: > @@ -104,7 +102,7 @@ groups: MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant. examples: ['AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'] - - id: cpu.vendor.id + - id: host.cpu.vendor.id stability: experimental type: string brief: > @@ -113,32 +111,32 @@ groups: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. examples: [ 'GenuineIntel' ] - - id: cpu.family + - id: host.cpu.family stability: experimental type: string brief: > Family or generation of the CPU. examples: [ '6', 'PA-RISC 1.1e' ] - - id: cpu.model.id + - id: host.cpu.model.id stability: experimental type: string brief: > Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. examples: [ '6', '9000/778/B180L' ] - - id: cpu.model.name + - id: host.cpu.model.name stability: experimental type: string brief: > Model designation of the processor. examples: [ '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' ] - - id: cpu.stepping + - id: host.cpu.stepping stability: experimental type: string brief: > Stepping or core revisions. examples: ["1", "r1p1"] - - id: cpu.cache.l2.size + - id: host.cpu.cache.l2.size stability: experimental type: int brief: > diff --git a/model/registry/http.yaml b/model/registry/http.yaml index 71583d4767..ff0a002d39 100644 --- a/model/registry/http.yaml +++ b/model/registry/http.yaml @@ -1,11 +1,10 @@ groups: - id: registry.http - prefix: http type: attribute_group display_name: HTTP Attributes brief: 'This document defines semantic convention attributes in the HTTP namespace.' attributes: - - id: request.body.size + - id: http.request.body.size type: int brief: > The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and @@ -13,7 +12,7 @@ groups: header. For requests using transport encoding, this should be the compressed size. examples: 3495 stability: experimental # this should not be marked stable with other HTTP attributes - - id: request.header + - id: http.request.header stability: stable type: template[string[]] brief: > @@ -29,10 +28,9 @@ groups: or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. examples: ['http.request.header.content-type=["application/json"]', 'http.request.header.x-forwarded-for=["1.2.3.4", "1.2.3.5"]'] - - id: request.method + - id: http.request.method stability: stable type: - allow_custom_values: true members: - id: connect value: "CONNECT" @@ -91,12 +89,12 @@ groups: HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value. - - id: request.method_original + - id: http.request.method_original stability: stable type: string brief: Original HTTP method sent by the client in the request line. examples: ["GeT", "ACL", "foo"] - - id: request.resend_count + - id: http.request.resend_count stability: stable type: int brief: > @@ -106,14 +104,14 @@ groups: was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). examples: 3 - - id: request.size + - id: http.request.size type: int brief: > The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any. examples: 1437 stability: experimental - - id: response.body.size + - id: http.response.body.size type: int brief: > The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and @@ -121,7 +119,7 @@ groups: header. For requests using transport encoding, this should be the compressed size. examples: 3495 stability: experimental # this should not be marked stable with other HTTP attributes - - id: response.header + - id: http.response.header stability: stable type: template[string[]] brief: > @@ -136,19 +134,19 @@ groups: or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. examples: ['http.response.header.content-type=["application/json"]', 'http.response.header.my-custom-header=["abc", "def"]'] - - id: response.size + - id: http.response.size type: int brief: > The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any. examples: 1437 stability: experimental - - id: response.status_code + - id: http.response.status_code stability: stable type: int brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).' examples: [200] - - id: route + - id: http.route stability: stable type: string brief: > @@ -158,9 +156,8 @@ groups: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. - - id: connection.state + - id: http.connection.state type: - allow_custom_values: true members: - id: active value: "active" diff --git a/model/registry/jvm.yaml b/model/registry/jvm.yaml index 9ec093f5fe..4a515d9714 100644 --- a/model/registry/jvm.yaml +++ b/model/registry/jvm.yaml @@ -2,11 +2,10 @@ groups: - id: registry.jvm type: attribute_group display_name: Java Virtual Machine (JVM) Attributes - prefix: jvm brief: > This document defines Java Virtual machine related attributes. attributes: - - id: gc.action + - id: jvm.gc.action stability: stable type: string brief: Name of the garbage collector action. @@ -14,7 +13,7 @@ groups: note: > Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). - - id: gc.name + - id: jvm.gc.name stability: stable type: string brief: Name of the garbage collector. @@ -22,10 +21,9 @@ groups: note: > Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). - - id: memory.type + - id: jvm.memory.type stability: stable type: - allow_custom_values: false members: - id: heap value: 'heap' @@ -37,7 +35,7 @@ groups: stability: stable brief: The type of memory. examples: ["heap", "non_heap"] - - id: memory.pool.name + - id: jvm.memory.pool.name stability: stable type: string brief: Name of the memory pool. @@ -45,16 +43,15 @@ groups: note: > Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). - - id: thread.daemon + - id: jvm.thread.daemon stability: stable type: boolean brief: "Whether the thread is daemon or not." - - id: thread.state + - id: jvm.thread.state stability: stable brief: "State of the thread." examples: ["runnable", "blocked"] type: - allow_custom_values: false members: - id: new value: 'new' @@ -80,7 +77,7 @@ groups: value: 'terminated' brief: 'A thread that has exited is in this state.' stability: stable - - id: buffer.pool.name + - id: jvm.buffer.pool.name type: string stability: experimental brief: Name of the buffer pool. diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index 50f38b3132..42da6ab238 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -1,18 +1,17 @@ groups: - id: registry.k8s - prefix: k8s type: attribute_group display_name: Kubernetes Attributes brief: > Kubernetes resource attributes. attributes: - - id: cluster.name + - id: k8s.cluster.name type: string stability: experimental brief: > The name of the cluster. examples: ['opentelemetry-cluster'] - - id: cluster.uid + - id: k8s.cluster.uid type: string stability: experimental brief: > @@ -42,49 +41,49 @@ groups: Therefore, UIDs between clusters should be extremely unlikely to conflict. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: node.name + - id: k8s.node.name type: string stability: experimental brief: > The name of the Node. examples: ['node-1'] - - id: node.uid + - id: k8s.node.uid type: string stability: experimental brief: > The UID of the Node. examples: ['1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'] - - id: namespace.name + - id: k8s.namespace.name type: string stability: experimental brief: > The name of the namespace that the pod is running in. examples: ['default'] - - id: pod.uid + - id: k8s.pod.uid type: string stability: experimental brief: > The UID of the Pod. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: pod.name + - id: k8s.pod.name type: string stability: experimental brief: > The name of the Pod. examples: ['opentelemetry-pod-autoconf'] - - id: pod.label + - id: k8s.pod.label type: template[string] stability: experimental brief: > The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. examples: ['k8s.pod.label.app=my-app', 'k8s.pod.label.mycompany.io/arch=x64', 'k8s.pod.label.data='] - - id: pod.annotation + - id: k8s.pod.annotation type: template[string] stability: experimental brief: > The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. examples: [ 'k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true', 'k8s.pod.annotation.mycompany.io/arch=x64', 'k8s.pod.annotation.data=' ] - - id: container.name + - id: k8s.container.name type: string stability: experimental brief: > @@ -92,87 +91,87 @@ groups: within a Pod. Container runtime usually uses different globally unique name (`container.name`). examples: ['redis'] - - id: container.restart_count + - id: k8s.container.restart_count type: int stability: experimental brief: > Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. - - id: container.status.last_terminated_reason + - id: k8s.container.status.last_terminated_reason type: string stability: experimental brief: > Last terminated reason of the Container. examples: ["Evicted", "Error"] - - id: replicaset.uid + - id: k8s.replicaset.uid type: string stability: experimental brief: > The UID of the ReplicaSet. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: replicaset.name + - id: k8s.replicaset.name type: string stability: experimental brief: > The name of the ReplicaSet. examples: ['opentelemetry'] - - id: deployment.uid + - id: k8s.deployment.uid type: string stability: experimental brief: > The UID of the Deployment. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: deployment.name + - id: k8s.deployment.name type: string stability: experimental brief: > The name of the Deployment. examples: ['opentelemetry'] - - id: statefulset.uid + - id: k8s.statefulset.uid type: string stability: experimental brief: > The UID of the StatefulSet. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: statefulset.name + - id: k8s.statefulset.name type: string stability: experimental brief: > The name of the StatefulSet. examples: ['opentelemetry'] - - id: daemonset.uid + - id: k8s.daemonset.uid type: string stability: experimental brief: > The UID of the DaemonSet. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: daemonset.name + - id: k8s.daemonset.name type: string stability: experimental brief: > The name of the DaemonSet. examples: ['opentelemetry'] - - id: job.uid + - id: k8s.job.uid type: string stability: experimental brief: > The UID of the Job. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: job.name + - id: k8s.job.name type: string stability: experimental brief: > The name of the Job. examples: ['opentelemetry'] - - id: cronjob.uid + - id: k8s.cronjob.uid type: string stability: experimental brief: > The UID of the CronJob. examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'] - - id: cronjob.name + - id: k8s.cronjob.name type: string stability: experimental brief: > diff --git a/model/registry/linux.yaml b/model/registry/linux.yaml index a0f7caef79..a3bf3f1554 100644 --- a/model/registry/linux.yaml +++ b/model/registry/linux.yaml @@ -1,11 +1,10 @@ groups: # linux.memory.* attribute group - id: registry.linux.memory - prefix: linux.memory type: attribute_group brief: "Describes Linux Memory attributes" attributes: - - id: slab.state + - id: linux.memory.slab.state type: members: - id: reclaimable diff --git a/model/registry/log.yaml b/model/registry/log.yaml index 399ec35b6b..01d592329e 100644 --- a/model/registry/log.yaml +++ b/model/registry/log.yaml @@ -2,16 +2,14 @@ groups: - id: registry.log type: attribute_group display_name: General Log Attributes - prefix: log brief: > This document defines log attributes attributes: - - id: iostream + - id: log.iostream stability: experimental brief: > The stream associated with the log. See below for a list of well-known values. type: - allow_custom_values: true members: - id: stdout value: 'stdout' @@ -25,29 +23,28 @@ groups: - id: registry.log.file # TODO: should we move it to the file model? type: attribute_group display_name: Log File Attributes - prefix: log.file brief: > Attributes for a file to which log was emitted. attributes: - - id: name + - id: log.file.name type: string stability: experimental brief: > The basename of the file. examples: [ "audit.log" ] - - id: path + - id: log.file.path type: string stability: experimental brief: > The full path to the file. examples: [ "/var/log/mysql/audit.log" ] - - id: name_resolved + - id: log.file.name_resolved type: string stability: experimental brief: > The basename of the file, with symlinks resolved. examples: [ "uuid.log" ] - - id: path_resolved + - id: log.file.path_resolved type: string stability: experimental brief: > @@ -57,11 +54,10 @@ groups: - id: registry.log.record type: attribute_group display_name: Log Record Attributes - prefix: log.record brief: > This document defines the generic attributes that may be used in any Log Record. attributes: - - id: uid + - id: log.record.uid type: string stability: experimental brief: > @@ -73,7 +69,7 @@ groups: The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. examples: ["01ARZ3NDEKTSV4RRFFQ69G5FAV"] - - id: original + - id: log.record.original type: string stability: experimental brief: > diff --git a/model/registry/messaging.yaml b/model/registry/messaging.yaml index f17e8cb5bd..e57cd0f5ef 100644 --- a/model/registry/messaging.yaml +++ b/model/registry/messaging.yaml @@ -1,11 +1,10 @@ groups: - id: registry.messaging - prefix: messaging type: attribute_group display_name: General Messaging Attributes brief: 'Attributes describing telemetry around messaging systems and messaging activities.' attributes: - - id: batch.message_count + - id: messaging.batch.message_count type: int stability: experimental brief: The number of messages sent, received, or processed in the scope of the batching operation. @@ -14,13 +13,13 @@ groups: When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs. examples: [0, 1, 2] - - id: client.id + - id: messaging.client.id type: string stability: experimental brief: > A unique identifier for the client that consumes or produces a message. examples: ['client-5', 'myhost@8742@s8083jm'] - - id: consumer.group.name + - id: messaging.consumer.group.name type: string stability: experimental brief: > @@ -29,7 +28,7 @@ groups: Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. examples: ['my-group', 'indexer'] - - id: destination.name + - id: messaging.destination.name type: string stability: experimental brief: 'The message destination name' @@ -38,7 +37,7 @@ groups: the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. examples: ['MyQueue', 'MyTopic'] tag: messaging-generic - - id: destination.subscription.name + - id: messaging.destination.subscription.name type: string stability: experimental brief: 'The name of the destination subscription from which a message is consumed.' @@ -46,7 +45,7 @@ groups: Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. examples: ['subscription-a'] - - id: destination.template + - id: messaging.destination.template type: string stability: experimental brief: Low cardinality representation of the messaging destination name @@ -57,28 +56,28 @@ groups: the underlying template is of low cardinality and can be effectively used for grouping and aggregation. examples: ['/customers/{customerId}'] - - id: destination.anonymous + - id: messaging.destination.anonymous type: boolean stability: experimental brief: 'A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).' - - id: destination.temporary + - id: messaging.destination.temporary type: boolean stability: experimental brief: 'A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.' - - id: destination.partition.id + - id: messaging.destination.partition.id type: string stability: experimental brief: > The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. examples: '1' - - id: message.conversation_id + - id: messaging.message.conversation_id type: string stability: experimental brief: > The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". examples: 'MyConversationId' - - id: message.envelope.size + - id: messaging.message.envelope.size type: int stability: experimental brief: > @@ -87,12 +86,12 @@ groups: This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed size should be used. examples: 2738 - - id: message.id + - id: messaging.message.id type: string stability: experimental brief: 'A value used by the messaging system as an identifier for the message, represented as a string.' examples: '452a7c7c7c7048c2f887f61572b18fc2' - - id: message.body.size + - id: messaging.message.body.size type: int stability: experimental brief: > @@ -101,9 +100,8 @@ groups: This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed body size should be used. examples: 1439 - - id: operation.type + - id: messaging.operation.type type: - allow_custom_values: true members: - id: publish value: "publish" @@ -143,20 +141,19 @@ groups: brief: > A string identifying the type of the messaging operation. note: If a custom value is used, it MUST be of low cardinality. - - id: operation.name + - id: messaging.operation.name type: string stability: experimental brief: > The system-specific name of the messaging operation. examples: [ "ack", "nack", "send" ] - - id: system + - id: messaging.system brief: The messaging system as identified by the client instrumentation. note: > The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge. type: - allow_custom_values: true members: - id: activemq value: 'activemq' @@ -204,13 +201,12 @@ groups: stability: experimental stability: experimental - id: registry.messaging.kafka - prefix: messaging type: attribute_group display_name: Kafka Attributes brief: > This group describes attributes specific to Apache Kafka. attributes: - - id: kafka.message.key + - id: messaging.kafka.message.key type: string stability: experimental brief: > @@ -221,45 +217,42 @@ groups: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. examples: 'myKey' - - id: kafka.offset + - id: messaging.kafka.offset type: int stability: experimental brief: > The offset of a record in the corresponding Kafka partition. examples: 42 - - id: kafka.message.tombstone + - id: messaging.kafka.message.tombstone type: boolean stability: experimental brief: 'A boolean that is true if the message is a tombstone.' - id: registry.messaging.rabbitmq - prefix: messaging type: attribute_group display_name: RabbitMQ Attributes brief: > This group describes attributes specific to RabbitMQ. attributes: - - id: rabbitmq.destination.routing_key + - id: messaging.rabbitmq.destination.routing_key type: string stability: experimental brief: > RabbitMQ message routing key. examples: 'myKey' - - id: rabbitmq.message.delivery_tag + - id: messaging.rabbitmq.message.delivery_tag type: int stability: experimental brief: > RabbitMQ message delivery tag examples: 123 - id: registry.messaging.rocketmq - prefix: messaging type: attribute_group display_name: RocketMQ Attributes brief: > This group describes attributes specific to RocketMQ. attributes: - - id: rocketmq.consumption_model + - id: messaging.rocketmq.consumption_model type: - allow_custom_values: false members: - id: clustering value: 'clustering' @@ -272,39 +265,38 @@ groups: stability: experimental brief: > Model of message consumption. This only applies to consumer spans. - - id: rocketmq.message.delay_time_level + - id: messaging.rocketmq.message.delay_time_level type: int stability: experimental brief: > The delay time level for delay message, which determines the message delay time. examples: 3 - - id: rocketmq.message.delivery_timestamp + - id: messaging.rocketmq.message.delivery_timestamp type: int stability: experimental brief: > The timestamp in milliseconds that the delay message is expected to be delivered to consumer. examples: 1665987217045 - - id: rocketmq.message.group + - id: messaging.rocketmq.message.group type: string stability: experimental brief: > It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. examples: 'myMessageGroup' - - id: rocketmq.message.keys + - id: messaging.rocketmq.message.keys type: string[] stability: experimental brief: > Key(s) of message, another way to mark message besides message id. examples: ['keyA', 'keyB'] - - id: rocketmq.message.tag + - id: messaging.rocketmq.message.tag type: string stability: experimental brief: > The secondary classifier of message besides topic. examples: tagA - - id: rocketmq.message.type + - id: messaging.rocketmq.message.type type: - allow_custom_values: false members: - id: normal value: 'normal' @@ -325,67 +317,64 @@ groups: stability: experimental brief: > Type of message. - - id: rocketmq.namespace + - id: messaging.rocketmq.namespace type: string stability: experimental brief: > Namespace of RocketMQ resources, resources in different namespaces are individual. examples: 'myNamespace' - id: registry.messaging.gcp_pubsub - prefix: messaging type: attribute_group display_name: GCP Pub/Sub Attributes brief: > This group describes attributes specific to GCP Pub/Sub. attributes: - - id: gcp_pubsub.message.ordering_key + - id: messaging.gcp_pubsub.message.ordering_key type: string stability: experimental brief: > The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. examples: 'ordering_key' - - id: gcp_pubsub.message.ack_id + - id: messaging.gcp_pubsub.message.ack_id type: string stability: experimental brief: > The ack id for a given message. examples: 'ack_id' - - id: gcp_pubsub.message.ack_deadline + - id: messaging.gcp_pubsub.message.ack_deadline type: int stability: experimental brief: > The ack deadline in seconds set for the modify ack deadline request. examples: 10 - - id: gcp_pubsub.message.delivery_attempt + - id: messaging.gcp_pubsub.message.delivery_attempt type: int stability: experimental brief: > The delivery attempt for a given message. examples: 2 - id: registry.messaging.servicebus - prefix: messaging type: attribute_group display_name: Azure Service Bus Attributes brief: > This group describes attributes specific to Azure Service Bus. attributes: - - id: servicebus.message.delivery_count + - id: messaging.servicebus.message.delivery_count type: int stability: experimental brief: > Number of deliveries that have been attempted for this message. examples: 2 - - id: servicebus.message.enqueued_time + - id: messaging.servicebus.message.enqueued_time type: int stability: experimental brief: > The UTC epoch seconds at which the message has been accepted and stored in the entity. examples: 1701393730 - - id: servicebus.disposition_status + - id: messaging.servicebus.disposition_status brief: > Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). type: - allow_custom_values: true members: - id: complete value: 'complete' @@ -405,13 +394,12 @@ groups: stability: experimental stability: experimental - id: registry.messaging.eventhubs - prefix: messaging type: attribute_group display_name: Azure Event Hubs Attributes brief: > This group describes attributes specific to Azure Event Hubs. attributes: - - id: eventhubs.message.enqueued_time + - id: messaging.eventhubs.message.enqueued_time type: int stability: experimental brief: > diff --git a/model/registry/network.yaml b/model/registry/network.yaml index 847a64c94d..8470277023 100644 --- a/model/registry/network.yaml +++ b/model/registry/network.yaml @@ -1,34 +1,32 @@ groups: - id: registry.network - prefix: network type: attribute_group display_name: Network Attributes brief: > These attributes may be used for any network related operation. attributes: - - id: carrier.icc + - id: network.carrier.icc type: string stability: experimental brief: "The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network." examples: "DE" - - id: carrier.mcc + - id: network.carrier.mcc type: string stability: experimental brief: "The mobile carrier country code." examples: "310" - - id: carrier.mnc + - id: network.carrier.mnc type: string stability: experimental brief: "The mobile carrier network code." examples: "001" - - id: carrier.name + - id: network.carrier.name type: string stability: experimental brief: "The name of the mobile carrier." examples: "sprint" - - id: connection.subtype + - id: network.connection.subtype type: - allow_custom_values: true members: - id: gprs brief: GPRS @@ -117,9 +115,8 @@ groups: stability: experimental brief: 'This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.' examples: 'LTE' - - id: connection.type + - id: network.connection.type type: - allow_custom_values: true members: - id: wifi value: "wifi" @@ -139,33 +136,33 @@ groups: stability: experimental brief: 'The internet connection type.' examples: 'wifi' - - id: local.address + - id: network.local.address stability: stable type: string brief: Local address of the network connection - IP address or Unix domain socket name. examples: ['10.1.2.80', '/tmp/my.sock'] - - id: local.port + - id: network.local.port stability: stable type: int brief: Local port number of the network connection. examples: [65123] - - id: peer.address + - id: network.peer.address stability: stable type: string brief: Peer address of the network connection - IP address or Unix domain socket name. examples: ['10.1.2.80', '/tmp/my.sock'] - - id: peer.port + - id: network.peer.port stability: stable type: int brief: Peer port number of the network connection. examples: [65123] - - id: protocol.name + - id: network.protocol.name stability: stable type: string brief: '[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent.' note: The value SHOULD be normalized to lowercase. examples: ['amqp', 'http', 'mqtt'] - - id: protocol.version + - id: network.protocol.version stability: stable type: string brief: The actual version of the protocol used for network communication. @@ -174,10 +171,9 @@ groups: If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set. - - id: transport + - id: network.transport stability: stable type: - allow_custom_values: true members: - id: tcp value: 'tcp' @@ -209,10 +205,9 @@ groups: a port number is ambiguous without knowing the transport. For example different processes could be listening on TCP port 12345 and UDP port 12345. examples: ['tcp', 'udp'] - - id: type + - id: network.type stability: stable type: - allow_custom_values: true members: - id: ipv4 value: 'ipv4' @@ -225,9 +220,8 @@ groups: brief: '[OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent.' note: The value SHOULD be normalized to lowercase. examples: ['ipv4', 'ipv6'] - - id: io.direction + - id: network.io.direction type: - allow_custom_values: false members: - id: transmit value: 'transmit' diff --git a/model/registry/oci.yaml b/model/registry/oci.yaml index da0ce6dace..aa5092a983 100644 --- a/model/registry/oci.yaml +++ b/model/registry/oci.yaml @@ -1,12 +1,11 @@ groups: - id: registry.oci.manifest - prefix: oci.manifest type: attribute_group display_name: Open Container Initiative (OCI) Attributes brief: > An OCI image manifest. attributes: - - id: digest + - id: oci.manifest.digest type: string stability: experimental brief: > diff --git a/model/registry/opentracing.yaml b/model/registry/opentracing.yaml index c5cafc291e..49d20dcb44 100644 --- a/model/registry/opentracing.yaml +++ b/model/registry/opentracing.yaml @@ -1,17 +1,15 @@ groups: - id: registry.opentracing - prefix: opentracing type: attribute_group display_name: OpenTracing Attributes brief: Attributes used by the OpenTracing Shim layer. attributes: - - id: ref_type + - id: opentracing.ref_type brief: 'Parent-child Reference type' stability: experimental note: > The causal relationship between a child Span and a parent Span. type: - allow_custom_values: true members: - id: child_of value: 'child_of' diff --git a/model/registry/os.yaml b/model/registry/os.yaml index 18b59568a0..b9e4f24c2e 100644 --- a/model/registry/os.yaml +++ b/model/registry/os.yaml @@ -1,6 +1,5 @@ groups: - id: registry.os - prefix: os type: attribute_group display_name: Operating System Attributes brief: > @@ -9,9 +8,8 @@ groups: 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. attributes: - - id: type + - id: os.type type: - allow_custom_values: true members: - id: windows value: 'windows' @@ -60,26 +58,26 @@ groups: brief: > The operating system type. stability: experimental - - id: description + - id: os.description type: string stability: experimental brief: > Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. examples: ['Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS'] - - id: name + - id: os.name type: string stability: experimental brief: 'Human readable operating system name.' examples: ['iOS', 'Android', 'Ubuntu'] - - id: version + - id: os.version type: string stability: experimental brief: > The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). examples: ['14.2.1', '18.04.1'] - - id: build_id + - id: os.build_id type: string stability: experimental brief: 'Unique identifier for a particular build or compilation of the operating system.' diff --git a/model/registry/otel.yaml b/model/registry/otel.yaml index 8ed9405a58..01b1a19a8c 100644 --- a/model/registry/otel.yaml +++ b/model/registry/otel.yaml @@ -1,13 +1,11 @@ groups: - id: registry.otel - prefix: otel type: attribute_group display_name: OTel Attributes brief: Attributes reserved for OpenTelemetry attributes: - - id: status_code + - id: otel.status_code type: - allow_custom_values: true members: - id: ok value: OK @@ -19,23 +17,22 @@ groups: stability: stable brief: Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. stability: stable - - id: status_description + - id: otel.status_description type: string brief: "Description of the Status if it has a value, otherwise not set." examples: ['resource not found'] stability: stable - id: registry.otel.scope - prefix: otel.scope type: attribute_group display_name: OTel Scope Attributes brief: Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. attributes: - - id: name + - id: otel.scope.name type: string brief: The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). examples: ['io.opentelemetry.contrib.mongodb'] stability: stable - - id: version + - id: otel.scope.version type: string brief: The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). examples: ['1.0.0'] diff --git a/model/registry/peer.yaml b/model/registry/peer.yaml index ee9d3f722f..62568e8512 100644 --- a/model/registry/peer.yaml +++ b/model/registry/peer.yaml @@ -2,11 +2,10 @@ groups: - id: registry.peer type: attribute_group display_name: Peer Attributes - prefix: peer brief: > Operations that access some remote service. attributes: - - id: service + - id: peer.service type: string stability: experimental brief: > diff --git a/model/registry/process.yaml b/model/registry/process.yaml index bc8362357d..596972a3b1 100644 --- a/model/registry/process.yaml +++ b/model/registry/process.yaml @@ -1,24 +1,23 @@ groups: - id: registry.process - prefix: process type: attribute_group display_name: Process Attributes brief: > An operating system process. attributes: - - id: pid + - id: process.pid type: int stability: experimental brief: > Process identifier (PID). examples: [1234] - - id: parent_pid + - id: process.parent_pid type: int stability: experimental brief: > Parent Process identifier (PPID). examples: [111] - - id: vpid + - id: process.vpid type: int stability: experimental brief: > @@ -28,21 +27,21 @@ groups: across all processes on the host but it is unique within the process namespace that the process exists within. examples: [12] - - id: session_leader.pid + - id: process.session_leader.pid type: int stability: experimental brief: > The PID of the process's session leader. This is also the session ID (SID) of the process. examples: [14] - - id: group_leader.pid + - id: process.group_leader.pid type: int stability: experimental brief: > The PID of the process's group leader. This is also the process group ID (PGID) of the process. examples: [23] - - id: executable.name + - id: process.executable.name type: string stability: experimental brief: > @@ -50,7 +49,7 @@ groups: to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. examples: ['otelcol'] - - id: executable.path + - id: process.executable.path type: string stability: experimental brief: > @@ -58,7 +57,7 @@ groups: be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. examples: ['/usr/bin/cmd/otelcol'] - - id: command + - id: process.command type: string stability: experimental brief: > @@ -66,7 +65,7 @@ groups: 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`. examples: ['cmd/otelcol'] - - id: command_line + - id: process.command_line type: string stability: experimental brief: > @@ -75,7 +74,7 @@ groups: Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. examples: ['C:\cmd\otecol --config="my directory\config.yaml"'] - - id: command_args + - id: process.command_args type: string[] stability: experimental brief: > @@ -85,95 +84,94 @@ groups: null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. examples: ['cmd/otecol', '--config=config.yaml'] - - id: owner + - id: process.owner type: string stability: experimental brief: > The username of the user that owns the process. examples: ['root'] - - id: user.id + - id: process.user.id type: int stability: experimental brief: > The effective user ID (EUID) of the process. examples: [1001] - - id: user.name + - id: process.user.name type: string stability: experimental brief: > The username of the effective user of the process. examples: ['root'] - - id: real_user.id + - id: process.real_user.id type: int stability: experimental brief: > The real user ID (RUID) of the process. examples: [1000] - - id: real_user.name + - id: process.real_user.name type: string stability: experimental brief: > The username of the real user of the process. examples: ['operator'] - - id: saved_user.id + - id: process.saved_user.id type: int stability: experimental brief: > The saved user ID (SUID) of the process. examples: [1002] - - id: saved_user.name + - id: process.saved_user.name type: string stability: experimental brief: > The username of the saved user. examples: ['operator'] - - id: runtime.name + - id: process.runtime.name type: string stability: experimental brief: > The name of the runtime of this process. examples: ['OpenJDK Runtime Environment'] - - id: runtime.version + - id: process.runtime.version type: string stability: experimental brief: > The version of the runtime of this process, as returned by the runtime without modification. examples: '14.0.2' - - id: runtime.description + - id: process.runtime.description type: string stability: experimental brief: > An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - - id: creation.time + - id: process.creation.time type: string stability: experimental brief: > The date and time the process was created, in ISO 8601 format. examples: ['2023-11-21T09:25:34.853Z'] - - id: exit.time + - id: process.exit.time type: string stability: experimental brief: > The date and time the process exited, in ISO 8601 format. examples: ['2023-11-21T09:26:12.315Z'] - - id: exit.code + - id: process.exit.code type: int stability: experimental brief: > The exit code of the process. examples: [127] - - id: interactive + - id: process.interactive type: boolean stability: experimental brief: > Whether the process is connected to an interactive shell. - - id: context_switch_type + - id: process.context_switch_type brief: "Specifies whether the context switches for this data point were voluntary or involuntary." type: - allow_custom_values: true members: - id: voluntary value: 'voluntary' @@ -182,12 +180,11 @@ groups: value: 'involuntary' stability: experimental stability: experimental - - id: paging.fault_type + - id: process.paging.fault_type brief: > The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. type: - allow_custom_values: true members: - id: major value: 'major' diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 8e04df3224..a94c3b2534 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -1,11 +1,10 @@ groups: - id: registry.rpc - prefix: rpc type: attribute_group display_name: Remote Procedure Call (RPC) Attributes brief: 'This document defines attributes for remote procedure calls.' attributes: - - id: connect_rpc.error_code + - id: rpc.connect_rpc.error_code type: members: - id: cancelled @@ -58,7 +57,7 @@ groups: stability: experimental stability: experimental brief: "The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values." - - id: connect_rpc.request.metadata + - id: rpc.connect_rpc.request.metadata type: template[string[]] stability: experimental brief: > @@ -67,7 +66,7 @@ groups: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. examples: ['rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]'] - - id: connect_rpc.response.metadata + - id: rpc.connect_rpc.response.metadata type: template[string[]] stability: experimental brief: > @@ -76,7 +75,7 @@ groups: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. examples: ['rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]'] - - id: grpc.status_code + - id: rpc.grpc.status_code type: members: - id: ok @@ -149,7 +148,7 @@ groups: value: 16 stability: experimental brief: "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request." - - id: grpc.request.metadata + - id: rpc.grpc.request.metadata type: template[string[]] stability: experimental brief: > @@ -158,7 +157,7 @@ groups: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. examples: ['rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]'] - - id: grpc.response.metadata + - id: rpc.grpc.response.metadata type: template[string[]] stability: experimental brief: > @@ -167,17 +166,17 @@ groups: Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. examples: ['rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]'] - - id: jsonrpc.error_code + - id: rpc.jsonrpc.error_code type: int stability: experimental brief: "`error.code` property of response if it is an error response." examples: [-32700, 100] - - id: jsonrpc.error_message + - id: rpc.jsonrpc.error_message type: string stability: experimental brief: "`error.message` property of response if it is an error response." examples: ['Parse error', 'User already exists'] - - id: jsonrpc.request_id + - id: rpc.jsonrpc.request_id type: string stability: experimental brief: > @@ -186,12 +185,12 @@ groups: value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. examples: ['10', 'request-7', ''] - - id: jsonrpc.version + - id: rpc.jsonrpc.version type: string stability: experimental brief: "Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted." examples: ['2.0', '1.0'] - - id: method + - id: rpc.method type: string stability: experimental brief: 'The name of the (logical) method being called, must be equal to the $method part in the span name.' @@ -202,7 +201,7 @@ groups: (e.g., method actually executing the call on the server side, RPC client stub method on the client side). examples: "exampleMethod" - - id: service + - id: rpc.service type: string stability: experimental brief: 'The full (logical) name of the service being called, including its package name, if applicable.' @@ -214,10 +213,9 @@ groups: e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). examples: "myservice.EchoService" - - id: system + - id: rpc.system brief: 'A string identifying the remoting system. See below for a list of well-known identifiers.' type: - allow_custom_values: true members: - id: grpc value: 'grpc' @@ -240,7 +238,7 @@ groups: brief: 'Connect RPC' stability: experimental stability: experimental - - id: message.type + - id: rpc.message.type type: members: - id: sent @@ -251,16 +249,16 @@ groups: stability: experimental stability: experimental brief: "Whether this is a received or sent message." - - id: message.id + - id: rpc.message.id type: int stability: experimental brief: "MUST be calculated as two different counters starting from `1` one for sent messages and one for received message." note: "This way we guarantee that the values will be consistent between different implementations." - - id: message.compressed_size + - id: rpc.message.compressed_size type: int stability: experimental brief: "Compressed size of the message in bytes." - - id: message.uncompressed_size + - id: rpc.message.uncompressed_size type: int stability: experimental brief: "Uncompressed size of the message in bytes." diff --git a/model/registry/server.yaml b/model/registry/server.yaml index 9da2b85ae1..a522976ac6 100644 --- a/model/registry/server.yaml +++ b/model/registry/server.yaml @@ -1,6 +1,5 @@ groups: - id: registry.server - prefix: server type: attribute_group display_name: Server Attributes brief: > @@ -11,7 +10,7 @@ groups: protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. attributes: - - id: address + - id: server.address stability: stable type: string brief: "Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name." @@ -19,7 +18,7 @@ groups: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. examples: ['example.com', '10.1.2.80', '/tmp/my.sock'] - - id: port + - id: server.port stability: stable type: int brief: Server port number. diff --git a/model/registry/service.yaml b/model/registry/service.yaml index 44bc2985f6..b2ee398c26 100644 --- a/model/registry/service.yaml +++ b/model/registry/service.yaml @@ -1,12 +1,11 @@ groups: - id: registry.service - prefix: service type: attribute_group display_name: Service Attributes brief: > A service instance. attributes: - - id: name + - id: service.name type: string brief: > Logical name of the service. @@ -17,13 +16,13 @@ groups: If `process.executable.name` is not available, the value MUST be set to `unknown_service`. examples: ["shoppingcart"] stability: stable - - id: version + - id: service.version type: string brief: > The version string of the service API or implementation. The format is not defined by these conventions. examples: ["2.0.0", "a01dbef8a"] stability: stable - - id: namespace + - id: service.namespace type: string stability: experimental brief: > @@ -37,7 +36,7 @@ groups: (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. examples: ["Shop"] - - id: instance.id + - id: service.instance.id type: string stability: experimental brief: > diff --git a/model/registry/session.yaml b/model/registry/session.yaml index bf39e6ca30..34d6ffb64b 100644 --- a/model/registry/session.yaml +++ b/model/registry/session.yaml @@ -1,6 +1,5 @@ groups: - id: registry.session - prefix: session type: attribute_group display_name: Session Attributes brief: > @@ -15,12 +14,12 @@ groups: will be assigned. The previous session identifier may be provided by the instrumentation so that telemetry backends can link the two sessions. attributes: - - id: id + - id: session.id type: string stability: experimental brief: "A unique id to identify a session." examples: "00112233-4455-6677-8899-aabbccddeeff" - - id: previous_id + - id: session.previous_id type: string stability: experimental brief: "The previous `session.id` for this user, when known." diff --git a/model/registry/signalr.yaml b/model/registry/signalr.yaml index 4e87161712..e228f03a30 100644 --- a/model/registry/signalr.yaml +++ b/model/registry/signalr.yaml @@ -1,11 +1,10 @@ groups: - id: registry.signalr - prefix: signalr type: attribute_group display_name: SignalR Attributes brief: SignalR attributes attributes: - - id: connection.status + - id: signalr.connection.status type: members: - id: normal_closure @@ -23,10 +22,9 @@ groups: stability: stable brief: SignalR HTTP connection closure status. examples: ["app_shutdown", "timeout"] - - id: transport + - id: signalr.transport brief: "[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)" type: - allow_custom_values: true members: - id: server_sent_events value: 'server_sent_events' diff --git a/model/registry/source.yaml b/model/registry/source.yaml index 9e0a8af449..7ca1217233 100644 --- a/model/registry/source.yaml +++ b/model/registry/source.yaml @@ -1,6 +1,5 @@ groups: - id: registry.source - prefix: source type: attribute_group display_name: Source Attributes brief: > @@ -11,7 +10,7 @@ groups: This also covers unidirectional UDP flows and peer-to-peer communication where the "user-facing" surface of the protocol / API doesn't expose a clear notion of client and server. attributes: - - id: address + - id: source.address type: string stability: experimental brief: "Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name." @@ -19,7 +18,7 @@ groups: When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries, for example proxies, if it's available. examples: ['source.example.com', '10.1.2.80', '/tmp/my.sock'] - - id: port + - id: source.port type: int stability: experimental brief: 'Source port number' diff --git a/model/registry/system.yaml b/model/registry/system.yaml index c7d8cbc0d8..db0a9770f5 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -1,38 +1,34 @@ groups: # General system attributes - id: registry.system - prefix: system type: attribute_group display_name: General System Attributes brief: "Describes System attributes" attributes: - - id: device + - id: system.device type: string stability: experimental brief: "The device identifier" examples: ["(identifier)"] # system.cpu.* attribute group - id: registry.system.cpu - prefix: system.cpu type: attribute_group display_name: System CPU Attributes brief: "Describes System CPU attributes" attributes: - - id: logical_number + - id: system.cpu.logical_number type: int stability: experimental brief: "The logical CPU number [0..n-1]" examples: [1] # system.memory.* attribute group - id: registry.system.memory - prefix: system.memory type: attribute_group display_name: System Memory Attributes brief: "Describes System Memory attributes" attributes: - - id: state + - id: system.memory.state type: - allow_custom_values: true members: - id: used value: 'used' @@ -55,14 +51,12 @@ groups: examples: ["free", "cached"] # system.paging.* attribute group - id: registry.system.paging - prefix: system.paging type: attribute_group display_name: System Paging Attributes brief: "Describes System Memory Paging attributes" attributes: - - id: state + - id: system.paging.state type: - allow_custom_values: false members: - id: used value: 'used' @@ -73,9 +67,8 @@ groups: stability: experimental brief: "The memory paging state" examples: ["free"] - - id: type + - id: system.paging.type type: - allow_custom_values: false members: - id: major value: 'major' @@ -86,9 +79,8 @@ groups: stability: experimental brief: "The memory paging type" examples: ["minor"] - - id: direction + - id: system.paging.direction type: - allow_custom_values: false members: - id: in value: 'in' @@ -100,15 +92,13 @@ groups: brief: "The paging access direction" examples: ["in"] - id: registry.system.filesystem - prefix: system.filesystem type: attribute_group display_name: Filesystem Attributes brief: "Describes Filesystem attributes" attributes: - - id: state + - id: system.filesystem.state brief: "The filesystem state" type: - allow_custom_values: false members: - id: used value: 'used' @@ -121,9 +111,8 @@ groups: stability: experimental stability: experimental examples: ["used"] - - id: type + - id: system.filesystem.type type: - allow_custom_values: true members: - id: fat32 value: 'fat32' @@ -146,26 +135,24 @@ groups: stability: experimental brief: "The filesystem type" examples: ["ext4"] - - id: mode + - id: system.filesystem.mode type: string stability: experimental brief: "The filesystem mode" examples: ["rw, ro"] - - id: mountpoint + - id: system.filesystem.mountpoint type: string stability: experimental brief: "The filesystem mount path" examples: ["/mnt/data"] # System-specific network attributes - id: registry.system.network - prefix: system.network type: attribute_group display_name: System Network Attributes brief: "Describes Network attributes" attributes: - - id: state + - id: system.network.state type: - allow_custom_values: false members: - id: close value: 'close' @@ -208,14 +195,12 @@ groups: examples: ["close_wait"] # system.process.* attribute group - id: registry.system.process - prefix: system.process type: attribute_group display_name: System Process Attributes brief: "Describes System Process attributes" attributes: - - id: status + - id: system.process.status type: - allow_custom_values: true members: - id: running value: 'running' diff --git a/model/registry/telemetry.yaml b/model/registry/telemetry.yaml index 97b762377a..f5a4dc88bf 100644 --- a/model/registry/telemetry.yaml +++ b/model/registry/telemetry.yaml @@ -1,12 +1,11 @@ groups: - id: registry.telemetry - prefix: telemetry type: attribute_group display_name: Telemetry Attributes brief: > This document defines attributes for telemetry SDK. attributes: - - id: sdk.name + - id: telemetry.sdk.name type: string stability: stable requirement_level: required @@ -20,9 +19,8 @@ groups: The identifier `opentelemetry` is reserved and MUST NOT be used in this case. All custom identifiers SHOULD be stable across different versions of an implementation. examples: ["opentelemetry"] - - id: sdk.language + - id: telemetry.sdk.language type: - allow_custom_values: true members: - id: cpp value: "cpp" @@ -64,14 +62,14 @@ groups: requirement_level: required brief: > The language of the telemetry SDK. - - id: sdk.version + - id: telemetry.sdk.version type: string stability: stable requirement_level: required brief: > The version string of the telemetry SDK. examples: ["1.2.3"] - - id: distro.name + - id: telemetry.distro.name type: string stability: experimental brief: > @@ -80,7 +78,7 @@ groups: Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. examples: ["parts-unlimited-java"] - - id: distro.version + - id: telemetry.distro.version type: string stability: experimental brief: > diff --git a/model/registry/test.yaml b/model/registry/test.yaml index 3f62dd02f5..9671feb88d 100644 --- a/model/registry/test.yaml +++ b/model/registry/test.yaml @@ -1,18 +1,17 @@ groups: - id: registry.test - prefix: test type: attribute_group brief: > This group describes attributes specific to [software tests](https://en.wikipedia.org/wiki/Software_testing). attributes: - - id: suite.name + - id: test.suite.name type: string stability: experimental brief: > The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). examples: ["TestSuite1"] - - id: suite.run.status + - id: test.suite.run.status type: members: - id: success @@ -51,7 +50,7 @@ groups: "timed_out", "in_progress", ] - - id: case.name + - id: test.case.name type: string stability: experimental brief: > @@ -62,7 +61,7 @@ groups: "example/tests/TestCase1.test1", "ExampleTestCase1_test1", ] - - id: case.result.status + - id: test.case.result.status type: members: - id: pass diff --git a/model/registry/thread.yaml b/model/registry/thread.yaml index b6f3556107..893644ab0c 100644 --- a/model/registry/thread.yaml +++ b/model/registry/thread.yaml @@ -1,18 +1,17 @@ groups: - id: registry.thread - prefix: thread type: attribute_group display_name: Thread Attributes brief: > These attributes may be used for any operation to store information about a thread that started a span. attributes: - - id: id + - id: thread.id type: int stability: experimental brief: > Current "managed" thread ID (as opposed to OS thread ID). examples: 42 - - id: name + - id: thread.name type: string stability: experimental brief: > diff --git a/model/registry/tls.yaml b/model/registry/tls.yaml index c3d058cfbd..0699959def 100644 --- a/model/registry/tls.yaml +++ b/model/registry/tls.yaml @@ -1,11 +1,10 @@ groups: - id: registry.tls - prefix: tls type: attribute_group display_name: TLS Attributes brief: "This document defines semantic convention attributes in the TLS namespace." attributes: - - id: cipher + - id: tls.cipher brief: > String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. type: string @@ -18,34 +17,34 @@ groups: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", ] - - id: client.certificate + - id: tls.client.certificate type: string stability: experimental brief: > PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. examples: ["MII..."] - - id: client.certificate_chain + - id: tls.client.certificate_chain type: string[] stability: experimental brief: > Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. examples: ["MII...", "MI..."] - - id: client.hash.md5 + - id: tls.client.hash.md5 type: string stability: experimental brief: > Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"] - - id: client.hash.sha1 + - id: tls.client.hash.sha1 type: string stability: experimental brief: > Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["9E393D93138888D288266C2D915214D1D1CCEB2A"] - - id: client.hash.sha256 + - id: tls.client.hash.sha256 type: string stability: experimental brief: > @@ -53,33 +52,33 @@ groups: For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"] - - id: client.issuer + - id: tls.client.issuer type: string stability: experimental brief: "Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client." examples: ["CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"] - - id: client.ja3 + - id: tls.client.ja3 type: string stability: experimental brief: "A hash that identifies clients based on how they perform an SSL/TLS handshake." examples: ["d4e5b18d6b55c71272893221c96ba240"] - - id: client.not_after + - id: tls.client.not_after type: string stability: experimental brief: "Date/Time indicating when client certificate is no longer considered valid." examples: ["2021-01-01T00:00:00.000Z"] - - id: client.not_before + - id: tls.client.not_before type: string stability: experimental brief: "Date/Time indicating when client certificate is first considered valid." examples: ["1970-01-01T00:00:00.000Z"] - - id: client.subject + - id: tls.client.subject type: string stability: experimental brief: "Distinguished name of subject of the x.509 certificate presented by the client." examples: ["CN=myclient, OU=Documentation Team, DC=example, DC=com"] - - id: client.supported_ciphers + - id: tls.client.supported_ciphers type: string[] stability: experimental brief: Array of ciphers offered by the client during the client hello. @@ -87,17 +86,17 @@ groups: [ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..." ] - - id: curve + - id: tls.curve brief: "String indicating the curve used for the given cipher, when applicable" type: string stability: experimental examples: ["secp256r1"] - - id: established + - id: tls.established brief: "Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel." type: boolean stability: experimental examples: [true] - - id: next_protocol + - id: tls.next_protocol brief: > String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), @@ -105,11 +104,10 @@ groups: type: string stability: experimental examples: ["http/1.1"] - - id: protocol.name + - id: tls.protocol.name brief: > Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) type: - allow_custom_values: true members: - id: ssl value: ssl @@ -118,45 +116,45 @@ groups: value: tls stability: experimental stability: experimental - - id: protocol.version + - id: tls.protocol.version brief: > Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) type: string stability: experimental examples: ["1.2", "3"] - - id: resumed + - id: tls.resumed brief: "Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation." type: boolean stability: experimental examples: [true] - - id: server.certificate + - id: tls.server.certificate type: string stability: experimental brief: > PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. examples: ["MII..."] - - id: server.certificate_chain + - id: tls.server.certificate_chain type: string[] stability: experimental brief: > Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. examples: ["MII...", "MI..."] - - id: server.hash.md5 + - id: tls.server.hash.md5 type: string stability: experimental brief: > Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"] - - id: server.hash.sha1 + - id: tls.server.hash.sha1 type: string stability: experimental brief: > Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["9E393D93138888D288266C2D915214D1D1CCEB2A"] - - id: server.hash.sha256 + - id: tls.server.hash.sha256 type: string stability: experimental brief: > @@ -164,28 +162,28 @@ groups: For consistency with other hash values, this value should be formatted as an uppercase hash. examples: ["0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"] - - id: server.issuer + - id: tls.server.issuer type: string stability: experimental brief: "Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client." examples: ["CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"] - - id: server.ja3s + - id: tls.server.ja3s type: string stability: experimental brief: "A hash that identifies servers based on how they perform an SSL/TLS handshake." examples: ["d4e5b18d6b55c71272893221c96ba240"] - - id: server.not_after + - id: tls.server.not_after type: string stability: experimental brief: "Date/Time indicating when server certificate is no longer considered valid." examples: ["2021-01-01T00:00:00.000Z"] - - id: server.not_before + - id: tls.server.not_before type: string stability: experimental brief: "Date/Time indicating when server certificate is first considered valid." examples: ["1970-01-01T00:00:00.000Z"] - - id: server.subject + - id: tls.server.subject type: string stability: experimental brief: "Distinguished name of subject of the x.509 certificate presented by the server." diff --git a/model/registry/url.yaml b/model/registry/url.yaml index 0c808ad5f0..cb12534d57 100644 --- a/model/registry/url.yaml +++ b/model/registry/url.yaml @@ -3,9 +3,8 @@ groups: brief: Attributes describing URL. type: attribute_group display_name: URL Attributes - prefix: url attributes: - - id: domain + - id: url.domain type: string stability: experimental brief: > @@ -16,7 +15,7 @@ groups: If the URL contains a [literal IPv6 address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field. examples: ["www.foo.bar", "opentelemetry.io", "3.12.167.2", "[1080:0:0:0:8:800:200C:417A]"] - - id: extension + - id: url.extension type: string stability: experimental brief: > @@ -25,13 +24,13 @@ groups: The file extension is only set if it exists, as not every url has a file extension. When the file name has multiple extensions `example.tar.gz`, only the last one should be captured `gz`, not `tar.gz`. examples: [ "png", "gz" ] - - id: fragment + - id: url.fragment stability: stable type: string brief: > The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component examples: ["SemConv"] - - id: full + - id: url.full stability: stable type: string brief: Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) @@ -45,7 +44,7 @@ groups: `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it. examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv', '//localhost'] - - id: original + - id: url.original type: string stability: experimental brief: > @@ -57,7 +56,7 @@ groups: `url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username SHOULD NOT be redacted and attribute's value SHOULD remain the same. examples: ["https://www.foo.bar/search?q=OpenTelemetry#SemConv", "search?q=OpenTelemetry"] - - id: path + - id: url.path stability: stable type: string brief: > @@ -65,13 +64,13 @@ groups: examples: ["/search"] note: > Sensitive content provided in `url.path` SHOULD be scrubbed when instrumentations can identify it. - - id: port + - id: url.port type: int stability: experimental brief: > Port extracted from the `url.full` examples: [443] - - id: query + - id: url.query stability: stable type: string brief: > @@ -79,7 +78,7 @@ groups: examples: ["q=OpenTelemetry"] note: > Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it. - - id: registered_domain + - id: url.registered_domain type: string stability: experimental brief: > @@ -89,13 +88,13 @@ groups: This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. - - id: scheme + - id: url.scheme stability: stable type: string brief: > The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. examples: ["https", "ftp", "telnet"] - - id: subdomain + - id: url.subdomain type: string stability: experimental brief: > @@ -106,13 +105,13 @@ groups: note: > The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period. - - id: template + - id: url.template type: string stability: experimental brief: > The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). examples: ["/users/{id}", "/users/:id", "/users?id={id}"] - - id: top_level_domain + - id: url.top_level_domain type: string stability: experimental brief: > diff --git a/model/registry/user-agent.yaml b/model/registry/user-agent.yaml index 9520c8c5d8..b54df13f98 100644 --- a/model/registry/user-agent.yaml +++ b/model/registry/user-agent.yaml @@ -1,11 +1,10 @@ groups: - id: registry.user_agent - prefix: user_agent type: attribute_group display_name: User-agent Attributes brief: "Describes user-agent attributes." attributes: - - id: original + - id: user_agent.original stability: stable type: string brief: > @@ -13,7 +12,7 @@ groups: examples: ['CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 grpc-java-okhttp/1.27.2'] - - id: name + - id: user_agent.name type: string stability: experimental brief: > @@ -24,7 +23,7 @@ groups: a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name SHOULD be selected. In such a scenario it should align with `user_agent.version` - - id: version + - id: user_agent.version type: string stability: experimental brief: > diff --git a/model/registry/user.yaml b/model/registry/user.yaml index 10178f00a8..e7e518c20b 100644 --- a/model/registry/user.yaml +++ b/model/registry/user.yaml @@ -1,23 +1,22 @@ groups: - id: registry.user - prefix: user type: attribute_group display_name: User Attributes brief: "Describes information about the user." attributes: - - id: email + - id: user.email type: string stability: experimental brief: > User email address. examples: ['a.einstein@example.com'] - - id: full_name + - id: user.full_name type: string stability: experimental brief: > User's full name examples: ['Albert Einstein'] - - id: hash + - id: user.hash type: string stability: experimental brief: > @@ -25,19 +24,19 @@ groups: note: > Useful if `user.id` or `user.name` contain confidential information and cannot be used. examples: ['364fc68eaf4c8acec74a4e52d7d1feaa'] - - id: id + - id: user.id type: string stability: experimental brief: > Unique identifier of the user. examples: ['S-1-5-21-202424912787-2692429404-2351956786-1000'] - - id: name + - id: user.name type: string stability: experimental brief: > Short name or login/username of the user. examples: ['a.einstein'] - - id: roles + - id: user.roles type: string[] stability: experimental brief: > diff --git a/model/registry/v8js.yaml b/model/registry/v8js.yaml index d39f6e0967..8aa99438ba 100644 --- a/model/registry/v8js.yaml +++ b/model/registry/v8js.yaml @@ -3,9 +3,8 @@ groups: type: attribute_group brief: Describes V8 JS Engine Runtime related attributes. display_name: V8 JS Attributes - prefix: v8js attributes: - - id: gc.type + - id: v8js.gc.type stability: experimental brief: The type of garbage collection. type: @@ -26,7 +25,7 @@ groups: value: 'weakcb' brief: 'Weak Callbacks (Process Weak Callbacks).' stability: experimental - - id: heap.space.name + - id: v8js.heap.space.name stability: experimental brief: The name of the space type of heap memory. note: > diff --git a/model/registry/vcs.yaml b/model/registry/vcs.yaml index a04ca9122e..150bf591ad 100644 --- a/model/registry/vcs.yaml +++ b/model/registry/vcs.yaml @@ -1,12 +1,11 @@ groups: - id: registry.vcs.repository - prefix: vcs.repository type: attribute_group brief: > This group defines the attributes for [Version Control Systems (VCS)](https://en.wikipedia.org/wiki/Version_control). attributes: - - id: url.full + - id: vcs.repository.url.full type: string stability: experimental brief: > @@ -18,7 +17,7 @@ groups: "https://github.com/opentelemetry/open-telemetry-collector-contrib", "https://gitlab.com/my-org/my-project/my-projects-project/repo", ] - - id: ref.name + - id: vcs.repository.ref.name type: string stability: experimental brief: > @@ -26,7 +25,7 @@ groups: [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. examples: ["my-feature-branch", "tag-1-test"] - - id: ref.type + - id: vcs.repository.ref.type type: members: - id: branch @@ -41,7 +40,7 @@ groups: brief: > The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. examples: ["branch", "tag"] - - id: ref.revision + - id: vcs.repository.ref.revision type: string stability: experimental brief: > @@ -64,7 +63,7 @@ groups: "123", "HEAD", ] - - id: change.title + - id: vcs.repository.change.title type: string stability: experimental brief: > @@ -77,7 +76,7 @@ groups: "feat: add my new feature", "[chore] update dependency", ] - - id: change.id + - id: vcs.repository.change.id type: string stability: experimental brief: > diff --git a/model/registry/webengine.yaml b/model/registry/webengine.yaml index 97d01e45aa..ee2c14efe4 100644 --- a/model/registry/webengine.yaml +++ b/model/registry/webengine.yaml @@ -1,24 +1,23 @@ groups: - id: registry.webengine - prefix: webengine type: attribute_group display_name: Web Engine Attributes brief: > This document defines the attributes used to describe the packaged software running the application code. attributes: - - id: name + - id: webengine.name type: string stability: experimental brief: > The name of the web engine. examples: ['WildFly'] - - id: version + - id: webengine.version type: string stability: experimental brief: > The version of the web engine. examples: ['21.0.0'] - - id: description + - id: webengine.description type: string stability: experimental brief: > diff --git a/model/resource/android.yaml b/model/resource/android.yaml index 0f2b756eb9..d749201b30 100644 --- a/model/resource/android.yaml +++ b/model/resource/android.yaml @@ -1,6 +1,5 @@ groups: - id: android - prefix: android type: resource brief: > The Android platform on which the Android application is running. diff --git a/model/resource/browser.yaml b/model/resource/browser.yaml index 0ec1a6e3aa..c732a2c9d4 100644 --- a/model/resource/browser.yaml +++ b/model/resource/browser.yaml @@ -1,6 +1,5 @@ groups: - id: browser - prefix: browser type: resource brief: > The web browser in which the application represented by the resource is running. diff --git a/model/resource/cloud.yaml b/model/resource/cloud.yaml index 4699f84842..c6de5db22e 100644 --- a/model/resource/cloud.yaml +++ b/model/resource/cloud.yaml @@ -1,6 +1,5 @@ groups: - id: cloud - prefix: cloud type: resource brief: > A cloud environment (e.g. GCP, Azure, AWS) diff --git a/model/resource/container.yaml b/model/resource/container.yaml index c0034ca7ca..41c178071f 100644 --- a/model/resource/container.yaml +++ b/model/resource/container.yaml @@ -1,6 +1,5 @@ groups: - id: container - prefix: container type: resource brief: > A container instance. diff --git a/model/resource/device.yaml b/model/resource/device.yaml index 8fab02a8e4..826402119d 100644 --- a/model/resource/device.yaml +++ b/model/resource/device.yaml @@ -1,6 +1,5 @@ groups: - id: device - prefix: device type: resource brief: > The device on which the process represented by this resource is running. diff --git a/model/resource/faas.yaml b/model/resource/faas.yaml index ab028c89bb..c794866b6c 100644 --- a/model/resource/faas.yaml +++ b/model/resource/faas.yaml @@ -1,6 +1,5 @@ groups: - id: faas_resource - prefix: faas type: resource brief: > A serverless instance. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index b90b90dcf7..7a6c95b2d6 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -1,6 +1,5 @@ groups: - id: host - prefix: host type: resource brief: > A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. @@ -18,7 +17,6 @@ groups: requirement_level: opt_in - id: host.cpu - prefix: host.cpu type: resource brief: > A host's CPU information diff --git a/model/resource/k8s.yaml b/model/resource/k8s.yaml index d94425e007..46522ca7d9 100644 --- a/model/resource/k8s.yaml +++ b/model/resource/k8s.yaml @@ -1,6 +1,5 @@ groups: - id: k8s.cluster - prefix: k8s.cluster type: resource brief: > A Kubernetes Cluster. @@ -9,7 +8,6 @@ groups: - ref: k8s.cluster.uid - id: k8s.node - prefix: k8s.node type: resource brief: > A Kubernetes Node object. @@ -18,7 +16,6 @@ groups: - ref: k8s.node.uid - id: k8s.namespace - prefix: k8s.namespace type: resource brief: > A Kubernetes Namespace. @@ -26,7 +23,6 @@ groups: - ref: k8s.namespace.name - id: k8s.pod - prefix: k8s.pod type: resource brief: > A Kubernetes Pod object. @@ -38,7 +34,6 @@ groups: requirement_level: opt_in - id: k8s.container - prefix: k8s.container type: resource brief: > A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). @@ -48,7 +43,6 @@ groups: - ref: k8s.container.status.last_terminated_reason - id: k8s.replicaset - prefix: k8s.replicaset type: resource brief: > A Kubernetes ReplicaSet object. @@ -57,7 +51,6 @@ groups: - ref: k8s.replicaset.name - id: k8s.deployment - prefix: k8s.deployment type: resource brief: > A Kubernetes Deployment object. @@ -66,7 +59,6 @@ groups: - ref: k8s.deployment.name - id: k8s.statefulset - prefix: k8s.statefulset type: resource brief: > A Kubernetes StatefulSet object. @@ -75,7 +67,6 @@ groups: - ref: k8s.statefulset.name - id: k8s.daemonset - prefix: k8s.daemonset type: resource brief: > A Kubernetes DaemonSet object. @@ -84,7 +75,6 @@ groups: - ref: k8s.daemonset.name - id: k8s.job - prefix: k8s.job type: resource brief: > A Kubernetes Job object. @@ -93,7 +83,6 @@ groups: - ref: k8s.job.name - id: k8s.cronjob - prefix: k8s.cronjob type: resource brief: > A Kubernetes CronJob object. diff --git a/model/resource/os.yaml b/model/resource/os.yaml index 772fdde3a0..5c3a76b477 100644 --- a/model/resource/os.yaml +++ b/model/resource/os.yaml @@ -1,6 +1,5 @@ groups: - id: os - prefix: os type: resource brief: > The operating system (OS) on which the process represented by this resource is running. diff --git a/model/resource/process.yaml b/model/resource/process.yaml index 36becc7606..600559732c 100644 --- a/model/resource/process.yaml +++ b/model/resource/process.yaml @@ -1,6 +1,5 @@ groups: - id: process - prefix: process type: resource brief: > An operating system process. @@ -25,7 +24,6 @@ groups: - ref: process.owner - id: process.runtime - prefix: process.runtime type: resource brief: > The single (language) runtime instance which is monitored. diff --git a/model/resource/service.yaml b/model/resource/service.yaml index 6384246ae6..141cd1382b 100644 --- a/model/resource/service.yaml +++ b/model/resource/service.yaml @@ -1,6 +1,5 @@ groups: - id: service - prefix: service type: resource brief: > A service instance. diff --git a/model/resource/service_experimental.yaml b/model/resource/service_experimental.yaml index 97a58f6f6e..91f6e36c3e 100644 --- a/model/resource/service_experimental.yaml +++ b/model/resource/service_experimental.yaml @@ -1,6 +1,5 @@ groups: - id: service_experimental - prefix: service type: resource brief: > A service instance. diff --git a/model/session.yaml b/model/session.yaml index a0efc150e2..e01af0acef 100644 --- a/model/session.yaml +++ b/model/session.yaml @@ -1,6 +1,5 @@ groups: - id: session-id - prefix: session type: attribute_group brief: > Session is defined as the period of time encompassing all activities performed by the application and the actions diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 36f321d03c..09eb678c03 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -335,7 +335,6 @@ groups: - id: db.cosmosdb type: span extends: trace.db.common.query_and_collection - prefix: db.cosmosdb brief: > Attributes for Cosmos DB. attributes: diff --git a/model/trace/faas.yaml b/model/trace/faas.yaml index 5b3e53b09b..e2db4e14df 100644 --- a/model/trace/faas.yaml +++ b/model/trace/faas.yaml @@ -1,6 +1,5 @@ groups: - id: faas_span - prefix: faas type: span brief: > This semantic convention describes an instance of a function that @@ -22,7 +21,6 @@ groups: - ref: cloud.resource_id - id: faas_span.datasource - prefix: faas.document type: span brief: > Semantic Convention for FaaS triggered as a response to some data @@ -48,7 +46,6 @@ groups: sent to a messaging system. - id: faas_span.timer - prefix: faas type: span brief: > Semantic Convention for FaaS scheduled to be executed regularly. @@ -58,7 +55,6 @@ groups: - id: faas_span.in span_kind: server - prefix: faas type: span brief: > Contains additional attributes for incoming FaaS spans. @@ -79,7 +75,6 @@ groups: - id: faas_span.out span_kind: client - prefix: faas type: span brief: > Contains additional attributes for outgoing FaaS spans. diff --git a/model/trace/instrumentation/aws-sdk.yml b/model/trace/instrumentation/aws-sdk.yml index a2ea68a4f8..6dbe1d3211 100644 --- a/model/trace/instrumentation/aws-sdk.yml +++ b/model/trace/instrumentation/aws-sdk.yml @@ -1,6 +1,5 @@ groups: - id: aws - prefix: aws type: span brief: > The `aws` conventions apply to operations using the AWS SDK. They map request or response parameters diff --git a/model/trace/instrumentation/gcp-client.yml b/model/trace/instrumentation/gcp-client.yml index 08a6ac311e..b89c2ba844 100644 --- a/model/trace/instrumentation/gcp-client.yml +++ b/model/trace/instrumentation/gcp-client.yml @@ -2,7 +2,6 @@ groups: - id: gcp.client.attributes type: attribute_group brief: Conventions for official Google Cloud client libraries. - prefix: gcp.client stability: experimental attributes: - ref: gcp.client.service diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index d578c6ba6a..caf7a2747d 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -1,6 +1,5 @@ groups: - id: rpc - prefix: rpc type: span brief: 'This document defines semantic conventions for remote procedure calls.' events: [rpc.message] @@ -74,7 +73,6 @@ groups: requirement_level: opt_in - id: rpc.jsonrpc - prefix: rpc.jsonrpc type: span extends: rpc brief: 'Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).' @@ -101,8 +99,8 @@ groups: RPC conventions for more information. - id: rpc.message - prefix: rpc.message type: event + name: rpc.message brief: "RPC received/sent message." attributes: - ref: rpc.message.type diff --git a/model/trace/trace-exception.yaml b/model/trace/trace-exception.yaml index 32c53f4b30..4078f07155 100644 --- a/model/trace/trace-exception.yaml +++ b/model/trace/trace-exception.yaml @@ -1,6 +1,6 @@ groups: - id: trace-exception - prefix: exception + name: exception type: event brief: > This document defines the attributes used to diff --git a/model/url.yaml b/model/url.yaml index bb27dc4e6d..73fb91e274 100644 --- a/model/url.yaml +++ b/model/url.yaml @@ -2,7 +2,6 @@ groups: - id: url brief: Attributes describing URL. type: attribute_group - prefix: url attributes: - ref: url.scheme - ref: url.full diff --git a/policies/yaml_schema.rego b/policies/yaml_schema.rego new file mode 100644 index 0000000000..0d8cad7dd3 --- /dev/null +++ b/policies/yaml_schema.rego @@ -0,0 +1,21 @@ +package before_resolution + +yaml_schema_violation(description, group, attr) = violation { + violation := { + "id": description, + "type": "semconv_attribute", + "category": "yaml_schema_violation", + "attr": attr, + "group": group, + } +} + +deny[yaml_schema_violation(description, group.id, "")] { + group := input.groups[_] + + group.prefix != null + group.prefix != "" + + # TODO (https://github.com/open-telemetry/weaver/issues/279): provide other violation properties once weaver supports it. + description := sprintf("Group '%s' uses prefix '%s'. All attribute should be fully qualified with their id, prefix is no longer supported.", [group.id, group.prefix]) +} diff --git a/templates/registry/markdown/event_macros.j2 b/templates/registry/markdown/event_macros.j2 index 1fba93525c..1b03019e05 100644 --- a/templates/registry/markdown/event_macros.j2 +++ b/templates/registry/markdown/event_macros.j2 @@ -1,4 +1,4 @@ {#- Macros for simplifying creating "Event" documentation. -#} -{% macro header(event) %}{% if event.name or event.prefix %}The event name MUST be `{{ event.name or event.prefix }}`. +{% macro header(event) %}{% if event.name %}The event name MUST be `{{ event.name }}`. {% endif %}{% endmacro %}