Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing: enable fine-grained redactability for unstructured events #103884

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/kv/kvclient/kvtenant/tenant_trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ func testTenantTracesAreRedactedImpl(t *testing.T, redactable bool) {
}

s, db, _ := serverutils.StartServer(t, args)
if redactable {
runner := sqlutils.MakeSQLRunner(db)
runner.Exec(t, "SET CLUSTER SETTING trace.redactable.enabled = true")
}
defer db.Close()
defer s.Stopper().Stop(ctx)

runner := sqlutils.MakeSQLRunner(db)
runner.Exec(t, "SET CLUSTER SETTING trace.redactable.enabled = $1", redactable)

// Queries from the system tenant will receive unredacted traces
// since the tracer will not have the redactable flag set.
t.Run("system-tenant", func(t *testing.T) {
Expand Down
7 changes: 2 additions & 5 deletions pkg/util/tracing/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ const (
var enableTraceRedactable = settings.RegisterBoolSetting(
settings.TenantWritable,
"trace.redactable.enabled",
"set to true to enable redactability for unstructured events "+
"in traces and to redact traces sent to tenants. "+
"Set to false to coarsely mark unstructured events as redactable "+
" and eliminate them from tenant traces.",
false,
"set to true to enable finer-grainer redactability for unstructured events in traces",
true,
)

var enableNetTrace = settings.RegisterBoolSetting(
Expand Down