Lingua

OpenTelemetryAgent.EnableSensitiveData Property

Definition

Gets or sets a value indicating whether potentially sensitive information should be included in telemetry.

public bool EnableSensitiveData { get; set; }
member this.EnableSensitiveData : bool with get, set
Public Property EnableSensitiveData As Boolean

Property Value

true if potentially sensitive information should be included in telemetry; false if telemetry shouldn't include raw inputs and outputs. The default value is false, unless the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable is set to "true" (case-insensitive).

Remarks

By default, telemetry includes metadata, such as token counts, but not raw inputs and outputs, such as message content, function call arguments, and function call results. The default value can be overridden by setting the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable to "true". Explicitly setting this property will override the environment variable.

Security consideration: When sensitive data capture is enabled, the full text of chat messages — including user inputs, LLM responses, function call arguments, and function results — is emitted as telemetry. This data may contain PII or other sensitive information. Ensure that your telemetry pipeline is configured with appropriate access controls and data retention policies.

Applies to