We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
for docs linked. https://connectrpc.com/docs/go/observability/#enabling-opentelemetry-for-connect
missing an s on WithInterceptor func should be WithInterceptors
having the pkgs to import also makes it a little easier to integrate with.
import ( "connectrpc.com/connect" "connectrpc.com/otelconnect" ) func main() { mux := http.NewServeMux() mux.Handle(pingv1connect.NewPingServiceHandler( &pingv1connect.UnimplementedPingServiceHandler{}, connect.WithInterceptors( otelconnect.NewInterceptor(), ), )) http.ListenAndServe("localhost:8080", mux) } func makeRequest() { client := pingv1connect.NewPingServiceClient( http.DefaultClient, "http://localhost:8080", connect.WithInterceptors( otelconnect.NewInterceptor(), ), ) resp, err := client.Ping( context.Background(), connect.NewRequest(&pingv1.PingRequest{}), ) if err != nil { log.Fatal(err) } log.Print(resp) }
The text was updated successfully, but these errors were encountered:
Thanks for reporting! I've made a change in the example code to highlight the changes needed. Is that helpful? Or would a full example be more useful?
Sorry, something went wrong.
i think both are fine. full code snippet could be too verbose for some people. But it is fine for now.
Successfully merging a pull request may close this issue.
for docs linked.
https://connectrpc.com/docs/go/observability/#enabling-opentelemetry-for-connect
missing an s on WithInterceptor func should be WithInterceptors
having the pkgs to import also makes it a little easier to integrate with.
The text was updated successfully, but these errors were encountered: