405 lines
15 KiB
YAML
405 lines
15 KiB
YAML
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: 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.
|
|
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.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.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.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'
|