Sensitive

annotation class Sensitive(source)

Marks a parameter as containing sensitive data that should be obfuscated in traces.

When the tracing compiler plugin encounters a parameter annotated with @Sensitive, the parameter value will be replaced with "REDACTED" in the trace output.

Usage:

class UserLogic(storeAccessor: StoreAccessor) : ModuleLogic() {
suspend fun login(
username: String,
@Sensitive password: String
) {
// password will appear as "[REDACTED]" in traces
}
}

See also

for personally identifiable information

for completely excluding methods from tracing