-
Notifications
You must be signed in to change notification settings - Fork 1
Instrumentation for Gemini via Google GenAIClient library #14
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
Conversation
eed887d to
53685c4
Compare
53685c4 to
2bf5b19
Compare
| var requestJson = JSON_MAPPER.readValue(requestBody, Map.class); | ||
|
|
||
| // Extract metadata fields | ||
| for (String field : |
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.
my recommendation is to pass the literal input and output to the span. at rest it'll look liek
(ref)
you may find that the ui will automatically render java produced spans automatically
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.
Yeah I agree, I'd much rather do that (or even better just send the entire request/response body and let the backend sort it out)
I think we need to update the backend to support otel here? I tried just sending the input contents directly on both braintrust.input and braintrust.input_json but the BE doesn't recognize that as an LLM message (I just get raw json/yaml views)
| } | ||
|
|
||
| span.setAttribute( | ||
| "braintrust.input_json", JSON_MAPPER.writeValueAsString(inputJson)); |
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.
i know that it'll be a little different since we're using otel ingestion, but it should be the same thing if we just make sure the input is literal input and so on.
2bf5b19 to
4312cd2
Compare
|
Talked offline: plan is to update the backend to support parsing gemini messages. Once that is in place I'll update this instrumentation to use that simpler approach, but in the meantime I'm going to merge this in to get gemini support into the SDK. |
No description provided.