Skip to content

Commit eb5cdef

Browse files
committed
fix(haystack): update EnhancedJSONEncoder to use model_dump_json
1 parent 165cee0 commit eb5cdef

File tree

1 file changed

+2
-0
lines changed
  • packages/opentelemetry-instrumentation-haystack/opentelemetry/instrumentation/haystack

1 file changed

+2
-0
lines changed

packages/opentelemetry-instrumentation-haystack/opentelemetry/instrumentation/haystack/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def default(self, o):
1515
return dataclasses.asdict(o)
1616
if hasattr(o, "to_json"):
1717
return o.to_json()
18+
if hasattr(o, "model_dump_json"):
19+
return o.model_dump_json()
1820
return super().default(o)
1921

2022

0 commit comments

Comments
 (0)