File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
util/opentelemetry-util-genai
src/opentelemetry/util/genai Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def _message_to_log_record(
8989 body = asdict (message )
9090 if not capture_content and body and body .get ("parts" ):
9191 # TODO: use utils env check, flag off which content to capture
92- for part in body .get ("parts" ):
92+ for part in body .get ("parts" , [] ):
9393 if part .get ("content" ):
9494 part ["content" ] = ""
9595
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def tearDown(self):
122122 # Reset to default tracer provider
123123 trace .set_tracer_provider (trace .NoOpTracerProvider ())
124124
125- def test_llm_start_and_stop_creates_span (self ):
125+ def test_llm_start_and_stop_creates_span (self ): # pylint: disable=no-self-use
126126 run_id = uuid4 ()
127127 message = InputMessage (
128128 role = "Human" , parts = [Text (content = "hello world" )]
@@ -167,7 +167,7 @@ def test_llm_start_and_stop_creates_span(self):
167167 assert invocation .attributes .get ("custom_attr" ) == "value"
168168 assert invocation .attributes .get ("extra" ) == "info"
169169
170- def test_structured_logs_emitted (self ):
170+ def test_structured_logs_emitted (self ): # pylint: disable=no-self-use
171171 # Configure in-memory log exporter and provider
172172 log_exporter = InMemoryLogExporter ()
173173 logger_provider = LoggerProvider ()
You can’t perform that action at this time.
0 commit comments