File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
util/opentelemetry-util-genai
src/opentelemetry/util/genai Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,4 @@ to take on an enum (`NO_CONTENT/SPAN_ONLY/EVENT_ONLY/SPAN_AND_EVENT`) instead of
1414
1515- Generate Spans for LLM invocations
1616- Generate Metrics for LLM invocations
17- - Generate Logs for LLM invocations
1817- Helper functions for starting and finishing LLM invocations
Original file line number Diff line number Diff line change @@ -162,15 +162,15 @@ def _should_capture_content(mode: _CaptureTarget) -> bool:
162162
163163 capture_mode = get_content_capturing_mode ()
164164 if mode == _CaptureTarget .SPAN :
165- return (
166- capture_mode == ContentCapturingMode .SPAN_ONLY
167- or capture_mode == ContentCapturingMode .SPAN_AND_EVENT
165+ return capture_mode in (
166+ ContentCapturingMode .SPAN_ONLY ,
167+ ContentCapturingMode .SPAN_AND_EVENT ,
168168 )
169169
170170 if mode == _CaptureTarget .EVENT :
171- return (
172- capture_mode == ContentCapturingMode .EVENT_ONLY
173- or capture_mode == ContentCapturingMode .SPAN_AND_EVENT
171+ return capture_mode in (
172+ ContentCapturingMode .EVENT_ONLY ,
173+ ContentCapturingMode .SPAN_AND_EVENT ,
174174 )
175175
176176 return False
You can’t perform that action at this time.
0 commit comments