File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/humanloop/otel/exporter Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2121)
2222from humanloop .otel .exporter .proto import serialize_span
2323from humanloop .otel .helpers import (
24+ is_humanloop_span ,
25+ is_llm_provider_call ,
2426 read_from_opentelemetry_span ,
2527 write_to_opentelemetry_span ,
2628)
@@ -71,9 +73,14 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:
7173 return SpanExportResult .FAILURE
7274
7375 for span in spans :
76+ # only process spans that are relevant to Humanloop
77+ if not is_humanloop_span (span ) or is_llm_provider_call (span ):
78+ continue
79+
7480 file_type = span .attributes .get (HUMANLOOP_FILE_TYPE_KEY ) # type: ignore [union-attr]
7581 if file_type is None :
76- raise HumanloopRuntimeError ("Internal error: Span does not have type set" )
82+ logger .error ("Internal error: Humanloop span does not have file type set" )
83+ continue
7784
7885 try :
7986 log_args = read_from_opentelemetry_span (
You can’t perform that action at this time.
0 commit comments