Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have consistent formatting for semantic convention enums #1598

Merged
merged 6 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ release.
- Add details for filling semantic conventions for AWS Lambda ([#1442](https://github.com/open-telemetry/opentelemetry-specification/pull/1442))
- Update semantic conventions to distinguish between int and double ([#1550](https://github.com/open-telemetry/opentelemetry-specification/pull/1550))
- Add semantic convention for AWS ECS task revision ([#1581](https://github.com/open-telemetry/opentelemetry-specification/pull/1581))
- Fix the inconsistent formatting of semantic convention enums ([#1598](https://github.com/open-telemetry/opentelemetry-specification/pull/1598/))

### Compatibility

Expand Down
30 changes: 15 additions & 15 deletions semantic_conventions/resource/cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,49 +46,49 @@ groups:
type:
allow_custom_values: true
members:
- id: AWS_EC2
- id: aws_ec2
value: 'aws_ec2'
brief: AWS Elastic Compute Cloud
- id: AWS_ECS
- id: aws_ecs
value: 'aws_ecs'
brief: AWS Elastic Container Service
- id: AWS_EKS
- id: aws_eks
value: 'aws_eks'
brief: AWS Elastic Kubernetes Service
- id: AWS_Lambda
- id: aws_lambda
value: 'aws_lambda'
brief: AWS Lambda
- id: AWS_ElasticBeanstalk
- id: aws_elastic_beanstalk
value: 'aws_elastic_beanstalk'
brief: AWS Elastic Beanstalk
- id: Azure_VM
- id: azure_vm
value: 'azure_vm'
brief: Azure Virtual Machines
- id: Azure_ContainerInstances
- id: azure_container_instances
value: 'azure_container_instances'
brief: Azure Container Instances
- id: Azure_AKS
- id: azure_aks
value: 'azure_aks'
brief: Azure Kubernetes Service
- id: Azure_Functions
- id: azure_functions
value: 'azure_functions'
brief: Azure Functions
- id: Azure_AppService
- id: azure_app_service
value: 'azure_app_service'
brief: Azure App Service
- id: GCP_ComputeEngine
- id: gcp_compute_engine
value: 'gcp_compute_engine'
brief: Google Cloud Compute Engine (GCE)
- id: GCP_CloudRun
- id: gcp_cloud_run
value: 'gcp_cloud_run'
brief: Google Cloud Run
- id: GCP_KubernetesEngine
- id: gcp_kubernetes_engine
value: 'gcp_kubernetes_engine'
brief: Google Cloud Kubernetes Engine (GKE)
- id: GCP_CloudFunctions
- id: gcp_cloud_functions
value: 'gcp_cloud_functions'
brief: Google Cloud Functions (GCF)
- id: GCP_AppEngine
- id: gcp_app_engine
value: 'gcp_app_engine'
brief: Google Cloud App Engine (GAE)
brief: >
Expand Down
44 changes: 22 additions & 22 deletions semantic_conventions/resource/os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ groups:
type:
allow_custom_values: true
members:
- id: WINDOWS
value: 'WINDOWS'
- id: windows
value: 'windows'
brief: "Microsoft Windows"
- id: LINUX
value: 'LINUX'
- id: linux
value: 'linux'
brief: "Linux"
- id: DARWIN
value: 'DARWIN'
- id: darwin
value: 'darwin'
brief: "Apple Darwin"
- id: FREEBSD
value: 'FREEBSD'
- id: freebsd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with BSDs tbh. free_bsd or free_b_s_d would be impossibly difficult to read. That's why I'm keeping it simple here by keeping them as a single word.

value: 'freebsd'
brief: "FreeBSD"
- id: NETBSD
value: 'NETBSD'
- id: netbsd
value: 'netbsd'
brief: "NetBSD"
- id: OPENBSD
value: 'OPENBSD'
- id: openbsd
value: 'openbsd'
brief: "OpenBSD"
- id: DRAGONFLYBSD
value: 'DRAGONFLYBSD'
- id: dragonflybsd
value: 'dragonflybsd'
brief: "DragonFly BSD"
- id: HPUX
value: 'HPUX'
- id: hpux
value: 'hpux'
brief: "HP-UX (Hewlett Packard Unix)"
- id: AIX
value: 'AIX'
- id: aix
value: 'aix'
brief: "AIX (Advanced Interactive eXecutive)"
- id: SOLARIS
value: 'SOLARIS'
- id: solaris
value: 'solaris'
brief: "Oracle Solaris"
- id: ZOS
value: 'ZOS'
- id: z_os
value: 'z_os'
brief: "IBM z/OS"
required: always
brief: 'The operating system type.'
Expand Down
44 changes: 22 additions & 22 deletions semantic_conventions/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,28 +269,28 @@ groups:
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:
members:
- id: ALL
value: 'ALL'
- id: EACH_QUORUM
value: 'EACH_QUORUM'
- id: QUORUM
value: 'QUORUM'
- id: LOCAL_QUORUM
value: 'LOCAL_QUORUM'
- id: ONE
value: 'ONE'
- id: TWO
value: 'TWO'
- id: THREE
value: 'THREE'
- id: LOCAL_ONE
value: 'LOCAL_ONE'
- id: ANY
value: 'ANY'
- id: SERIAL
value: 'SERIAL'
- id: LOCAL_SERIAL
value: 'LOCAL_SERIAL'
- id: all
value: 'all'
- id: each_quorum
value: 'each_quorum'
- id: quorum
value: 'quorum'
- id: local_quorum
value: 'local_quorum'
- id: one
value: 'one'
- id: two
value: 'two'
- id: three
value: 'three'
- id: local_one
value: 'local_one'
- id: any
value: 'any'
- id: serial
value: 'serial'
- id: local_serial
value: 'local_serial'
- id: table
type: string
tag: call-level-tech-specific-cassandra
Expand Down
18 changes: 9 additions & 9 deletions semantic_conventions/trace/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ groups:
type:
allow_custom_values: false
members:
- id: IP.TCP
value: "IP.TCP"
- id: IP.UDP
value: "IP.UDP"
- id: IP
value: "IP"
- id: ip_tcp
value: "ip_tcp"
- id: ip_udp"
rakyll marked this conversation as resolved.
Show resolved Hide resolved
value: "ip_udp"
- id: ip
value: "ip"
brief: 'Another IP-based protocol'
- id: Unix
value: "Unix"
- id: unix
value: "unix"
brief: 'Unix Domain socket. See below.'
- id: pipe
value: "pipe"
Expand All @@ -33,7 +33,7 @@ groups:
brief: 'Something else (non IP-based).'
brief: >
Transport protocol used. See note below.
examples: 'IP.TCP'
examples: 'ip_tcp'
- id: peer.ip
type: string
brief: >
Expand Down
2 changes: 1 addition & 1 deletion specification/metrics/semantic_conventions/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ or not they should be on the server, client or both.
| [`net.peer.ip`](../../trace/semantic_conventions/span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below |
| [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below |
| [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Remote port number. | `80`; `8080`; `443` | See below |
| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below |
| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | See below |

**Additional attribute requirements:** At least one of the following sets of attributes is required:

Expand Down
24 changes: 12 additions & 12 deletions specification/resource/semantic_conventions/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ In case of virtualized environments, this is the operating system as it is obser
<!-- semconv os -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `os.type` | string | The operating system type. | `WINDOWS` | Yes |
| `os.type` | string | The operating system type. | `windows` | Yes |
| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`; `Ubuntu 18.04.1 LTS` | No |

`os.type` MUST be one of the following or, if none of the listed values apply, a custom value:

| Value | Description |
|---|---|
| `WINDOWS` | Microsoft Windows |
| `LINUX` | Linux |
| `DARWIN` | Apple Darwin |
| `FREEBSD` | FreeBSD |
| `NETBSD` | NetBSD |
| `OPENBSD` | OpenBSD |
| `DRAGONFLYBSD` | DragonFly BSD |
| `HPUX` | HP-UX (Hewlett Packard Unix) |
| `AIX` | AIX (Advanced Interactive eXecutive) |
| `SOLARIS` | Oracle Solaris |
| `ZOS` | IBM z/OS |
| `windows` | Microsoft Windows |
| `linux` | Linux |
| `darwin` | Apple Darwin |
| `freebsd` | FreeBSD |
| `netbsd` | NetBSD |
| `openbsd` | OpenBSD |
| `dragonflybsd` | DragonFly BSD |
| `hpux` | HP-UX (Hewlett Packard Unix) |
| `aix` | AIX (Advanced Interactive eXecutive) |
| `solaris` | Oracle Solaris |
| `z_os` | IBM z/OS |
<!-- endsemconv -->
4 changes: 2 additions & 2 deletions specification/trace/semantic_conventions/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Some database systems may allow a connection to switch to a different `db.user`,
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below. |
| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below. |
| [`net.peer.port`](span-general.md) | int | Remote port number. | `80`; `8080`; `443` | Conditional [1] |
| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | Conditional [2] |
| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditional [2] |

**[1]:** Required if using a port other than the default port for this DBMS.

Expand Down Expand Up @@ -192,7 +192,7 @@ Separated for clarity.
|---|---|---|---|---|
| `db.cassandra.keyspace` | string | The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. | `mykeyspace` | Yes |
| `db.cassandra.page_size` | int | The fetch size used for paging, i.e. how many rows will be returned at once. | `5000` | No |
| `db.cassandra.consistency_level` | string | 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). | `ALL` | No |
| `db.cassandra.consistency_level` | string | 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). | `all` | No |
| `db.cassandra.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [1] | `mytable` | Recommended if available. |
| `db.cassandra.idempotence` | boolean | Whether or not the query is idempotent. | | No |
| `db.cassandra.speculative_execution_count` | int | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`; `2` | No |
Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Examples of span names:
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below |
| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below |
| [`net.peer.port`](span-general.md) | int | Remote port number. | `80`; `8080`; `443` | See below |
| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below |
| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | See below |

**Additional attribute requirements:** At least one of the following sets of attributes is required:

Expand Down
10 changes: 5 additions & 5 deletions specification/trace/semantic_conventions/span-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties
<!-- semconv network -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `net.transport` | string | Transport protocol used. See note below. | `IP.TCP` | No |
| `net.transport` | string | Transport protocol used. See note below. | `ip_tcp` | No |
| `net.peer.ip` | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | No |
| `net.peer.port` | int | Remote port number. | `80`; `8080`; `443` | No |
| `net.peer.name` | string | Remote hostname or similar, see note below. | `example.com` | No |
Expand All @@ -46,10 +46,10 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties

| Value | Description |
|---|---|
| `IP.TCP` | IP.TCP |
| `IP.UDP` | IP.UDP |
| `IP` | Another IP-based protocol |
| `Unix` | Unix Domain socket. See below. |
| `ip_tcp` | ip_tcp |
| `ip_udp` | ip_udp" |
| `ip` | Another IP-based protocol |
| `unix` | Unix Domain socket. See below. |
| `pipe` | Named or anonymous pipe. See note below. |
| `inproc` | In-process communication. [1] |
| `other` | Something else (non IP-based). |
Expand Down