Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions agentlightning/instrumentation/weave.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,10 @@ def evaluation_status(self, req: tsi.EvaluationStatusReq) -> tsi.EvaluationStatu

# --- OTEL API ---

def otel_export(self, req: tsi.OtelExportReq) -> tsi.OtelExportRes:
return tsi.OtelExportRes()
def otel_export(self, req: Any) -> Any:
# OtelExportReq/OtelExportRes were removed from tsi in newer weave versions.
# Use Any to maintain backward compatibility across weave releases.
return None
Comment on lines +306 to +309

# ==========================================
# Object Interface (V2 APIs)
Expand Down Expand Up @@ -465,6 +467,13 @@ def trace_usage(self, *args: Any, **kwargs: Any) -> Any:
def calls_usage(self, *args: Any, **kwargs: Any) -> Any:
raise NotImplementedError()

# Methods added in newer weave releases to satisfy the abstract interface.
def annotation_queue_delete(self, *args: Any, **kwargs: Any) -> Any:
raise NotImplementedError()

def eval_results_query(self, *args: Any, **kwargs: Any) -> Any:
raise NotImplementedError()
Comment on lines +470 to +475


# Module-level storage for originals
_original_init_weave_get_server: Callable[..., Any] | None = None
Expand Down