SqlClientInstrumentationOptionsSetDbStatementForText - свойство

Gets or sets a value indicating whether or not the SqlClientInstrumentation should add the text of commands as the AttributeDbStatement tag. Default value: .

Definition

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

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

Boolean

Заметки

WARNING: SetDbStatementForText will capture the raw CommandText. Make sure your CommandText property never contains any sensitive data.

SetDbStatementForText is supported on all runtimes.

  • On .NET and .NET Core SetDbStatementForText only applies to SqlCommands with Text.
  • On .NET Framework SetDbStatementForText applies to all SqlCommands regardless of CommandType.
    • When using System.Data.SqlClient use SetDbStatementForText to capture StoredProcedure command names.
    • When using Microsoft.Data.SqlClient use SetDbStatementForText to capture Text, StoredProcedure, and all other command text.

См. также