Skip to content

Commit 7f5c6cd

Browse files
nagkumar91Copilot
andcommitted
openai-v2: import OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT from genai-utils
Remove local re-definition of OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT and import it from opentelemetry.util.genai.environment_variables instead, making genai-utils the single source of truth for this constant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d22bf39 commit 7f5c6cd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2

instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
error_attributes as ErrorAttributes,
3737
)
3838
from opentelemetry.trace.status import Status, StatusCode
39+
from opentelemetry.util.genai.environment_variables import (
40+
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT,
41+
)
3942
from opentelemetry.util.genai.types import (
4043
InputMessage,
4144
LLMInvocation,
@@ -45,10 +48,6 @@
4548
ToolCallResponse,
4649
)
4750

48-
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT = (
49-
"OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT"
50-
)
51-
5251

5352
def is_content_enabled() -> bool:
5453
capture_content = environ.get(

0 commit comments

Comments
 (0)