Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[instrumentation/google.golang.org/grpc/otelgrpc] Do not assume Handl…
…eRPC receives a gRPCContext (#4825) * [instrumentation/google.golang.org/grpc/otelgrpc] Add safeguard to HandleRPC To help prevent crashes such as open-telemetry/opentelemetry-collector/issues/9296, check if the context is nil before proceeding. This is inspired by: https://github.com/grpc/grpc-go/blob/ddd377f19841eae70862559c854d957d61b3b692/stats/opencensus/opencensus.go#L204-L207 * Add changelog entry * Create and handle error * Make check a bit more clear * Update instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> * Remove unused code * additional check for gctx --------- Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
- Loading branch information