feat(telemetry): tag content-bearing trace and log keys with lk.pii. for redaction AGT-3074#6356
Draft
chenghao-mou wants to merge 1 commit into
Draft
feat(telemetry): tag content-bearing trace and log keys with lk.pii. for redaction AGT-3074#6356chenghao-mou wants to merge 1 commit into
chenghao-mou wants to merge 1 commit into
Conversation
…for redaction The LiveKit Cloud collector strips OTLP attribute keys carrying a dot-delimited pii segment for PII-enabled projects; none of the SDK's content-bearing keys matched, so transcripts, chat context, tool payloads, and TTS text survived redaction. - rename 10 content span attribute keys to lk.pii.* (constants unchanged) - rename content log extras in core and all plugins to lk.pii.* - move content out of unredactable log message bodies into lk.pii extras (DTMF digits, AWS Sonic event/chat dumps, realtime event dumps, raw provider WS frames) - add a guard test forcing every new telemetry key to be classified Evaluations-scope records are exempt by design. Identifier PII (participant identity, room name) is deferred to AGT-3074. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why:
Update Otel trace and log attribute keys so that the LiveKit Cloud collector can drop them for PII redaction.
What changed:
piias second segment:lk.pii.chat_ctx,lk.pii.user_transcript,lk.pii.user_input,lk.pii.response.text,lk.pii.response.function_calls,lk.pii.instructions,lk.pii.input_text,lk.pii.amd.transcript,lk.pii.function_tool.arguments,lk.pii.function_tool.outputlk.pii.*in core and across all plugins; content moved out of log bodies into redactable extras (DTMF digits, AWS Sonic event/chat-context dumps, openai/ultravox/google realtime event dumps, raw provider WS frames)tests/test_trace_types_pii.py) fails CI when a telemetry key is added without classifying it as safe or pii-taggedEvaluations-scope records (judge reasoning, tags, outcome) are exempt by design. So are participant identity or room name.
Downstream: third-party OTEL/Langfuse dashboards querying the old key names must switch to the
lk.pii.*names; Previous SDKs do not get trace/log key redaction.🤖 Generated with Claude Code