Lint YAML files (mainly semantic conventions). (#1814)

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
This commit is contained in:
Christian Neumüller 2021-07-15 10:12:05 +02:00 committed by GitHub
parent cbc2e3953c
commit 1b0a64202d
10 changed files with 727 additions and 701 deletions

View File

@ -20,4 +20,3 @@ MD033: false
# fenced-code-language
MD040: false

15
.yamllint Normal file
View File

@ -0,0 +1,15 @@
extends: default
rules:
document-start: disable
octal-values: enable
truthy:
allowed-values: ['true', 'false', 'on'] # 'on' for GH action trigger
line-length:
max: 200
indentation:
check-multi-line-strings: false
indent-sequences: consistent
brackets:
max-spaces-inside: 1
max-spaces-inside-empty: 0

View File

@ -41,6 +41,15 @@ install-markdownlint:
markdownlint:
@for f in $(ALL_DOCS); do echo $$f; $(MARKDOWN_LINT) -c .markdownlint.yaml $$f || exit 1; done
.PHONY: install-yamllint
install-yamllint:
# Using a venv is recommended
pip install -U yamllint~=1.26.1
.PHONY: yamllint
yamllint:
yamllint .
# Generate markdown tables from YAML definitions
.PHONY: table-generation
table-generation:

View File

@ -8,4 +8,4 @@ groups:
type: string
brief: >
The ARN of an EKS cluster.
examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster']
examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster']

View File

@ -31,4 +31,3 @@ groups:
brief: >
Container image tag.
examples: ['0.1']

View File

@ -1,410 +1,410 @@
groups:
- id: db
prefix: db
brief: >
This document defines the attributes used to perform database client calls.
span_kind: client
attributes:
- id: system
tag: connection-level
brief: An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
required: always
type:
allow_custom_values: true
members:
- id: other_sql
value: 'other_sql'
brief: 'Some other SQL database. Fallback only. See notes.'
- id: mssql
value: 'mssql'
brief: 'Microsoft SQL Server'
- id: mysql
value: 'mysql'
brief: 'MySQL'
- id: oracle
value: 'oracle'
brief: 'Oracle Database'
- id: db2
value: 'db2'
brief: 'IBM Db2'
- id: postgresql
value: 'postgresql'
brief: 'PostgreSQL'
- id: redshift
value: 'redshift'
brief: 'Amazon Redshift'
- id: hive
value: 'hive'
brief: 'Apache Hive'
- id: cloudscape
value: 'cloudscape'
brief: 'Cloudscape'
- id: hsqldb
value: 'hsqldb'
brief: 'HyperSQL DataBase'
- id: progress
value: 'progress'
brief: 'Progress Database'
- id: maxdb
value: 'maxdb'
brief: 'SAP MaxDB'
- id: hanadb
value: 'hanadb'
brief: 'SAP HANA'
- id: ingres
value: 'ingres'
brief: 'Ingres'
- id: firstsql
value: 'firstsql'
brief: 'FirstSQL'
- id: edb
value: 'edb'
brief: 'EnterpriseDB'
- id: cache
value: 'cache'
brief: 'InterSystems Caché'
- id: adabas
value: 'adabas'
brief: 'Adabas (Adaptable Database System)'
- id: firebird
value: 'firebird'
brief: 'Firebird'
- id: derby
value: 'derby'
brief: 'Apache Derby'
- id: filemaker
value: 'filemaker'
brief: 'FileMaker'
- id: informix
value: 'informix'
brief: 'Informix'
- id: instantdb
value: 'instantdb'
brief: 'InstantDB'
- id: interbase
value: 'interbase'
brief: 'InterBase'
- id: mariadb
value: 'mariadb'
brief: 'MariaDB'
- id: netezza
value: 'netezza'
brief: 'Netezza'
- id: pervasive
value: 'pervasive'
brief: 'Pervasive PSQL'
- id: pointbase
value: 'pointbase'
brief: 'PointBase'
- id: sqlite
value: 'sqlite'
brief: 'SQLite'
- id: sybase
value: 'sybase'
brief: 'Sybase'
- id: teradata
value: 'teradata'
brief: 'Teradata'
- id: vertica
value: 'vertica'
brief: 'Vertica'
- id: h2
value: 'h2'
brief: 'H2'
- id: coldfusion
value: 'coldfusion'
brief: 'ColdFusion IMQ'
- id: cassandra
value: 'cassandra'
brief: 'Apache Cassandra'
- id: hbase
value: 'hbase'
brief: 'Apache HBase'
- id: mongodb
value: 'mongodb'
brief: 'MongoDB'
- id: redis
value: 'redis'
brief: 'Redis'
- id: couchbase
value: 'couchbase'
brief: 'Couchbase'
- id: couchdb
value: 'couchdb'
brief: 'CouchDB'
- id: cosmosdb
value: 'cosmosdb'
brief: 'Microsoft Azure Cosmos DB'
- id: dynamodb
value: 'dynamodb'
brief: 'Amazon DynamoDB'
- id: neo4j
value: 'neo4j'
brief: 'Neo4j'
- id: geode
value: 'geode'
brief: 'Apache Geode'
- id: elasticsearch
value: 'elasticsearch'
brief: 'Elasticsearch'
- id: memcached
value: 'memcached'
brief: 'Memcached'
- id: cockroachdb
value: 'cockroachdb'
brief: 'CockroachDB'
- id: connection_string
tag: connection-level
type: string
brief: >
The connection string used to connect to the database.
It is recommended to remove embedded credentials.
examples: 'Server=(localdb)\v11.0;Integrated Security=true;'
- id: user
tag: connection-level
type: string
brief: >
Username for accessing the database.
examples: ['readonly_user', 'reporting_user']
- id: jdbc.driver_classname
tag: connection-level-tech-specific
type: string
brief: >
The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.
examples: ['org.postgresql.Driver', 'com.microsoft.sqlserver.jdbc.SQLServerDriver']
- id: name
tag: call-level
type: string
required:
conditional: >
Required, if applicable and no more-specific attribute is defined.
brief: >
If no [tech-specific attribute](#call-level-attributes-for-specific-technologies)
is defined, this attribute is used to report the name of the database being accessed.
For commands that switch the database, this should be set to the target database
(even if the command fails).
note: >
In some SQL databases, the database name to be used is called "schema name".
examples: [ 'customers', 'main' ]
- id: statement
tag: call-level
type: string
required:
conditional: >
Required if applicable and not explicitly disabled via instrumentation configuration.
brief: >
The database statement being executed.
note: The value may be sanitized to exclude sensitive information.
examples: ['SELECT * FROM wuser_table', 'SET mykey "WuValue"']
- id: operation
tag: call-level
type: string
required:
conditional: Required, if `db.statement` is not applicable.
brief: >
The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations)
such as `findAndModify`, or the SQL keyword.
note: >
When setting this to an SQL keyword, it is not recommended to
attempt any client-side parsing of `db.statement` just to get this
property, but it should be set if the operation name is provided by
the library being instrumented.
If the SQL statement has an ambiguous operation, or performs more
than one operation, this value may be omitted.
examples: ['findAndModify', 'HMSET', 'SELECT']
- ref: net.peer.name
tag: connection-level
required:
conditional: See below.
- ref: net.peer.ip
tag: connection-level
required:
conditional: See below.
- ref: net.peer.port
tag: connection-level
required:
conditional: Required if using a port other than the default port for this DBMS.
- ref: net.transport
tag: connection-level
required:
conditional: Recommended in general, required for in-process databases (`"inproc"`).
constraints:
- any_of:
- id: db
prefix: db
brief: >
This document defines the attributes used to perform database client calls.
span_kind: client
attributes:
- id: system
tag: connection-level
brief: An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
required: always
type:
allow_custom_values: true
members:
- id: other_sql
value: 'other_sql'
brief: 'Some other SQL database. Fallback only. See notes.'
- id: mssql
value: 'mssql'
brief: 'Microsoft SQL Server'
- id: mysql
value: 'mysql'
brief: 'MySQL'
- id: oracle
value: 'oracle'
brief: 'Oracle Database'
- id: db2
value: 'db2'
brief: 'IBM Db2'
- id: postgresql
value: 'postgresql'
brief: 'PostgreSQL'
- id: redshift
value: 'redshift'
brief: 'Amazon Redshift'
- id: hive
value: 'hive'
brief: 'Apache Hive'
- id: cloudscape
value: 'cloudscape'
brief: 'Cloudscape'
- id: hsqldb
value: 'hsqldb'
brief: 'HyperSQL DataBase'
- id: progress
value: 'progress'
brief: 'Progress Database'
- id: maxdb
value: 'maxdb'
brief: 'SAP MaxDB'
- id: hanadb
value: 'hanadb'
brief: 'SAP HANA'
- id: ingres
value: 'ingres'
brief: 'Ingres'
- id: firstsql
value: 'firstsql'
brief: 'FirstSQL'
- id: edb
value: 'edb'
brief: 'EnterpriseDB'
- id: cache
value: 'cache'
brief: 'InterSystems Caché'
- id: adabas
value: 'adabas'
brief: 'Adabas (Adaptable Database System)'
- id: firebird
value: 'firebird'
brief: 'Firebird'
- id: derby
value: 'derby'
brief: 'Apache Derby'
- id: filemaker
value: 'filemaker'
brief: 'FileMaker'
- id: informix
value: 'informix'
brief: 'Informix'
- id: instantdb
value: 'instantdb'
brief: 'InstantDB'
- id: interbase
value: 'interbase'
brief: 'InterBase'
- id: mariadb
value: 'mariadb'
brief: 'MariaDB'
- id: netezza
value: 'netezza'
brief: 'Netezza'
- id: pervasive
value: 'pervasive'
brief: 'Pervasive PSQL'
- id: pointbase
value: 'pointbase'
brief: 'PointBase'
- id: sqlite
value: 'sqlite'
brief: 'SQLite'
- id: sybase
value: 'sybase'
brief: 'Sybase'
- id: teradata
value: 'teradata'
brief: 'Teradata'
- id: vertica
value: 'vertica'
brief: 'Vertica'
- id: h2
value: 'h2'
brief: 'H2'
- id: coldfusion
value: 'coldfusion'
brief: 'ColdFusion IMQ'
- id: cassandra
value: 'cassandra'
brief: 'Apache Cassandra'
- id: hbase
value: 'hbase'
brief: 'Apache HBase'
- id: mongodb
value: 'mongodb'
brief: 'MongoDB'
- id: redis
value: 'redis'
brief: 'Redis'
- id: couchbase
value: 'couchbase'
brief: 'Couchbase'
- id: couchdb
value: 'couchdb'
brief: 'CouchDB'
- id: cosmosdb
value: 'cosmosdb'
brief: 'Microsoft Azure Cosmos DB'
- id: dynamodb
value: 'dynamodb'
brief: 'Amazon DynamoDB'
- id: neo4j
value: 'neo4j'
brief: 'Neo4j'
- id: geode
value: 'geode'
brief: 'Apache Geode'
- id: elasticsearch
value: 'elasticsearch'
brief: 'Elasticsearch'
- id: memcached
value: 'memcached'
brief: 'Memcached'
- id: cockroachdb
value: 'cockroachdb'
brief: 'CockroachDB'
- id: connection_string
tag: connection-level
type: string
brief: >
The connection string used to connect to the database.
It is recommended to remove embedded credentials.
examples: 'Server=(localdb)\v11.0;Integrated Security=true;'
- id: user
tag: connection-level
type: string
brief: >
Username for accessing the database.
examples: ['readonly_user', 'reporting_user']
- id: jdbc.driver_classname
tag: connection-level-tech-specific
type: string
brief: >
The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.
examples: ['org.postgresql.Driver', 'com.microsoft.sqlserver.jdbc.SQLServerDriver']
- id: name
tag: call-level
type: string
required:
conditional: >
Required, if applicable and no more-specific attribute is defined.
brief: >
If no [tech-specific attribute](#call-level-attributes-for-specific-technologies)
is defined, this attribute is used to report the name of the database being accessed.
For commands that switch the database, this should be set to the target database
(even if the command fails).
note: >
In some SQL databases, the database name to be used is called "schema name".
examples: [ 'customers', 'main' ]
- id: statement
tag: call-level
type: string
required:
conditional: >
Required if applicable and not explicitly disabled via instrumentation configuration.
brief: >
The database statement being executed.
note: The value may be sanitized to exclude sensitive information.
examples: ['SELECT * FROM wuser_table', 'SET mykey "WuValue"']
- id: operation
tag: call-level
type: string
required:
conditional: Required, if `db.statement` is not applicable.
brief: >
The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations)
such as `findAndModify`, or the SQL keyword.
note: >
When setting this to an SQL keyword, it is not recommended to
attempt any client-side parsing of `db.statement` just to get this
property, but it should be set if the operation name is provided by
the library being instrumented.
If the SQL statement has an ambiguous operation, or performs more
than one operation, this value may be omitted.
examples: ['findAndModify', 'HMSET', 'SELECT']
- ref: net.peer.name
tag: connection-level
required:
conditional: See below.
- ref: net.peer.ip
tag: connection-level
required:
conditional: See below.
- ref: net.peer.port
tag: connection-level
required:
conditional: Required if using a port other than the default port for this DBMS.
- ref: net.transport
tag: connection-level
required:
conditional: Recommended in general, required for in-process databases (`"inproc"`).
constraints:
- any_of:
- 'net.peer.name'
- 'net.peer.ip'
- id: db.mssql
prefix: db.mssql
extends: db
brief: >
Connection-level attributes for Microsoft SQL Server
attributes:
- id: instance_name
tag: connection-level-tech-specific
type: string
note: >
If setting a `db.mssql.instance_name`, `net.peer.port` is no longer
required (but still recommended if non-standard).
brief: >
The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
connecting to. This name is used to determine the port of a named instance.
examples: 'MSSQLSERVER'
- id: db.mssql
prefix: db.mssql
extends: db
brief: >
Connection-level attributes for Microsoft SQL Server
attributes:
- id: instance_name
tag: connection-level-tech-specific
type: string
note: >
If setting a `db.mssql.instance_name`, `net.peer.port` is no longer
required (but still recommended if non-standard).
brief: >
The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
connecting to. This name is used to determine the port of a named instance.
examples: 'MSSQLSERVER'
- id: db.cassandra
prefix: db.cassandra
extends: db
brief: >
Call-level attributes for Cassandra
attributes:
- id: keyspace
type: string
required: always
tag: call-level-tech-specific-cassandra
brief: >
The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.
examples: 'mykeyspace'
- id: page_size
type: int
tag: call-level-tech-specific-cassandra
brief: >
The fetch size used for paging, i.e. how many rows will be returned at once.
examples: [5000]
- id: consistency_level
tag: call-level-tech-specific-cassandra
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:
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: table
type: string
tag: call-level-tech-specific-cassandra
required:
conditional: Recommended if available.
brief: The name of the primary table that the operation is acting upon, including the schema name (if applicable).
note: >
This mirrors the db.sql.table attribute but references cassandra rather than sql.
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: 'mytable'
- id: idempotence
type: boolean
tag: call-level-tech-specific-cassandra
brief: >
Whether or not the query is idempotent.
- id: speculative_execution_count
type: int
tag: call-level-tech-specific-cassandra
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: coordinator.id
type: string
tag: call-level-tech-specific-cassandra
brief: >
The ID of the coordinating node for a query.
examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
- id: coordinator.dc
type: string
tag: call-level-tech-specific-cassandra
brief: >
The data center of the coordinating node for a query.
examples: 'us-west-2'
- id: db.cassandra
prefix: db.cassandra
extends: db
brief: >
Call-level attributes for Cassandra
attributes:
- id: keyspace
type: string
required: always
tag: call-level-tech-specific-cassandra
brief: >
The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.
examples: 'mykeyspace'
- id: page_size
type: int
tag: call-level-tech-specific-cassandra
brief: >
The fetch size used for paging, i.e. how many rows will be returned at once.
examples: [5000]
- id: consistency_level
tag: call-level-tech-specific-cassandra
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:
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: table
type: string
tag: call-level-tech-specific-cassandra
required:
conditional: Recommended if available.
brief: The name of the primary table that the operation is acting upon, including the schema name (if applicable).
note: >
This mirrors the db.sql.table attribute but references cassandra rather than sql.
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: 'mytable'
- id: idempotence
type: boolean
tag: call-level-tech-specific-cassandra
brief: >
Whether or not the query is idempotent.
- id: speculative_execution_count
type: int
tag: call-level-tech-specific-cassandra
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: coordinator.id
type: string
tag: call-level-tech-specific-cassandra
brief: >
The ID of the coordinating node for a query.
examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
- id: coordinator.dc
type: string
tag: call-level-tech-specific-cassandra
brief: >
The data center of the coordinating node for a query.
examples: 'us-west-2'
- id: db.hbase
prefix: db.hbase
extends: db
brief: >
Call-level attributes for Apache HBase
attributes:
- id: namespace
type: string
required: always
tag: call-level-tech-specific
brief: >
The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed.
To be used instead of the generic `db.name` attribute.
examples: 'default'
- id: db.hbase
prefix: db.hbase
extends: db
brief: >
Call-level attributes for Apache HBase
attributes:
- id: namespace
type: string
required: always
tag: call-level-tech-specific
brief: >
The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed.
To be used instead of the generic `db.name` attribute.
examples: 'default'
- id: db.redis
prefix: db.redis
extends: db
brief: >
Call-level attributes for Redis
attributes:
- id: database_index
type: int
required:
conditional: Required, if other than the default database (`0`).
tag: call-level-tech-specific
brief: >
The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer.
To be used instead of the generic `db.name` attribute.
examples: [0, 1, 15]
- id: db.redis
prefix: db.redis
extends: db
brief: >
Call-level attributes for Redis
attributes:
- id: database_index
type: int
required:
conditional: Required, if other than the default database (`0`).
tag: call-level-tech-specific
brief: >
The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer.
To be used instead of the generic `db.name` attribute.
examples: [0, 1, 15]
- id: db.mongodb
prefix: db.mongodb
extends: db
brief: >
Call-level attributes for MongoDB
attributes:
- id: collection
type: string
required: always
tag: call-level-tech-specific
brief: >
The collection being accessed within the database stated in `db.name`.
examples: [ 'customers', 'products' ]
- id: db.mongodb
prefix: db.mongodb
extends: db
brief: >
Call-level attributes for MongoDB
attributes:
- id: collection
type: string
required: always
tag: call-level-tech-specific
brief: >
The collection being accessed within the database stated in `db.name`.
examples: [ 'customers', 'products' ]
- id: db.sql
prefix: 'db.sql'
extends: 'db'
brief: >
Call-level attrbiutes for SQL databases
attributes:
- id: table
tag: call-level-tech-specific
type: string
required:
conditional: Recommended if available.
brief: The name of the primary table that the operation is acting upon, including the schema name (if applicable).
note: >
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: ['public.users', 'customers']
- id: db.sql
prefix: 'db.sql'
extends: 'db'
brief: >
Call-level attrbiutes for SQL databases
attributes:
- id: table
tag: call-level-tech-specific
type: string
required:
conditional: Recommended if available.
brief: The name of the primary table that the operation is acting upon, including the schema name (if applicable).
note: >
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: ['public.users', 'customers']
- id: db.tech
brief: "Semantic convention group for specific technologies"
constraints:
- include: 'db.cassandra'
- include: 'db.hbase'
- include: 'db.redis'
- include: 'db.mongodb'
- include: 'db.sql'
- id: db.tech
brief: "Semantic convention group for specific technologies"
constraints:
- include: 'db.cassandra'
- include: 'db.hbase'
- include: 'db.redis'
- include: 'db.mongodb'
- include: 'db.sql'

View File

@ -11,11 +11,11 @@ groups:
The type of the exception (its fully-qualified class name, if applicable).
The dynamic type of the exception should be preferred over the static type
in languages that support it.
examples: ["java.net.ConnectException","OSError"]
examples: ["java.net.ConnectException", "OSError"]
- id: message
type: string
brief: The exception message.
examples: ["Division by zero","Can't convert 'int' object to str implicitly"]
examples: ["Division by zero", "Can't convert 'int' object to str implicitly"]
- id: stacktrace
type: string
brief: >
@ -50,5 +50,5 @@ groups:
constraints:
- any_of:
- "exception.type"
- "exception.message"
- "exception.type"
- "exception.message"

View File

@ -103,10 +103,10 @@ groups:
brief: 'Semantic Convention for HTTP Client'
constraints:
- any_of:
- [http.url]
- [http.scheme, http.host, http.target]
- [http.scheme, net.peer.name, net.peer.port, http.target]
- [http.scheme, net.peer.ip, net.peer.port, http.target]
- [http.url]
- [http.scheme, http.host, http.target]
- [http.scheme, net.peer.name, net.peer.port, http.target]
- [http.scheme, net.peer.ip, net.peer.port, http.target]
- id: http.server
prefix: http
@ -139,7 +139,7 @@ groups:
examples: '83.164.160.102'
constraints:
- any_of:
- [http.scheme, http.host, http.target]
- [http.scheme, http.server_name, net.host.port, http.target]
- [http.scheme, net.host.name, net.host.port, http.target]
- [http.url]
- [http.scheme, http.host, http.target]
- [http.scheme, http.server_name, net.host.port, http.target]
- [http.scheme, net.host.name, net.host.port, http.target]
- [http.url]

View File

@ -1,174 +1,174 @@
groups:
- id: messaging
prefix: messaging
brief: >
This document defines the attributes used in
messaging systems.
attributes:
- id: system
type: string
required: always
brief: 'A string identifying the messaging system.'
examples: ['kafka', 'rabbitmq', 'activemq', 'AmazonSQS']
- id: destination
type: string
required: always
brief: >
The message destination name. This might be equal to the span name
but is required nevertheless.
examples: ['MyQueue', 'MyTopic']
- id: destination_kind
type:
allow_custom_values: false
members:
- id: queue
value: "queue"
brief: "A message sent to a queue"
- id: topic
value: "topic"
brief: "A message sent to a topic"
required:
conditional: 'Required only if the message destination is either a `queue` or `topic`.'
brief: 'The kind of message destination'
- id: temp_destination
type: boolean
required:
conditional: 'If missing, it is assumed to be false.'
brief: 'A boolean that is true if the message destination is temporary.'
- id: protocol
type: string
brief: 'The name of the transport protocol.'
examples: ['AMQP', 'MQTT']
- id: protocol_version
type: string
brief: 'The version of the transport protocol.'
examples: '0.9.1'
- id: url
type: string
brief: 'Connection string.'
examples: ['tibjmsnaming://localhost:7222', 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue']
- id: message_id
type: string
brief: 'A value used by the messaging system as an identifier for the message, represented as a string.'
examples: '452a7c7c7c7048c2f887f61572b18fc2'
- id: conversation_id
type: string
brief: >
The [conversation ID](#conversations) identifying the conversation to which the message belongs,
represented as a string. Sometimes called "Correlation ID".
examples: 'MyConversationId'
- id: message_payload_size_bytes
type: int
brief: >
The (uncompressed) size of the message payload in bytes.
Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.
examples: 2738
- id: message_payload_compressed_size_bytes
type: int
brief: 'The compressed size of the message payload in bytes.'
examples: 2048
- ref: net.peer.name
note: >
This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.
required:
conditional: If available.
- ref: net.peer.ip
tag: connection-level
required:
conditional: If available.
constraints:
- include: network
- id: messaging
prefix: messaging
brief: >
This document defines the attributes used in
messaging systems.
attributes:
- id: system
type: string
required: always
brief: 'A string identifying the messaging system.'
examples: ['kafka', 'rabbitmq', 'activemq', 'AmazonSQS']
- id: destination
type: string
required: always
brief: >
The message destination name. This might be equal to the span name
but is required nevertheless.
examples: ['MyQueue', 'MyTopic']
- id: destination_kind
type:
allow_custom_values: false
members:
- id: queue
value: "queue"
brief: "A message sent to a queue"
- id: topic
value: "topic"
brief: "A message sent to a topic"
required:
conditional: 'Required only if the message destination is either a `queue` or `topic`.'
brief: 'The kind of message destination'
- id: temp_destination
type: boolean
required:
conditional: 'If missing, it is assumed to be false.'
brief: 'A boolean that is true if the message destination is temporary.'
- id: protocol
type: string
brief: 'The name of the transport protocol.'
examples: ['AMQP', 'MQTT']
- id: protocol_version
type: string
brief: 'The version of the transport protocol.'
examples: '0.9.1'
- id: url
type: string
brief: 'Connection string.'
examples: ['tibjmsnaming://localhost:7222', 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue']
- id: message_id
type: string
brief: 'A value used by the messaging system as an identifier for the message, represented as a string.'
examples: '452a7c7c7c7048c2f887f61572b18fc2'
- id: conversation_id
type: string
brief: >
The [conversation ID](#conversations) identifying the conversation to which the message belongs,
represented as a string. Sometimes called "Correlation ID".
examples: 'MyConversationId'
- id: message_payload_size_bytes
type: int
brief: >
The (uncompressed) size of the message payload in bytes.
Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.
examples: 2738
- id: message_payload_compressed_size_bytes
type: int
brief: 'The compressed size of the message payload in bytes.'
examples: 2048
- ref: net.peer.name
note: >
This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.
required:
conditional: If available.
- ref: net.peer.ip
tag: connection-level
required:
conditional: If available.
constraints:
- include: network
- id: messaging.producer
prefix: messaging
extends: messaging
span_kind: producer
brief: 'Semantic convention for producers of messages sent to a messaging systems.'
- id: messaging.producer
prefix: messaging
extends: messaging
span_kind: producer
brief: 'Semantic convention for producers of messages sent to a messaging systems.'
- id: messaging.producer.synchronous
prefix: messaging
extends: messaging
span_kind: client
brief: >
Semantic convention for clients of messaging systems that produce messages
and synchronously wait for responses.
- id: messaging.producer.synchronous
prefix: messaging
extends: messaging
span_kind: client
brief: >
Semantic convention for clients of messaging systems that produce messages
and synchronously wait for responses.
- id: messaging.consumer
prefix: messaging
extends: messaging
span_kind: consumer
brief: 'Semantic convention for a consumer of messages received from a messaging system'
attributes:
- id: operation
type:
allow_custom_values: false
members:
- id: receive
value: "receive"
- id: process
value: "process"
brief: >
A string identifying the kind of message consumption as defined in the
[Operation names](#operation-names) section above.
If the operation is "send", this attribute MUST NOT be set, since the
operation can be inferred from the span kind in that case.
- id: messaging.consumer
prefix: messaging
extends: messaging
span_kind: consumer
brief: 'Semantic convention for a consumer of messages received from a messaging system'
attributes:
- id: operation
type:
allow_custom_values: false
members:
- id: receive
value: "receive"
- id: process
value: "process"
brief: >
A string identifying the kind of message consumption as defined in the
[Operation names](#operation-names) section above.
If the operation is "send", this attribute MUST NOT be set, since the
operation can be inferred from the span kind in that case.
- id: messaging.consumer.synchronous
prefix: messaging
extends: messaging.consumer
span_kind: server
brief: >
Semantic convention for servers that consume messages received from messaging systems
and always send back replies directed to the producers of these messages.
- id: messaging.consumer.synchronous
prefix: messaging
extends: messaging.consumer
span_kind: server
brief: >
Semantic convention for servers that consume messages received from messaging systems
and always send back replies directed to the producers of these messages.
- id: messaging.rabbitmq
prefix: messaging.rabbitmq
extends: messaging
brief: >
Attributes for RabbitMQ
attributes:
- id: routing_key
type: string
required:
conditional: Unless it is empty.
brief: >
RabbitMQ message routing key.
examples: 'myKey'
- id: messaging.rabbitmq
prefix: messaging.rabbitmq
extends: messaging
brief: >
Attributes for RabbitMQ
attributes:
- id: routing_key
type: string
required:
conditional: Unless it is empty.
brief: >
RabbitMQ message routing key.
examples: 'myKey'
- id: messaging.kafka
prefix: messaging.kafka
extends: messaging
brief: >
Attributes for Apache Kafka
attributes:
- id: message_key
type: string
brief: >
Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition.
They differ from `messaging.message_id` in that they're not unique.
If the key is `null`, the attribute MUST NOT be set.
note: >
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: consumer_group
type: string
brief: >
Name of the Kafka Consumer Group that is handling the message.
Only applies to consumers, not producers.
examples: 'my-group'
- id: client_id
type: string
brief: >
Client Id for the Consumer or Producer that is handling the message.
examples: 'client-5'
- id: partition
type: int
brief: >
Partition the message is sent to.
examples: 2
- id: tombstone
type: boolean
required:
conditional: 'If missing, it is assumed to be false.'
brief: 'A boolean that is true if the message is a tombstone.'
- id: messaging.kafka
prefix: messaging.kafka
extends: messaging
brief: >
Attributes for Apache Kafka
attributes:
- id: message_key
type: string
brief: >
Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition.
They differ from `messaging.message_id` in that they're not unique.
If the key is `null`, the attribute MUST NOT be set.
note: >
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: consumer_group
type: string
brief: >
Name of the Kafka Consumer Group that is handling the message.
Only applies to consumers, not producers.
examples: 'my-group'
- id: client_id
type: string
brief: >
Client Id for the Consumer or Producer that is handling the message.
examples: 'client-5'
- id: partition
type: int
brief: >
Partition the message is sent to.
examples: 2
- id: tombstone
type: boolean
required:
conditional: 'If missing, it is assumed to be false.'
brief: 'A boolean that is true if the message is a tombstone.'

View File

@ -1,122 +1,126 @@
groups:
- id: rpc
prefix: rpc
brief: 'This document defines semantic conventions for remote procedure calls.'
attributes:
- id: system
type: string
required: always
brief: 'A string identifying the remoting system.'
examples: ["grpc", "java_rmi", "wcf"]
- id: service
type: string
required:
conditional: "No, but recommended"
brief: 'The full (logical) name of the service being called, including its package name, if applicable.'
note: >
This is the logical name of the service from the RPC interface perspective,
which can be different from the name of any implementing class.
The `code.namespace` attribute may be used to store the latter
(despite the attribute name, it may include a class name;
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: method
type: string
required:
conditional: "No, but recommended"
brief: 'The name of the (logical) method being called, must be equal to the $method part in the span name.'
note: >
This is the logical name of the method from the RPC interface perspective,
which can be different from the name of any implementing method/function.
The `code.function` attribute may be used to store the latter
(e.g., method actually executing the call on the server side,
RPC client stub method on the client side).
examples: "exampleMethod"
- ref: net.peer.ip
- ref: net.peer.name
- ref: net.peer.port
required:
conditional: "See below"
- ref: net.transport
required:
conditional: "See below"
constraints:
- any_of:
- id: rpc
prefix: rpc
brief: 'This document defines semantic conventions for remote procedure calls.'
attributes:
- id: system
type: string
required: always
brief: 'A string identifying the remoting system.'
examples: ["grpc", "java_rmi", "wcf"]
- id: service
type: string
required:
conditional: "No, but recommended"
brief: 'The full (logical) name of the service being called, including its package name, if applicable.'
note: >
This is the logical name of the service from the RPC interface perspective,
which can be different from the name of any implementing class.
The `code.namespace` attribute may be used to store the latter
(despite the attribute name, it may include a class name;
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: method
type: string
required:
conditional: "No, but recommended"
brief: 'The name of the (logical) method being called, must be equal to the $method part in the span name.'
note: >
This is the logical name of the method from the RPC interface perspective,
which can be different from the name of any implementing method/function.
The `code.function` attribute may be used to store the latter
(e.g., method actually executing the call on the server side,
RPC client stub method on the client side).
examples: "exampleMethod"
- ref: net.peer.ip
- ref: net.peer.name
- ref: net.peer.port
required:
conditional: "See below"
- ref: net.transport
required:
conditional: "See below"
constraints:
- any_of:
- net.peer.ip
- net.peer.name
- include: network
- id: rpc.grpc
prefix: rpc.grpc
extends: rpc
brief: 'Tech-specific attributes for gRPC.'
attributes:
- id: status_code
type:
members:
- id: OK
value: 0
- id: CANCELLED
value: 1
- id: UNKNOWN
value: 2
- id: INVALID_ARGUMENT
value: 3
- id: DEADLINE_EXCEEDED
value: 4
- id: NOT_FOUND
value: 5
- id: ALREADY_EXISTS
value: 6
- id: PERMISSION_DENIED
value: 7
- id: RESOURCE_EXHAUSTED
value: 8
- id: FAILED_PRECONDITION
value: 9
- id: ABORTED
value: 10
- id: OUT_OF_RANGE
value: 11
- id: UNIMPLEMENTED
value: 12
- id: INTERNAL
value: 13
- id: UNAVAILABLE
value: 14
- id: DATA_LOSS
value: 15
- id: UNAUTHENTICATED
value: 16
required: always
brief: "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request."
- id: rpc.jsonrpc
prefix: rpc.jsonrpc
extends: rpc
brief: 'Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).'
attributes:
- id: version
type: string
required:
conditional: 'If missing, it is assumed to be "1.0".'
brief: "Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted."
examples: ['2.0', '1.0']
- id: request_id
type: string
brief: "`id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), 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: error_code
type: int
required:
conditional: 'If missing, response is assumed to be successful.'
brief: "`error.code` property of response if it is an error response."
examples: [-32700, 100]
- id: error_message
type: string
brief: "`error.message` property of response if it is an error response."
examples: ['Parse error', 'User already exists']
- ref: rpc.method
required: always
note: >
This is always required for jsonrpc. See the note in the general
RPC conventions for more information.
- include: network
- id: rpc.grpc
prefix: rpc.grpc
extends: rpc
brief: 'Tech-specific attributes for gRPC.'
attributes:
- id: status_code
type:
members:
- id: OK
value: 0
- id: CANCELLED
value: 1
- id: UNKNOWN
value: 2
- id: INVALID_ARGUMENT
value: 3
- id: DEADLINE_EXCEEDED
value: 4
- id: NOT_FOUND
value: 5
- id: ALREADY_EXISTS
value: 6
- id: PERMISSION_DENIED
value: 7
- id: RESOURCE_EXHAUSTED
value: 8
- id: FAILED_PRECONDITION
value: 9
- id: ABORTED
value: 10
- id: OUT_OF_RANGE
value: 11
- id: UNIMPLEMENTED
value: 12
- id: INTERNAL
value: 13
- id: UNAVAILABLE
value: 14
- id: DATA_LOSS
value: 15
- id: UNAUTHENTICATED
value: 16
required: always
brief: "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request."
- id: rpc.jsonrpc
prefix: rpc.jsonrpc
extends: rpc
brief: 'Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).'
attributes:
- id: version
type: string
required:
conditional: 'If missing, it is assumed to be "1.0".'
brief: "Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted."
examples: ['2.0', '1.0']
- id: request_id
type: string
brief: >
`id` property of request or response.
Since protocol allows id to be int, string, `null` or missing (for notifications),
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: error_code
type: int
required:
conditional: 'If missing, response is assumed to be successful.'
brief: "`error.code` property of response if it is an error response."
examples: [-32700, 100]
- id: error_message
type: string
brief: "`error.message` property of response if it is an error response."
examples: ['Parse error', 'User already exists']
- ref: rpc.method
required: always
note: >
This is always required for jsonrpc. See the note in the general
RPC conventions for more information.