Skip to content

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
mainfrom
chenghao/feat/redaction-support
Draft

feat(telemetry): tag content-bearing trace and log keys with lk.pii. for redaction AGT-3074#6356
chenghao-mou wants to merge 1 commit into
mainfrom
chenghao/feat/redaction-support

Conversation

@chenghao-mou

@chenghao-mou chenghao-mou commented Jul 8, 2026

Copy link
Copy Markdown
Member

Why:

Update Otel trace and log attribute keys so that the LiveKit Cloud collector can drop them for PII redaction.

What changed:

  • 10 span attribute keys renamed, pii as 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.output
  • content log extras renamed to lk.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)
  • new guard test (tests/test_trace_types_pii.py) fails CI when a telemetry key is added without classifying it as safe or pii-tagged

Evaluations-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

…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>
@chenghao-mou chenghao-mou changed the title feat(telemetry): tag content-bearing trace and log keys with lk.pii. for redaction feat(telemetry): tag content-bearing trace and log keys with lk.pii. for redaction AGT-3074 Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant