Skip to content

Commit 9b62e5c

Browse files
author
R9 Fundamentals
committed
comments
1 parent 25f0b13 commit 9b62e5c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/core/extensions/data-redaction.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Logging is a common source of accidental data exposure. Sensitive information su
190190

191191
### Steps for logging sensitive data
192192

193-
1. **Install logging extensions package**: Install [Microsoft.Extensions.Telemetry](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry) to be able to use the extended logger to enable redaction feature.
193+
1. **Install the telemetry extensions package**: Install [Microsoft.Extensions.Telemetry](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry) to be able to use the extended logger to enable redaction feature.
194194
2. **Set up redaction**: Integrate redactors with your logging pipeline by calling the <xref:Microsoft.Extensions.DependencyInjection.RedactionServiceCollectionExtensions.AddRedaction(Microsoft.Extensions.DependencyInjection.IServiceCollection)> method, to automatically sanitize or mask sensitive fields before they are written to logs.
195195
3. **Identify sensitive fields**: Know which data in your application is sensitive and requires protection, and mark them with appropriate data classification.
196196
4. **Review log output**: Regularly audit your logs to ensure no sensitive data is exposed.
@@ -212,10 +212,11 @@ services.AddLogging(builder =>
212212

213213
services.AddRedaction(builder =>
214214
{
215+
// configure redactors for your data classifications
215216
builder.SetRedactor<StarRedactor>(MyTaxonomyClassifications.Private);
216217
});
217-
218-
// Use StarRedactor to redact SSN data.
218+
// Use annotations to mark sensitive data.
219+
// For example, apply the Private classification to SSN data.
219220
[LoggerMessage(0, LogLevel.Information, "User SSN: {SSN}")]
220221
public static partial void LogPrivateInformation(
221222
this ILogger logger,

docs/core/extensions/logger-message-generator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ services.AddLogging(builder =>
406406

407407
services.AddRedaction(builder =>
408408
{
409+
// configure redactors for your data classifications
409410
builder.SetRedactor<StarRedactor>(MyTaxonomyClassifications.Private);
410411
});
411412

0 commit comments

Comments
 (0)