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

Implement grpc.StatsHandler for grpc instrumentation #197

Closed
bogdandrutu opened this issue Jul 31, 2020 · 5 comments · Fixed by #3002
Closed

Implement grpc.StatsHandler for grpc instrumentation #197

bogdandrutu opened this issue Jul 31, 2020 · 5 comments · Fixed by #3002
Assignees
Labels
area: instrumentation Related to an instrumentation package instrumentation: otelgrpc

Comments

@bogdandrutu
Copy link
Member

See OpenCensus https://godoc.org/go.opencensus.io/plugin/ocgrpc

Much easier to use and implement, now:

s := grpc.NewServer(
		grpc.UnaryInterceptor(grpctrace.UnaryServerInterceptor(global.Tracer(""))),
		grpc.StreamInterceptor(grpctrace.StreamServerInterceptor(global.Tracer(""))),
	)

After:

s := grpc.NewServer(grpc.StatsHandler(&grpctrace.NewServerHandler(global.Tracer(""))))
@MrAlias MrAlias self-assigned this Jul 31, 2020
@dackroyd
Copy link
Contributor

dackroyd commented Aug 4, 2020

The stats handler approach also allows cases to be captured that the interceptors do not, like a failure to decode the message. We ran into that case with OpenTracing using interceptors where a mismatching proto definition was used between the client and server. There was no indication in metrics, traces or logs that a request had even reached the server, making the issue more difficult to diagnose.

@MrAlias MrAlias transferred this issue from open-telemetry/opentelemetry-go Aug 6, 2020
@MrAlias MrAlias added area: instrumentation Related to an instrumentation package release:required-for-ga labels Aug 6, 2020
@MrAlias MrAlias added this to the RC1 milestone Sep 3, 2020
@MrAlias MrAlias removed this from the RC1 milestone Feb 18, 2021
plantfansam referenced this issue in plantfansam/opentelemetry-go-contrib Mar 18, 2022
* Make span start/end configuration more greppable

Rename SpanOption to StartOption
Rename StartOptions to StartConfig
Rename EndOptions to EndConfig

fixes #197
@bakins
Copy link

bakins commented Sep 15, 2022

I quickly implemented https://github.com/bakins/otel-grpc-statshandler as I ran into similar issues. Needs more testing, etc.

@fatsheep9146
Copy link
Contributor

@MrAlias Could you assign this to me, if you do not have enough bandwidth?
Since I think #2840 now is slightly blocked by this issue, I think it is a proper time to solve this problem for now and then enrich more metric for grpc.

@vtolstov
Copy link

vtolstov commented Sep 6, 2023

any news ?

@fatsheep9146
Copy link
Contributor

any news ?

@vtolstov #3002 is waiting to be merged to solve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: instrumentation Related to an instrumentation package instrumentation: otelgrpc
Projects
None yet
6 participants