SqlClientInstrumentationOptionsEnableConnectionLevelAttributes - свойство

Gets or sets a value indicating whether or not the SqlClientInstrumentation should parse the DataSource on a SqlConnection into server name, instance name, and/or port connection-level attribute tags. Default value: .

Definition

Пространство имён: Tessa.Web.OpenTelemetry.SqlClient
Сборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.4
C#
public bool EnableConnectionLevelAttributes { get; set; }

Значение свойства

Boolean

Заметки

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).

См. также