Documentation ¶
Index ¶
- func AddNewTagKey(views []*view.View, key *tag.Key) []*view.View
- func AddTagKeyToCtx(ctx context.Context, key tag.Key, value string) context.Context
- func GetTraceSamplingRate(rate string) float64
- func IsTracingEnabled(rate string) bool
- func NewMeasureView(measure stats.Measure, keys []tag.Key, aggregation *view.Aggregation) *view.View
- func SpanFromContext(ctx context.Context) *trace.Span
- func SpanToFastHTTPContext(ctx *fasthttp.RequestCtx, span *trace.Span)
- func TraceSampler(samplingRate string) trace.StartOption
- func WithTags(opts ...interface{}) []tag.Mutator
- type StdoutExporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewTagKey ¶
AddNewTagKey adds new tag keys to existing view
func AddTagKeyToCtx ¶
AddTagKeyToCtx assigns opencensus tag key value to context
func GetTraceSamplingRate ¶
GetTraceSamplingRate parses the given rate and returns the parsed rate
func IsTracingEnabled ¶
IsTracingEnabled parses the given rate and returns false if sampling rate is explicitly set 0
func NewMeasureView ¶
func NewMeasureView(measure stats.Measure, keys []tag.Key, aggregation *view.Aggregation) *view.View
NewMeasureView creates opencensus View instance using stats.Measure
func SpanFromContext ¶
SpanFromContext returns the SpanContext stored in a context, or nil if there isn't one.
func SpanToFastHTTPContext ¶
func SpanToFastHTTPContext(ctx *fasthttp.RequestCtx, span *trace.Span)
SpanToFastHTTPContext sets span into fasthttp.RequestCtx.
func TraceSampler ¶
func TraceSampler(samplingRate string) trace.StartOption
TraceSampler returns Probability Sampler option.
Types ¶
type StdoutExporter ¶
type StdoutExporter struct{}
StdoutExporter is an open census exporter that writes to stdout.
func (*StdoutExporter) ExportSpan ¶
func (e *StdoutExporter) ExportSpan(sd *trace.SpanData)
ExportSpan implements the open census exporter interface