d
a
let me put up a sample example
I tried making this example work. We discussed the same earlier. Changing the above
main.go
with attached file, I was able to receive traces. Hope it helps!
notice the change in 1st line of main
Copy code
tp := initTracer()
    // tp := config.Init()
and I defined the
initTracer()
function as given in docs
@User Let me know if you face more difficulties. I can detail down steps further if needed
d
thank you @User, till now i stick with the lib otlptracegprc and i have setup traces and spans manually adding attributes and events. This solution doesnt seem to fit for my case neither i found easy to read because it stream on send and on rcv
a
Let me know how I can help you..you can be as detailed as possible. I can dig deeper into it
d
that i understood it better! I have few doubts tough , can i ask you if at
Copy code
s := grpc.NewServer(
		grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()),
		grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor()),
	)

	api.RegisterHelloServiceServer(s, &server{})
the last row what id does ? To be specific , my API implement as signature just an http.ResponseWriter and Request, how can i intercept them with grpc and how can i integrate them within my gorilla mux route ?
a
api.RegisterHelloServiceServer(s, &server{})
this is specific to grpc. Are you using http server or grpc server in your application? How do you create your server in application? Also, does the
If you are using gorillamux:
section at https://signoz.io/docs/instrumentation/golang/ not work? Otel has specific middleware for gorillamux
d
im using the specific instrumentation that u sent by link 🙂
im using http server in my app