openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

🐛 Bug Report: TRACELOOP_TRACE_CONTENT

Open FCramer opened this issue 9 months ago • 1 comments

Which component is this bug for?

AlephAlpha Instrumentation

📜 Description

In my understanding if the TRACELOOP_TRACE_CONTENT is set to false, the TRACELOOP_ENTITY_INPUT and TRACELOOP_ENTITY_OUTPUT attributes should not be set. Do I understand that correctly? However it seems to me that TRACELOOP_TRACE_CONTENT is ignored since the should_send_prompts() function is never called in _handle_call() and _handle_stream_call() ?

👟 Reproduction steps

  1. Set TRACELOOP_TRACE_CONTENT to false

👍 Expected behavior

It should not add the input and output (body of the http requests)

👎 Actual Behavior with Screenshots

It actually sets the input and output attributes

🤖 Python Version

3.12

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

None

FCramer avatar Mar 13 '25 11:03 FCramer

Hey @FCramer, it is checked in _handle_span_input and _handle_span_output

Do you see outputs and inputs being set? Can you provide an example?

nirga avatar Mar 13 '25 15:03 nirga

Hi @nirga, the "TRACELOOP_TRACE_CONTENT" env is not taking effect, I still see "Gen ai completion 0 content" in attributes. Can you please suggest how to troubleshoot this issue?

tomsun-jm avatar Jul 04 '25 02:07 tomsun-jm

Hey @tomsun-jm which model are you using?

nirga avatar Jul 04 '25 09:07 nirga

Hi @nirga, I'm using Vertex AI Gemini 2.5 Pro, with FastAPI and Dynatrace.

tomsun-jm avatar Jul 04 '25 09:07 tomsun-jm

Thanks @tomsun-jm - found the issue. Will fix that

nirga avatar Jul 05 '25 15:07 nirga