Package grpc is a generated protocol buffer package.

    It is generated from these files:


    It has these top-level messages:


    Package grpc provides functions to trace the package v1.2.

    Example (Client)
    Example (Server)




    This section is empty.


    This section is empty.


    func NewClientStatsHandler

    func NewClientStatsHandler(opts ...Option) stats.Handler

      NewClientStatsHandler returns a gRPC client stats.Handler to trace RPC calls.

      func NewServerStatsHandler

      func NewServerStatsHandler(opts ...Option) stats.Handler

        NewServerStatsHandler returns a gRPC server stats.Handler to trace RPC calls.

        func RegisterFixtureServer

        func RegisterFixtureServer(s *grpc1.Server, srv FixtureServer)

        func StreamClientInterceptor

        func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor

          StreamClientInterceptor returns a grpc.StreamClientInterceptor which will trace client streams using the given set of options.

          func StreamServerInterceptor

          func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor

            StreamServerInterceptor will trace streaming requests to the given gRPC server.

            func UnaryClientInterceptor

            func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor

              UnaryClientInterceptor returns a grpc.UnaryClientInterceptor which will trace requests using the given set of options.

              func UnaryServerInterceptor

              func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor

                UnaryServerInterceptor will trace requests to the given grpc server.


                type FixtureClient

                type FixtureClient interface {
                	Ping(ctx context.Context, in *FixtureRequest, opts ...grpc1.CallOption) (*FixtureReply, error)
                	StreamPing(ctx context.Context, opts ...grpc1.CallOption) (Fixture_StreamPingClient, error)

                func NewFixtureClient

                func NewFixtureClient(cc *grpc1.ClientConn) FixtureClient

                type FixtureReply

                type FixtureReply struct {
                	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`

                  The response message containing the greetings

                  func (*FixtureReply) Descriptor

                  func (*FixtureReply) Descriptor() ([]byte, []int)

                  func (*FixtureReply) GetMessage

                  func (m *FixtureReply) GetMessage() string

                  func (*FixtureReply) ProtoMessage

                  func (*FixtureReply) ProtoMessage()

                  func (*FixtureReply) Reset

                  func (m *FixtureReply) Reset()

                  func (*FixtureReply) String

                  func (m *FixtureReply) String() string

                  type FixtureRequest

                  type FixtureRequest struct {
                  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`

                    The request message containing the user's name.

                    func (*FixtureRequest) Descriptor

                    func (*FixtureRequest) Descriptor() ([]byte, []int)

                    func (*FixtureRequest) GetName

                    func (m *FixtureRequest) GetName() string

                    func (*FixtureRequest) ProtoMessage

                    func (*FixtureRequest) ProtoMessage()

                    func (*FixtureRequest) Reset

                    func (m *FixtureRequest) Reset()

                    func (*FixtureRequest) String

                    func (m *FixtureRequest) String() string

                    type FixtureServer

                    type FixtureServer interface {
                    	Ping(context.Context, *FixtureRequest) (*FixtureReply, error)
                    	StreamPing(Fixture_StreamPingServer) error

                    type Fixture_StreamPingClient

                    type Fixture_StreamPingClient interface {
                    	Send(*FixtureRequest) error
                    	Recv() (*FixtureReply, error)

                    type Fixture_StreamPingServer

                    type Fixture_StreamPingServer interface {
                    	Send(*FixtureReply) error
                    	Recv() (*FixtureRequest, error)

                    type InterceptorOption

                    type InterceptorOption = Option

                      InterceptorOption represents an option that can be passed to the grpc unary client and server interceptors. InterceptorOption is deprecated in favor of Option.

                      func NonErrorCodes

                      func NonErrorCodes(cs InterceptorOption

                        NonErrorCodes determines the list of codes which will not be considered errors in instrumentation. This call overrides the default handling of codes.Canceled as a non-error.

                        type Option

                        type Option func(*config)

                          Option specifies a configuration option for the grpc package. Not all options apply to all instrumented structures.

                          func NoDebugStack

                          func NoDebugStack() Option

                            NoDebugStack disables debug stacks for traces with errors. This is useful in situations where errors are frequent and the overhead of calling debug.Stack may affect performance.

                            func WithAnalytics

                            func WithAnalytics(on bool) Option

                              WithAnalytics enables Trace Analytics for all started spans.

                              func WithAnalyticsRate

                              func WithAnalyticsRate(rate float64) Option

                                WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.

                                func WithIgnoredMetadata

                                func WithIgnoredMetadata(ms ...string) Option

                                  WithIgnoredMetadata specifies keys to be ignored while tracing the metadata. Must be used in conjunction with WithMetadataTags.

                                  func WithIgnoredMethods

                                  func WithIgnoredMethods(ms ...string) Option

                                    WithIgnoredMethods specifies full methods to be ignored by the server side interceptor. When an incoming request's full method is in ms, no spans will be created.

                                    func WithMetadataTags

                                    func WithMetadataTags() Option

                                      WithMetadataTags specifies whether gRPC metadata should be added to spans as tags.

                                      func WithRequestTags

                                      func WithRequestTags() Option

                                        WithRequestTags specifies whether gRPC requests should be added to spans as tags.

                                        func WithServiceName

                                        func WithServiceName(name string) Option

                                          WithServiceName sets the given service name for the intercepted client.

                                          func WithStreamCalls

                                          func WithStreamCalls(enabled bool) Option

                                            WithStreamCalls enables or disables tracing of streaming calls. This option does not apply to the stats handler.

                                            func WithStreamMessages

                                            func WithStreamMessages(enabled bool) Option

                                              WithStreamMessages enables or disables tracing of streaming messages. This option does not apply to the stats handler.