EnableConnectionLevelAttributes
This property indicates whether ODP.NET adds connection-related attributes to OpenTelemetry activities.
Declaration
// C#
public bool EnableConnectionLevelAttributes { get; set; }
Return Value
A bool.
Remarks
Default value is false.
When enabled, ODP.NET may add available connection metadata such as server.address, server.port, database name or namespace, connection ID, service name, instance name, and Oracle-specific connection attributes.
The db.odp.connection.id OpenTelemetry attribute publishes a unique identifier for each connection. This attribute can be used to diagnose and trace a specific connection’s behavior. The identifier can be prefixed with an ODP.NET connection ID when the ConnectionIdPrefix property in OracleConnection or OracleCommand is set to an ID value. In addition, the following Oracle database convention tags are published to the trace:
• oracle.db.action
• oracle.db.domain
• oracle.db.instance.name
• oracle.db.module
• oracle.db.name
• oracle.db.pdb
• oracle.db.service
• oracle.db.session.id