🐛 Bug Report: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is ignored, only TRACELOOP_TRACE_CONTENT disables content capture
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design, observability
Research direction
Start by reading the content-capture helpers in openai/utils.py:202 and anthropic/utils.py:32, then inspect watsonx/utils.py:45 and how the instrumentation packages add message attributes to spans. Determine how a shared helper could honor the OTel variable while retaining the Traceloop variable as a fallback, and identify the default behavior that needs a decision. Done means the standard variable disables message attributes across instrumentations and tests cover both variables and the chosen default.
Written by the indexing model from the issue text.
Description
Which component is this bug for?
All instrumentations
📜 Description
Content capture (prompts and completions) can only be turned off with the Traceloop-specific TRACELOOP_TRACE_CONTENT env var, which 24 instrumentation packages read with a default of "true" (for example openai/utils.py:202, anthropic/utils.py:32). The standard OTel GenAI variable OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is ignored, so users following the OTel docs still send prompt and completion content, which may contain PII.
watsonx defines is_content_enabled() reading the OTel variable (watsonx/utils.py:45), but nothing calls it.
👟 Reproduction steps
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false- Run any instrumented LLM call (for example OpenAI chat) with a console exporter
👍 Expected behavior
No gen_ai.input.messages / gen_ai.output.messages on the span.
👎 Actual Behavior with Screenshots
Both attributes are present with the full prompt and completion. Only TRACELOOP_TRACE_CONTENT=false removes them.
🤖 Python Version
3.12
📃 Provide any additional context for the Bug.
Suggested fix: one shared helper (for example in opentelemetry-semantic-conventions-ai) that honors OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT and keeps TRACELOOP_TRACE_CONTENT as a fallback, used by every package instead of the per-package copies. The default (on vs off when neither is set) needs a decision: the OTel convention is off by default, today it is on.
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from traceloop/openllmetry
-
🐛 Bug Report: OpenAI Responses: with_raw_response.create() raises when the body can't be parsed, though the uninstrumented call returnsPossibly taken A pull request linked to this issue is open or already merged. Openbug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
🐛 Bug Report: Incomplete cache token migration after #4243 breaks Bedrock and Groq instrumentationPossibly taken @Quantum-Enigma-dot claimed this 21 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4665 · 1 comment ·
Maintainers usually reply within 1 day
-
🐛 Bug Report: OpenAI instrumentation drops gen_ai.usage.reasoning_tokens on streamed chat completionsPossibly taken @jayfeng7 claimed this 23 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
traceloop/openllmetry#4660 · 1 comment ·
Maintainers usually reply within 1 day
-
Bug Report: Failed dataset deletes still remove local rows and columnsPossibly taken @inchang-ing claimed this 32 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
traceloop/openllmetry#4630 ·
Maintainers usually reply within 1 day
-
🐛 Bug Report: LiteLLM instrumentation does not record seed, stop, frequency_penalty, presence_penaltyPossibly taken @shantam77 claimed this 38 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
traceloop/openllmetry#4598 · 2 comments ·
Maintainers usually reply within 1 day
All issues in traceloop/openllmetry
Similar issues
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Internal ErrorOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
frappe/frappe_docker#2071 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·
-
comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#157702 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
zai-org/zcode-plugins#202 ·
Maintainers usually reply within 1 day