- Notifications
You must be signed in to change notification settings - Fork 611
feat(js): Add telemetry server stream endpoint and Update tools server #3801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
huangjeff5 commented Nov 13, 2025
- Added a streaming endpoint for retrieving a trace's spans
- Added HTTP-based runAction endpoint for streaming chunks in tools server
| if (response.headers['x-genkit-version']) { | ||
| resp.genkitVersion = response.headers['x-genkit-version']; | ||
| | ||
| const earlyTraceId = response.headers['x-genkit-trace-id']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: is it important to call this early*? why not just traceId?
| : undefined; | ||
| | ||
| const result = await manager.runAction( | ||
| { key, input, context, runtimeId }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's also telemetryLabels... but I wonder, might as well just pass req.body as RunActionRequest here?
| | ||
| const result = await manager.runAction( | ||
| { key, input, context }, | ||
| { key, input, context, runtimeId }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.: either add telemetryLabels or req.body as RunActionRequest
| .openapi('TraceData'); | ||
| export type TraceData = z.infer<typeof TraceDataSchema>; | ||
| | ||
| export const SpantEventBaseSchema = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used by Dev UI
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
Co-authored-by: Pavel Jbanov <pavelj@google.com>
…o jh-telemetry