Documentation ¶
Index ¶
- Constants
- Variables
- func Matches(body string) ([]string, error)
- type BufferedSpans
- func (s *BufferedSpans) Count() (int, error)
- func (s *BufferedSpans) Delete(ctx context.Context, id string) error
- func (s *BufferedSpans) DeleteAll(ctx context.Context) error
- func (s *BufferedSpans) Get(ctx context.Context, tracer opentracing.Tracer, id string) (*StoreEntry, error)
- func (s *BufferedSpans) Monitor(ctx context.Context, interval time.Duration, name string)
- func (s *BufferedSpans) Set(ctx context.Context, id string, entry StoreEntry) error
- type SpanMissingError
- type SpanMissingIDError
- type SpanStore
- type Spans
- type StoreEntry
Constants ¶
View Source
const TracePrefix string = "vs"
Variables ¶
View Source
var ( BufferedSpansTotal = stats.Float64( "traces/stores/buffered_spans/total", "Gauge total number of current buffered spans", stats.UnitDimensionless, ) BufferedSpansTotalView = &view.View{ Name: "traces/stores/buffered_spans/total", Description: "Gauge total number of current buffered spans", TagKeys: []tag.Key{bufferName}, Measure: BufferedSpansTotal, Aggregation: view.LastValue(), } BufferedSpansPercentage = stats.Float64( "traces/stores/buffered_spans/percentage", "Gauge percentage full current buffer", stats.UnitDimensionless, ) BufferedSpansPercentageView = &view.View{ Name: "traces/stores/buffered_spans/percentage", Description: "Gauge percentage full current buffer", TagKeys: []tag.Key{bufferName}, Measure: BufferedSpansPercentage, Aggregation: view.LastValue(), } )
Functions ¶
Types ¶
type BufferedSpans ¶
type BufferedSpans struct {
// contains filtered or unexported fields
}
BufferedSpans only allows a fixed number of spans at any one time. If the max allowed has been reached it will reject new spans.
func NewBufferedSpanStore ¶ added in v0.1.1
func NewBufferedSpanStore(maxAllowedSpans int) (*BufferedSpans, error)
func (*BufferedSpans) Count ¶
func (s *BufferedSpans) Count() (int, error)
func (*BufferedSpans) Delete ¶
func (s *BufferedSpans) Delete(ctx context.Context, id string) error
Delete removes the id, if present, from the buffered spans collection.
func (*BufferedSpans) DeleteAll ¶ added in v0.2.0
func (s *BufferedSpans) DeleteAll(ctx context.Context) error
func (*BufferedSpans) Get ¶
func (s *BufferedSpans) Get(ctx context.Context, tracer opentracing.Tracer, id string) (*StoreEntry, error)
func (*BufferedSpans) Set ¶
func (s *BufferedSpans) Set(ctx context.Context, id string, entry StoreEntry) error
Set checks to see if there is a free space in the map if there is then it inserts, if there is no free space it returns an error.
type SpanMissingError ¶
type SpanMissingError struct {
Err error
}
func (SpanMissingError) Error ¶
func (s SpanMissingError) Error() string
type SpanMissingIDError ¶
type SpanMissingIDError struct {
Err error
}
func (SpanMissingIDError) Error ¶
func (s SpanMissingIDError) Error() string
type Spans ¶
type Spans struct {
// contains filtered or unexported fields
}
func NewMemoryUnboundedSpanStore ¶ added in v0.1.1
func NewMemoryUnboundedSpanStore() *Spans
type StoreEntry ¶ added in v0.2.0
type StoreEntry struct { Span opentracing.Span State *eventsources.EventState CreatedAt time.Time }
func NewStoreEntryFromSpan ¶ added in v0.3.0
func NewStoreEntryFromSpan(span opentracing.Span) StoreEntry
func (StoreEntry) Duration ¶ added in v0.3.0
func (se StoreEntry) Duration() time.Duration
Click to show internal directories.
Click to hide internal directories.