Skip to content

Commit 332895e

Browse files
committed
Remove print statements
1 parent 3ed2432 commit 332895e

File tree

1 file changed

+0
-8
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai

1 file changed

+0
-8
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ def _maybe_log_completion_details(
448448
config: Optional[GenerateContentConfigOrDict] = None,
449449
):
450450
if not is_experimental_mode:
451-
print("not experimental mode?")
452451
return
453452
system_instructions = []
454453
if system_content := _config_to_system_instruction(config):
@@ -485,7 +484,6 @@ def _maybe_log_completion_details(
485484
**(event.attributes or {}),
486485
**completion_details_attributes,
487486
}
488-
print("writing completion event..")
489487
self._otel_wrapper.log_completion_details(event=event)
490488

491489
if self._content_recording_enabled in [
@@ -706,7 +704,6 @@ def instrumented_generate_content(
706704
config: Optional[GenerateContentConfigOrDict] = None,
707705
**kwargs: Any,
708706
) -> GenerateContentResponse:
709-
print("in instrumented code..")
710707
candidates = []
711708
helper = _GenerateContentInstrumentationHelper(
712709
self,
@@ -719,7 +716,6 @@ def instrumented_generate_content(
719716
helper.sem_conv_opt_in_mode
720717
== _StabilityMode.GEN_AI_LATEST_EXPERIMENTAL
721718
)
722-
print(f"opt in mode: {helper.sem_conv_opt_in_mode}")
723719
request_attributes = create_request_attributes(
724720
config,
725721
is_experimental_mode,
@@ -735,15 +731,13 @@ def instrumented_generate_content(
735731
gen_ai_attributes.GEN_AI_SYSTEM, helper._genai_system
736732
)
737733
try:
738-
print("trying to get resp..")
739734
response = wrapped_func(
740735
self,
741736
model=model,
742737
contents=contents,
743738
config=helper.wrapped_config(config),
744739
**kwargs,
745740
)
746-
print("resp over..")
747741
if is_experimental_mode:
748742
helper._update_response(response)
749743
if response.candidates:
@@ -753,11 +747,9 @@ def instrumented_generate_content(
753747
helper.process_response(response)
754748
return response
755749
except Exception as error:
756-
print("EXCEPTION RIASED.. PROCESSING ERROR>>>")
757750
helper.process_error(error)
758751
raise
759752
finally:
760-
print("in the finnally block..")
761753
final_attributes = helper.create_final_attributes()
762754
span.set_attributes(final_attributes)
763755
helper._maybe_log_completion_details(

0 commit comments

Comments
 (0)