Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exporter ¶
func Exporter(exporter sdktrace.SpanExporter, filters ...Filter) sdktrace.SpanExporter
Exporter wraps the provided exporter and applies the filters to the spans sent to the exporter's ExportSpans function.
func Spans ¶
func Spans(spans []sdktrace.ReadOnlySpan, filters ...Filter) []sdktrace.ReadOnlySpan
Spans takes a list of ReadOnlySpans and applies the filter each span, returning a new list of spans.
Types ¶
type Filter ¶
type Filter func(span sdktrace.ReadOnlySpan) sdktrace.ReadOnlySpan
Filter is a filter function that will be applied to each span via Spans. If the span argument is nil then the Filter must return nil and this span will be removed from the list returned from Spans.
func ContextCancelNormal ¶
func ContextCancelNormal() Filter
ContextCancelNormal will downgrade spans "errors" that were caused by context.Canceled
func ErrorNormal ¶
ErrorNormal is for matching an error span and upgrading it to OK where the msg matches the Status.Description and all provides attrs are found on the span.
func HTTPStatusNormal ¶
HTTPStatusNormal will convert errors spans with provided status code into non-error "normal" spans. For example you might want to allow 404 status codes as valid response and now have those spans show up as errors.