Versions in this module Expand all Collapse all v0 v0.22.0 Jun 22, 2020 Changes in this version + const DefaultMaxPayloadSize + const ObfuscationFactor + const RequestHeaderAnnotationPrefix + const RequestPayloadAnnotationKey + const RequestTrailerAnnotationPrefix + const ResponseErrorKey + const ResponseHeaderAnnotationPrefix + const ResponsePayloadAnnotationKey + const ResponseTrailerAnnotationPrefix + const TruncatedMarkerKey + const TruncatedMarkerValue + var ErrSpanNotFound = errors.New("there is no currently active spans") + func AddErrorCurrentSpan(ctx context.Context, err error) error + func AddErrorSpan(span *trace.Span, err error) error + func AddMessageCurrentSpan(ctx context.Context, message string, attrs ...trace.Attribute) error + func AddMessageSpan(span *trace.Span, message string, attrs ...trace.Attribute) + func AlwaysGRPC(_ context.Context, _ stats.RPCStats) bool + func AlwaysHTTP(_ *http.Request) bool + func CurrentSpan(ctx context.Context) (*trace.Span, error) + func Exporter(address string, serviceName string, sampler trace.Sampler) error + func NewMiddleware(ops ...HTTPOption) func(http.Handler) http.Handler + func SamplerForFraction(fraction float64) trace.Sampler + func SpanContextAnnotator(ctx context.Context, req *http.Request) metadata.MD + func StartSpan(ctx context.Context, name string) (context.Context, *trace.Span) + func TagCurrentSpan(ctx context.Context, attrs ...trace.Attribute) error + func TagSpan(span *trace.Span, attrs ...trace.Attribute) + type GRPCOption func(*gRPCOptions) + func WithGRPCPayloadAnnotation(f func(context.Context, stats.RPCStats) bool) GRPCOption + func WithGRPCPayloadLimit(limit int) GRPCOption + func WithMetadataAnnotation(f func(context.Context, stats.RPCStats) bool) GRPCOption + func WithMetadataMatcher(f func(string) (string, bool)) GRPCOption + type HTTPOption func(*httpOptions) + func WithHTTPPayloadSize(maxSize int) HTTPOption + func WithHeaderMatcher(f func(string) (string, bool)) HTTPOption + func WithHeadersAnnotation(f func(*http.Request) bool) HTTPOption + func WithPayloadAnnotation(f func(*http.Request) bool) HTTPOption + type Handler struct + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerHandler struct + func NewServerHandler(ops ...GRPCOption) *ServerHandler + func (s *ServerHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)