Add a RestateTracer and RestateTracerProvider for AI observability#187
Add a RestateTracer and RestateTracerProvider for AI observability#187igalshilman merged 4 commits intomainfrom
Conversation
| def __init__(self): | ||
| self._spans = [] |
There was a problem hiding this comment.
do you really need to collect spans like this? if you create the parent span for hte invocation attempt, and close that one, all the child spans should be closed as well.
There was a problem hiding this comment.
@gvdongen worth to double check if this creates an issues?
| root = self._get_root_context() | ||
| if root is not None: | ||
| context = root | ||
| span = self._tracer.start_span(name, context=context, **kwargs) |
There was a problem hiding this comment.
I think we need to standardize a bit across SDKs some span attributes. Standardizing across them makes easy to sort/correlate.
In the runtime we already use some conventions, like restate.invocation.id and restate.invocation.target.
I'll add a comment to this issue restatedev/restate#4530 with the ones we know and use already.
There was a problem hiding this comment.
igalshilman
left a comment
There was a problem hiding this comment.
Looks good! it would be nice if we can align the property names as @slinkydeveloper suggested.
| def __init__(self): | ||
| self._spans = [] |
There was a problem hiding this comment.
@gvdongen worth to double check if this creates an issues?
This PR adds a RestateTracer and RestateTracerProvider that can be used to enable exporting Agent SDK traces to AI observability platforms like LangFuse, LogFire, and Arize.
It does two things:
Tested for: LangFuse + Google ADK/OpenAI Agents SDK/Pydantic AI, and LogFire + Pydantic AI
A few files weren't formatted correctly it seems