Documentation ¶
Index ¶
- Constants
- Variables
- func ToDomain(dbSpan *Span) (*model.Span, error)
- type ChainedTagFilter
- func (tf ChainedTagFilter) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
- func (tf ChainedTagFilter) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
- func (tf ChainedTagFilter) FilterTags(span *model.Span, tags model.KeyValues) model.KeyValues
- type ExactMatchTagFilter
- func (tf ExactMatchTagFilter) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
- func (tf ExactMatchTagFilter) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
- func (tf ExactMatchTagFilter) FilterTags(span *model.Span, tags model.KeyValues) model.KeyValues
- type IndexFilter
- type KeyValue
- type Log
- type Operation
- type Process
- type Span
- type SpanRef
- type TagFilter
- type TagFilterDropAll
- func (f *TagFilterDropAll) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
- func (f *TagFilterDropAll) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
- func (f *TagFilterDropAll) FilterTags(span *model.Span, tags model.KeyValues) model.KeyValues
- type TagInsertion
- type TraceID
- type UniqueTraceIDs
Constants ¶
const ( // DurationIndex represents the flag for indexing by duration. DurationIndex = iota // ServiceIndex represents the flag for indexing by service. ServiceIndex // OperationIndex represents the flag for indexing by service-operation. OperationIndex )
Variables ¶
var DefaultIndexFilter = func(span *Span, index int) bool { return true }
DefaultIndexFilter is a filter that indexes everything.
var DefaultTagFilter = tagFilterImpl{}
DefaultTagFilter returns a filter that retrieves all tags from span.Tags, span.Logs, and span.Process.
var ErrTraceIDWrongLength = errors.New("TraceID is not a 128bit integer")
ErrTraceIDWrongLength is an error that occurs when cassandra has a TraceID that's not 128 bits long
Functions ¶
Types ¶
type ChainedTagFilter ¶ added in v1.1.0
type ChainedTagFilter []TagFilter
ChainedTagFilter applies multiple tag filters in serial fashion.
func NewChainedTagFilter ¶ added in v1.1.0
func NewChainedTagFilter(filters ...TagFilter) ChainedTagFilter
NewChainedTagFilter creates a TagFilter from the variadic list of passed TagFilter.
func (ChainedTagFilter) FilterLogFields ¶ added in v1.1.0
func (tf ChainedTagFilter) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
FilterLogFields calls each FilterLogFields
func (ChainedTagFilter) FilterProcessTags ¶ added in v1.1.0
func (tf ChainedTagFilter) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
FilterProcessTags calls each FilterProcessTags.
func (ChainedTagFilter) FilterTags ¶ added in v1.1.0
FilterTags calls each FilterTags
type ExactMatchTagFilter ¶ added in v1.16.0
type ExactMatchTagFilter struct {
// contains filtered or unexported fields
}
ExactMatchTagFilter filters out all tags in its tags slice
func NewBlacklistFilter ¶ added in v1.16.0
func NewBlacklistFilter(tags []string) ExactMatchTagFilter
NewBlacklistFilter is a convenience method for creating a blacklist ExactMatchTagFilter
func NewWhitelistFilter ¶ added in v1.16.0
func NewWhitelistFilter(tags []string) ExactMatchTagFilter
NewWhitelistFilter is a convenience method for creating a whitelist ExactMatchTagFilter
func (ExactMatchTagFilter) FilterLogFields ¶ added in v1.16.0
func (tf ExactMatchTagFilter) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
FilterLogFields implements TagFilter
func (ExactMatchTagFilter) FilterProcessTags ¶ added in v1.16.0
func (tf ExactMatchTagFilter) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
FilterProcessTags implements TagFilter
func (ExactMatchTagFilter) FilterTags ¶ added in v1.16.0
FilterTags implements TagFilter
type IndexFilter ¶ added in v1.6.0
IndexFilter filters out any spans that should not be indexed depending on the index specified.
type KeyValue ¶
type KeyValue struct { Key string `cql:"key"` ValueType string `cql:"value_type"` ValueString string `cql:"value_string"` ValueBool bool `cql:"value_bool"` ValueInt64 int64 `cql:"value_long"` // using more natural column name for Cassandra ValueFloat64 float64 `cql:"value_double"` // using more natural column name for Cassandra ValueBinary []byte `cql:"value_binary"` }
KeyValue is the UDT representation of a Jaeger KeyValue.
func (*KeyValue) MarshalUDT ¶
MarshalUDT handles marshalling a Tag.
type Log ¶
Log is the UDT representation of a Jaeger Log.
func (*Log) MarshalUDT ¶
MarshalUDT handles marshalling a Log.
type Operation ¶ added in v1.16.0
Operation defines schema for records saved in operation_names_v2 table
type Process ¶
Process is the UDT representation of a Jaeger Process.
func (*Process) MarshalUDT ¶
MarshalUDT handles marshalling a Process.
type Span ¶
type Span struct { TraceID TraceID SpanID int64 ParentID int64 // deprecated OperationName string Flags int32 StartTime int64 Duration int64 Tags []KeyValue Logs []Log Refs []SpanRef Process Process ServiceName string SpanHash int64 }
Span is the database representation of a span.
func FromDomain ¶
FromDomain converts a domain model.Span to a database Span
type SpanRef ¶
type SpanRef struct { RefType string `cql:"ref_type"` TraceID TraceID `cql:"trace_id"` SpanID int64 `cql:"span_id"` }
SpanRef is the UDT representation of a Jaeger Span Reference.
func (*SpanRef) MarshalUDT ¶
MarshalUDT handles marshalling a SpanRef.
type TagFilter ¶ added in v0.9.0
type TagFilter interface { FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues FilterTags(span *model.Span, tags model.KeyValues) model.KeyValues FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues }
TagFilter filters out any tags that should not be indexed.
type TagFilterDropAll ¶ added in v1.16.0
type TagFilterDropAll struct {
// contains filtered or unexported fields
}
TagFilterDropAll filters all fields of a given type.
func NewTagFilterDropAll ¶ added in v1.16.0
func NewTagFilterDropAll(dropTags bool, dropProcessTags bool, dropLogs bool) *TagFilterDropAll
NewTagFilterDropAll return a filter that filters all of the specified type
func (*TagFilterDropAll) FilterLogFields ¶ added in v1.16.0
func (f *TagFilterDropAll) FilterLogFields(span *model.Span, logFields model.KeyValues) model.KeyValues
FilterLogFields implements TagFilter
func (*TagFilterDropAll) FilterProcessTags ¶ added in v1.16.0
func (f *TagFilterDropAll) FilterProcessTags(span *model.Span, processTags model.KeyValues) model.KeyValues
FilterProcessTags implements TagFilter
func (*TagFilterDropAll) FilterTags ¶ added in v1.16.0
FilterTags implements TagFilter
type TagInsertion ¶
TagInsertion contains the items necessary to insert a tag for a given span
func GetAllUniqueTags ¶
func GetAllUniqueTags(span *model.Span, tagFilter TagFilter) []TagInsertion
GetAllUniqueTags creates a list of all unique tags from a set of filtered tags.
func (TagInsertion) String ¶
func (t TagInsertion) String() string
type TraceID ¶
type TraceID [16]byte
TraceID is a serializable form of model.TraceID
func TraceIDFromDomain ¶
TraceIDFromDomain converts domain TraceID into serializable DB representation.
func (TraceID) MarshalCQL ¶
MarshalCQL handles marshaling DBTraceID (e.g. in SpanRef)
type UniqueTraceIDs ¶
type UniqueTraceIDs map[TraceID]struct{}
UniqueTraceIDs is a set of unique dbmodel TraceIDs, implemented via map.
func IntersectTraceIDs ¶
func IntersectTraceIDs(uniqueTraceIdsList []UniqueTraceIDs) UniqueTraceIDs
IntersectTraceIDs takes a list of UniqueTraceIDs and intersects them.
func UniqueTraceIDsFromList ¶
func UniqueTraceIDsFromList(traceIDs []TraceID) UniqueTraceIDs
UniqueTraceIDsFromList Takes a list of traceIDs and returns the unique set
func (UniqueTraceIDs) Add ¶
func (u UniqueTraceIDs) Add(traceID TraceID)
Add adds a traceID to the existing map