Azure / Azure/azure-sdk-for-python
azure-ai-agentserver-agentframework: _configure_otel_providers() hardcodes enable_sensitive_data=True, ignoring the documented ENABLE_SENSITIVE_DATA env var
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
Describe the bug
AgentFrameworkAgent._configure_otel_providers() in azure/ai/agentserver/agentframework/_agent_framework.py unconditionally passes enable_sensitive_data=True to agent_framework.observability.configure_otel_providers():
```
# _agent_framework.py – current code
def _configure_otel_providers(self, exporters) -> bool:
from agent_framework.observability import configure_otel_providers
configure_otel_providers(
enable_sensitive_data=True, # ← hardcoded, no way to opt out
exporters=exporters,
)
return True
```
This means that whenever APPLICATIONINSIGHTS_CONNECTION_STRING is set, all LLM message content (system prompt, user messages, model completions, tool call arguments and results) is captured as OpenTelemetry span attributes and exported to Application Insights — regardless of what the developer has set for ENABLE_SENSITIVE_DATA.
Contributor guide
Assessment
This issue has not been assessed yet.