Skip to content
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

example doesn't work #166

Open
domino14 opened this issue Mar 14, 2024 · 1 comment
Open

example doesn't work #166

domino14 opened this issue Mar 14, 2024 · 1 comment

Comments

@domino14
Copy link

	cs := myconsumer.NewConsumerServer()
	api := http.NewServeMux()
	api.Handle(myconsumerv1connect.NewMyServiceHandler(cs, connect.WithInterceptors(
		otelconnect.NewInterceptor())))

gives me the following error:

cannot use otelconnect.NewInterceptor() (value of type error) as connect.Interceptor value in argument to connect.WithInterceptors: error does not implement connect.Interceptor (missing method WrapStreamingClient)
@emcfarlane
Copy link
Contributor

Thanks for reporting. The example is out of date (will fix). You'll need to declare the interceptor on a new line:

	otelInterceptor, err := otelconnect.NewInterceptor()
	if err != nil {
		log.Fatal(err)
	}

See the godocs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants