public bool EnableConnectionLevelAttributes { get; set; }
Public Property EnableConnectionLevelAttributes As Boolean
Get
Set
public:
property bool EnableConnectionLevelAttributes {
bool get ();
void set (bool value);
}
member EnableConnectionLevelAttributes : bool with get, set
EnableConnectionLevelAttributes is supported on all runtimes.
The default behavior is to set the SqlConnection DataSource as the AttributePeerService tag. If enabled, SqlConnection DataSource will be parsed and the server name will be sent as the AttributeNetPeerName or AttributeNetPeerIp tag, the instance name will be sent as the AttributeDbMsSqlInstanceName tag, and the port will be sent as the AttributeNetPeerPort tag if it is not 1433 (the default port).
If the environment variable OTEL_SEMCONV_STABILITY_OPT_IN is set to "http", the newer Semantic Convention v1.21.0 Attributes will be emitted. SqlConnection DataSource will be parsed and the server name will be sent as the AttributeServerAddress or AttributeServerSocketAddress tag, the instance name will be sent as the AttributeDbMsSqlInstanceName tag, and the port will be sent as the AttributeServerPort tag if it is not 1433 (the default port).