# Functions
AddErrorCurrentSpan get current span from context and adds error into it.
AddErrorSpan adds error into span.
AddMessageCurrentSpan get current span from context and adds message into it.
AddMessageSpan adds message into span.
AlwaysGRPC for each call returns true.
AlwaysHTTP for each request returns true.
CurrentSpan returns current span.
Exporter creates a new OC Agent exporter and configure for tracing.
NewMiddleware wrap handler.
NewServerHandler returns wrapper over ocgrpc.ServerHandler.
SamplerForFraction init sampler for specified fraction.
SpanContextAnnotator retrieve information about current span from context or HTTP headersand propogate in binary format to gRPC service.
StartSpan starts span with name.
TagCurrentSpan get current span from context and tag it.
TagSpan tags span.
WithGRPCPayloadAnnotation add Inbound/Outbound payload as an attribute to span if f returns true.
WithGRPCPayloadLimit limit payload size propogated to spanin case payload exceeds limit, payload truncated andannotation payload.truncated=true added into span.
WithHeaderMatcher set header matcher to filterout or preprocess headers.
WithHeadersAnnotation annotate span with http headers.
WithHTTPPayloadSize limit payload size propogated to spanin case payload exceeds limit, payload truncated andannotation payload.truncated=true added into span.
WithMetadataAnnotation annotate span with request metadata.
WithMetadataMatcher set metadata matcher to filterout or preprocess metadata.
WithPayloadAnnotation add request/response body as an attribute to span if f returns true.
# Constants
DefaultMaxPayloadSize represent max payload size which will be added to span.
ObfuscationFactor is a percent of value which will be omitted from obfuscated value.
RequestHeaderAnnotationPrefix is a prefix which is added to each request header attribute.
RequestPayloadAnnotationKey is a key under which request payload stored in span.
RequestTrailerAnnotationPrefix is a prefix which is added to each request trailer attribute.
ResponseErrorKey is a key under which response error will be stored in span.
ResponseHeaderAnnotationPrefix is a prefix which is added to each response header attribute.
ResponsePayloadAnnotationKey is a key under which response payload stored in span.
ResponseTrailerAnnotationPrefix is a prefix which is added to each response header attribute.
TruncatedMarkerKey is a key for annotation which will be presented in span in case payload was truncated.
TruncatedMarkerValue is a value for annotation which will be presented in span in case payload was truncated.
# Variables
ErrSpanNotFound is an error which signal that there is no currently active spans.
# Structs
Handler is a opencensus http plugin wrapper which do some usefull things to reach traces.
ServerHandler is a wrapper over ocgrpc.ServerHandlerwrapper extends metadata added into the span.
# Type aliases
GRPCOption allows extending handler with additional functionality.
HTTPOption allows extending handler with additional functionality.