type messageType … // Event adds an event of the messageType to the span associated with the // passed context with a message id. func (m messageType) Event(ctx context.Context, id int, _ interface{ … } var messageSent … var messageReceived … // UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable // for use in a grpc.NewClient call. // // Deprecated: Use [NewClientHandler] instead. func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor { … } type clientStream … var _ … func (w *clientStream) RecvMsg(m interface{ … } func (w *clientStream) SendMsg(m interface{ … } func (w *clientStream) Header() (metadata.MD, error) { … } func (w *clientStream) CloseSend() error { … } func wrapClientStream(s grpc.ClientStream, desc *grpc.StreamDesc, span trace.Span, cfg *config) *clientStream { … } func (w *clientStream) endSpan(err error) { … } // StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable // for use in a grpc.NewClient call. // // Deprecated: Use [NewClientHandler] instead. func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor { … } // UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable // for use in a grpc.NewServer call. // // Deprecated: Use [NewServerHandler] instead. func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor { … } type serverStream … func (w *serverStream) Context() context.Context { … } func (w *serverStream) RecvMsg(m interface{ … } func (w *serverStream) SendMsg(m interface{ … } func wrapServerStream(ctx context.Context, ss grpc.ServerStream, cfg *config) *serverStream { … } // StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable // for use in a grpc.NewServer call. // // Deprecated: Use [NewServerHandler] instead. func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor { … } // telemetryAttributes returns a span name and span and metric attributes from // the gRPC method and peer address. func telemetryAttributes(fullMethod, peerAddress string) (string, []attribute.KeyValue, []attribute.KeyValue) { … } // peerAttr returns attributes about the peer address. func peerAttr(addr string) []attribute.KeyValue { … } // peerFromCtx returns a peer address from a context, if one exists. func peerFromCtx(ctx context.Context) string { … } // statusCodeAttr returns status code attribute based on given gRPC code. func statusCodeAttr(c grpc_codes.Code) attribute.KeyValue { … } // serverStatus returns a span status code and message for a given gRPC // status code. It maps specific gRPC status codes to a corresponding span // status code and message. This function is intended for use on the server // side of a gRPC connection. // // If the gRPC status code is Unknown, DeadlineExceeded, Unimplemented, // Internal, Unavailable, or DataLoss, it returns a span status code of Error // and the message from the gRPC status. Otherwise, it returns a span status // code of Unset and an empty message. func serverStatus(grpcStatus *status.Status) (codes.Code, string) { … }