Module: Datadog::Tracing::Contrib::Ext::DB

Defined in:
lib/datadog/tracing/contrib/ext.rb

Constant Summary collapse

TAG_INSTANCE =

Name of the database. This is not the database hostname.

For databases which support such a concept, the default schema/database/namespace as configured in the connection string.

If the tracer is already tracking changes to the default schema/database throughout the lifetime of the session (i.e. the client executes USE NEW_SCHEMA and now the default schema has changed from what was set upon connection initialization), then ideally this attribute reflects the “current” value. If the tracer is not already tracking changes then just leaving it to the default value set upon initialization is OK.

This is the equivalent of OTel’s ‘db.namespace`

'db.instance'
TAG_USER =
'db.user'
TAG_SYSTEM =
'db.system'
TAG_STATEMENT =
'db.statement'
TAG_ROW_COUNT =
'db.row_count'
PEER_SERVICE_SOURCES =
Array[TAG_INSTANCE,
Tracing::Metadata::Ext::NET::TAG_DESTINATION_NAME,
Tracing::Metadata::Ext::TAG_PEER_HOSTNAME,
Tracing::Metadata::Ext::NET::TAG_TARGET_HOST,].freeze