Documentation ¶
Index ¶
- Constants
- func StreamClientInterceptor(tracer Tracer) grpc.StreamClientInterceptor
- func StreamServerInterceptor(tracer Tracer) grpc.StreamServerInterceptor
- func UnaryClientInterceptor(tracer Tracer) grpc.UnaryClientInterceptor
- func UnaryServerInterceptor(tracer Tracer) grpc.UnaryServerInterceptor
- type Span
- type SpanKind
- type Tracer
Constants ¶
const ( RPCMessageTypeSent = "SENT" RPCMessageTypeReceived = "RECEIVED" )
Variables ¶
This section is empty.
Functions ¶
func StreamClientInterceptor ¶
func StreamClientInterceptor(tracer Tracer) grpc.StreamClientInterceptor
StreamClientInterceptor returns a new streaming client interceptor that optionally traces the execution of external gRPC calls. Tracer will use tags (from tags package) available in current context as fields.
func StreamServerInterceptor ¶
func StreamServerInterceptor(tracer Tracer) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new stream server interceptors that optionally traces endpoint handling. Tracer will use tags (from tags package) available in current context as fields.
func UnaryClientInterceptor ¶
func UnaryClientInterceptor(tracer Tracer) grpc.UnaryClientInterceptor
UnaryClientInterceptor returns a new unary client interceptor that optionally traces the execution of external gRPC calls. Tracer will use tags (from tags package) available in current context as fields.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(tracer Tracer) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptors that optionally traces endpoint handling. Tracer will use tags (from tags package) available in current context as fields.
Types ¶
type Span ¶
type Span interface { // End completes the span. No updates are allowed to span after it // ends. The only exception is setting status of the span. End() // SetStatus sets the status of the span in the form of a code // and a message. SetStatus overrides the value of previous // calls to SetStatus on the Span. // // The default span status is OK, so it is not necessary to // explicitly set an OK status on successful Spans unless it // is to add an OK message or to override a previous status on the Span. SetStatus(code codes.Code, msg string) // AddEvent adds an event to the span with key/value pairs as attributes. // Middleware will call it while receiving or sending messages. AddEvent(name string, keyvals ...interface{}) // SetAttributes sets key/value pairs as attributes. If a key // already exists for an attribute of the Span it should be overwritten with // the value. SetAttributes(keyvals ...interface{}) }