From 6e4fb0a137a09b2e0d98a67c3aa45f46b1912b89 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 30 Aug 2024 16:06:00 -0700 Subject: [PATCH] clean up --- CONTRIBUTING.md | 18 ++++--- ...e-metrics.yaml => aspnetcore-metrics.yaml} | 0 ...registry.yaml => aspnetcore-registry.yaml} | 0 ...trel-metrics.yaml => kestrel-metrics.yaml} | 0 ...nalr-metrics.yaml => signalr-metrics.yaml} | 0 ...lr-registry.yaml => signalr-registry.yaml} | 0 model/general/general.yaml | 54 ------------------- model/general/network-common.yaml | 26 +++++++++ model/general/url-common.yaml | 12 +++++ .../graphql-registry.yaml | 0 model/{graphgq => graphgl}/graphql-spans.yml | 0 ...er-common.yaml => otel-status-common.yaml} | 0 .../andrioid/android-registry.yaml | 0 .../{ => andrioid}/android-resources.yaml | 0 .../android-registry-deprecated.yaml | 0 .../ecs.yaml => aws/aws-ecs-resources.yaml} | 0 .../eks.yaml => aws/aws-eks-resources.yaml} | 0 .../logs.yaml => aws/aws-logs-resources.yaml} | 0 .../{ => resource}/gcp/gcp-client-common.yml | 0 .../gcp-cloud-run-resources.yaml} | 0 .../gce.yaml => gcp/gcp-gce-resources.yaml} | 0 .../heroku-registry.yaml | 0 .../heroku-resources.yaml | 0 .../{ => telemetry}/telemetry-registry.yaml | 0 .../telemetry-resources-experimental.yaml | 0 .../{ => telemetry}/telemetry-resources.yaml | 0 model/session/session-common.yaml | 19 +++++++ .../session-registry.yaml | 0 model/{general => system}/linux-registry.yaml | 0 model/{resource => system}/os-registry.yaml | 0 30 files changed, 68 insertions(+), 61 deletions(-) rename model/dotnet/{dotnet-aspnetcore-metrics.yaml => aspnetcore-metrics.yaml} (100%) rename model/dotnet/{dotnet-aspnetcore-registry.yaml => aspnetcore-registry.yaml} (100%) rename model/dotnet/{dotnet-kestrel-metrics.yaml => kestrel-metrics.yaml} (100%) rename model/dotnet/{dotnet-signalr-metrics.yaml => signalr-metrics.yaml} (100%) rename model/dotnet/{dotnet-signalr-registry.yaml => signalr-registry.yaml} (100%) create mode 100644 model/general/network-common.yaml create mode 100644 model/general/url-common.yaml rename model/{graphgq => graphgl}/graphql-registry.yaml (100%) rename model/{graphgq => graphgl}/graphql-spans.yml (100%) rename model/otel/{otel-exporter-common.yaml => otel-status-common.yaml} (100%) rename model/{ => resource}/andrioid/android-registry.yaml (100%) rename model/resource/{ => andrioid}/android-resources.yaml (100%) rename model/{ => resource}/andrioid/deprecated/android-registry-deprecated.yaml (100%) rename model/resource/{cloud_provider/aws/ecs.yaml => aws/aws-ecs-resources.yaml} (100%) rename model/resource/{cloud_provider/aws/eks.yaml => aws/aws-eks-resources.yaml} (100%) rename model/resource/{cloud_provider/aws/logs.yaml => aws/aws-logs-resources.yaml} (100%) rename model/{ => resource}/gcp/gcp-client-common.yml (100%) rename model/resource/{cloud_provider/gcp/cloud_run.yaml => gcp/gcp-cloud-run-resources.yaml} (100%) rename model/resource/{cloud_provider/gcp/gce.yaml => gcp/gcp-gce-resources.yaml} (100%) rename model/resource/{cloud_provider => heroku}/heroku-registry.yaml (100%) rename model/resource/{cloud_provider => heroku}/heroku-resources.yaml (100%) rename model/resource/{ => telemetry}/telemetry-registry.yaml (100%) rename model/resource/{ => telemetry}/telemetry-resources-experimental.yaml (100%) rename model/resource/{ => telemetry}/telemetry-resources.yaml (100%) create mode 100644 model/session/session-common.yaml rename model/{general => session}/session-registry.yaml (100%) rename model/{general => system}/linux-registry.yaml (100%) rename model/{resource => system}/os-registry.yaml (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2cc55a5399..99b6ab68c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,26 +107,30 @@ The YAML (model definition) and Markdown (documentation) files are organized in │ ├── {domain} │ │ ├── {domain}-events.yaml │ │ ├── {domain}-metrics.yaml -│ │ ├── {domain}-resources.yaml +│ │ ├── {domain}-registry.yaml │ │ ├── {domain}-spans.yaml -│ ├── registry -│ │ ├── {domain}.yaml +| ├── resources +│ │ ├── {domain}-resources.yaml +│ │ ├── {domain}-registry.yaml ``` -All attributes must be defined in the domain-specific file under `/model/registry`. +All attributes must be defined in the domain-specific folder under +`/{domain}/{domain}-registry` or `/resource/{domain}-registry.yaml`. + Corresponding markdown files are auto-generated (see [Update the markdown files](#2-update-the-markdown-files)) in `/docs/attribute_registry` folder. -Semantic conventions definitions for domain-specific signals should be placed under +All semantic conventions definitions for domain-specific signals should be placed under `/model/{domain}` and should follow `{domain}-{signal}.yaml` pattern. For example, HTTP spans are defined in `model/http/http-spans.yaml`. +Resources are considered to be their own domain and are defined in the `model/resources` +folder. + Domain-specific YAML definitions could be broken down into multiple files. For example, AWS spans are defined in `/model/aws/aws-lambda-spans.yaml` and `/model/aws/aws-sdk-spans.yaml` files. - - #### Schema files When making changes to existing semantic conventions (attributes, metrics, etc) diff --git a/model/dotnet/dotnet-aspnetcore-metrics.yaml b/model/dotnet/aspnetcore-metrics.yaml similarity index 100% rename from model/dotnet/dotnet-aspnetcore-metrics.yaml rename to model/dotnet/aspnetcore-metrics.yaml diff --git a/model/dotnet/dotnet-aspnetcore-registry.yaml b/model/dotnet/aspnetcore-registry.yaml similarity index 100% rename from model/dotnet/dotnet-aspnetcore-registry.yaml rename to model/dotnet/aspnetcore-registry.yaml diff --git a/model/dotnet/dotnet-kestrel-metrics.yaml b/model/dotnet/kestrel-metrics.yaml similarity index 100% rename from model/dotnet/dotnet-kestrel-metrics.yaml rename to model/dotnet/kestrel-metrics.yaml diff --git a/model/dotnet/dotnet-signalr-metrics.yaml b/model/dotnet/signalr-metrics.yaml similarity index 100% rename from model/dotnet/dotnet-signalr-metrics.yaml rename to model/dotnet/signalr-metrics.yaml diff --git a/model/dotnet/dotnet-signalr-registry.yaml b/model/dotnet/signalr-registry.yaml similarity index 100% rename from model/dotnet/dotnet-signalr-registry.yaml rename to model/dotnet/signalr-registry.yaml diff --git a/model/general/general.yaml b/model/general/general.yaml index 9a77fc02a3..9e46073c7e 100644 --- a/model/general/general.yaml +++ b/model/general/general.yaml @@ -63,57 +63,3 @@ groups: - ref: code.column - ref: code.stacktrace requirement_level: opt_in - - id: url - brief: Attributes describing URL. - type: attribute_group - attributes: - - ref: url.scheme - - ref: url.full - tag: sensitive-information - - ref: url.path - - ref: url.query - tag: sensitive-information - - ref: url.fragment - - id: session-id - type: attribute_group - brief: > - Session is defined as the period of time encompassing all activities performed by the application and the actions - executed by the end user. - - Consequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application - throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in - 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. - attributes: - - ref: session.id - requirement_level: opt_in - - ref: session.previous_id - requirement_level: opt_in - - id: network-core - type: attribute_group - brief: > - These attributes may be used for any network related operation. - attributes: - - ref: network.transport - - ref: network.type - - ref: network.protocol.name - - ref: network.protocol.version - - ref: network.peer.address - - ref: network.peer.port - - ref: network.local.address - - ref: network.local.port - - - id: network-connection-and-carrier - type: attribute_group - brief: > - These attributes may be used for any network related operation. - attributes: - - ref: network.connection.type - - ref: network.connection.subtype - - ref: network.carrier.name - - ref: network.carrier.mcc - - ref: network.carrier.mnc - - ref: network.carrier.icc diff --git a/model/general/network-common.yaml b/model/general/network-common.yaml new file mode 100644 index 0000000000..d346131cf3 --- /dev/null +++ b/model/general/network-common.yaml @@ -0,0 +1,26 @@ +groups: + - id: network-core + type: attribute_group + brief: > + These attributes may be used for any network related operation. + attributes: + - ref: network.transport + - ref: network.type + - ref: network.protocol.name + - ref: network.protocol.version + - ref: network.peer.address + - ref: network.peer.port + - ref: network.local.address + - ref: network.local.port + + - id: network-connection-and-carrier + type: attribute_group + brief: > + These attributes may be used for any network related operation. + attributes: + - ref: network.connection.type + - ref: network.connection.subtype + - ref: network.carrier.name + - ref: network.carrier.mcc + - ref: network.carrier.mnc + - ref: network.carrier.icc diff --git a/model/general/url-common.yaml b/model/general/url-common.yaml new file mode 100644 index 0000000000..73fb91e274 --- /dev/null +++ b/model/general/url-common.yaml @@ -0,0 +1,12 @@ +groups: + - id: url + brief: Attributes describing URL. + type: attribute_group + attributes: + - ref: url.scheme + - ref: url.full + tag: sensitive-information + - ref: url.path + - ref: url.query + tag: sensitive-information + - ref: url.fragment diff --git a/model/graphgq/graphql-registry.yaml b/model/graphgl/graphql-registry.yaml similarity index 100% rename from model/graphgq/graphql-registry.yaml rename to model/graphgl/graphql-registry.yaml diff --git a/model/graphgq/graphql-spans.yml b/model/graphgl/graphql-spans.yml similarity index 100% rename from model/graphgq/graphql-spans.yml rename to model/graphgl/graphql-spans.yml diff --git a/model/otel/otel-exporter-common.yaml b/model/otel/otel-status-common.yaml similarity index 100% rename from model/otel/otel-exporter-common.yaml rename to model/otel/otel-status-common.yaml diff --git a/model/andrioid/android-registry.yaml b/model/resource/andrioid/android-registry.yaml similarity index 100% rename from model/andrioid/android-registry.yaml rename to model/resource/andrioid/android-registry.yaml diff --git a/model/resource/android-resources.yaml b/model/resource/andrioid/android-resources.yaml similarity index 100% rename from model/resource/android-resources.yaml rename to model/resource/andrioid/android-resources.yaml diff --git a/model/andrioid/deprecated/android-registry-deprecated.yaml b/model/resource/andrioid/deprecated/android-registry-deprecated.yaml similarity index 100% rename from model/andrioid/deprecated/android-registry-deprecated.yaml rename to model/resource/andrioid/deprecated/android-registry-deprecated.yaml diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/aws/aws-ecs-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/ecs.yaml rename to model/resource/aws/aws-ecs-resources.yaml diff --git a/model/resource/cloud_provider/aws/eks.yaml b/model/resource/aws/aws-eks-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/eks.yaml rename to model/resource/aws/aws-eks-resources.yaml diff --git a/model/resource/cloud_provider/aws/logs.yaml b/model/resource/aws/aws-logs-resources.yaml similarity index 100% rename from model/resource/cloud_provider/aws/logs.yaml rename to model/resource/aws/aws-logs-resources.yaml diff --git a/model/gcp/gcp-client-common.yml b/model/resource/gcp/gcp-client-common.yml similarity index 100% rename from model/gcp/gcp-client-common.yml rename to model/resource/gcp/gcp-client-common.yml diff --git a/model/resource/cloud_provider/gcp/cloud_run.yaml b/model/resource/gcp/gcp-cloud-run-resources.yaml similarity index 100% rename from model/resource/cloud_provider/gcp/cloud_run.yaml rename to model/resource/gcp/gcp-cloud-run-resources.yaml diff --git a/model/resource/cloud_provider/gcp/gce.yaml b/model/resource/gcp/gcp-gce-resources.yaml similarity index 100% rename from model/resource/cloud_provider/gcp/gce.yaml rename to model/resource/gcp/gcp-gce-resources.yaml diff --git a/model/resource/cloud_provider/heroku-registry.yaml b/model/resource/heroku/heroku-registry.yaml similarity index 100% rename from model/resource/cloud_provider/heroku-registry.yaml rename to model/resource/heroku/heroku-registry.yaml diff --git a/model/resource/cloud_provider/heroku-resources.yaml b/model/resource/heroku/heroku-resources.yaml similarity index 100% rename from model/resource/cloud_provider/heroku-resources.yaml rename to model/resource/heroku/heroku-resources.yaml diff --git a/model/resource/telemetry-registry.yaml b/model/resource/telemetry/telemetry-registry.yaml similarity index 100% rename from model/resource/telemetry-registry.yaml rename to model/resource/telemetry/telemetry-registry.yaml diff --git a/model/resource/telemetry-resources-experimental.yaml b/model/resource/telemetry/telemetry-resources-experimental.yaml similarity index 100% rename from model/resource/telemetry-resources-experimental.yaml rename to model/resource/telemetry/telemetry-resources-experimental.yaml diff --git a/model/resource/telemetry-resources.yaml b/model/resource/telemetry/telemetry-resources.yaml similarity index 100% rename from model/resource/telemetry-resources.yaml rename to model/resource/telemetry/telemetry-resources.yaml diff --git a/model/session/session-common.yaml b/model/session/session-common.yaml new file mode 100644 index 0000000000..e01af0acef --- /dev/null +++ b/model/session/session-common.yaml @@ -0,0 +1,19 @@ +groups: + - id: session-id + type: attribute_group + brief: > + Session is defined as the period of time encompassing all activities performed by the application and the actions + executed by the end user. + + Consequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application + throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in + 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. + attributes: + - ref: session.id + requirement_level: opt_in + - ref: session.previous_id + requirement_level: opt_in diff --git a/model/general/session-registry.yaml b/model/session/session-registry.yaml similarity index 100% rename from model/general/session-registry.yaml rename to model/session/session-registry.yaml diff --git a/model/general/linux-registry.yaml b/model/system/linux-registry.yaml similarity index 100% rename from model/general/linux-registry.yaml rename to model/system/linux-registry.yaml diff --git a/model/resource/os-registry.yaml b/model/system/os-registry.yaml similarity index 100% rename from model/resource/os-registry.yaml rename to model/system/os-registry.yaml