-
Notifications
You must be signed in to change notification settings - Fork 371
feat(go): update telemetry #3264
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
…eprovider if exists
…into jh-go-telemetry
g, err := genkit.Init(ctx) | ||
if err != nil { | ||
return err | ||
// [START enablecustom] |
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.
unclear on exactly how START / END works and how it impacts docs
@@ -26,62 +26,131 @@ import ( | |||
"go.opentelemetry.io/otel/sdk/trace" |
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.
not exaclty sure how these doc snippets work; need to make sure they display well
go/core/tracing/tracing.go
Outdated
} | ||
|
||
// RunInNewSpan runs f on input in a new span with the provided metadata. | ||
// The metadata contains all span configuration including name, type, labels, etc. | ||
func RunInNewSpan[I, O any]( | ||
ctx context.Context, | ||
tstate *State, |
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.
Do we still need to take this in? Right now what's checked in main
is just a global getter for the tracer provider, so it could just be called within this function, right?
Metrics

(Will add thought metrics as a fast follow; they were added recently and don't want to keep exploding this PR)
Basic success flow
Error flow
Substep flow
Tool flow
(The Tool View looks slightly different because our tool loop inside the Generate() call is implemented slightly differently, that requires some more refactoring if we want the views to look exactly the same)