Documentation ¶
Index ¶
- Constants
- Variables
- func FromSpan(span *model.Span, topic, source string, rules TagAppendRules) (*sls.LogGroup, error)
- func InitSpanWriterLogstoreResource(client sls.ClientInterface, project string, logstore string, ...) error
- func NewSpanReader(client sls.ClientInterface, project string, logstore string, ...) spanstore.Reader
- func ToSpan(log map[string]string) (*model.Span, error)
- func ToTraces(logs []map[string]string) ([]*model.Trace, error)
- type SpanReader
- type SpanWriter
- type TagAppendRules
- type TagMappingValue
Constants ¶
View Source
const ( OperationWithPrefix = "OperationWithPrefix" Tags = "Tags" )
Variables ¶
View Source
var ( // ErrServiceNameNotSet occurs when attempting to query with an empty service name ErrServiceNameNotSet = errors.New("Service Name must be set") // ErrStartTimeMinGreaterThanMax occurs when start time min is above start time max ErrStartTimeMinGreaterThanMax = errors.New("Start Time Minimum is above Maximum") // ErrDurationMinGreaterThanMax occurs when duration min is above duration max ErrDurationMinGreaterThanMax = errors.New("Duration Minimum is above Maximum") // ErrMalformedRequestObject occurs when a request object is nil ErrMalformedRequestObject = errors.New("Malformed request object") // ErrStartAndEndTimeNotSet occurs when start time and end time are not set ErrStartAndEndTimeNotSet = errors.New("Start and End Time must be set") )
Functions ¶
func FromSpan ¶
func FromSpan(span *model.Span, topic, source string, rules TagAppendRules) (*sls.LogGroup, error)
FromSpan converts a model.Span to a log record
func InitSpanWriterLogstoreResource ¶
func InitSpanWriterLogstoreResource(client sls.ClientInterface, project string, logstore string, logger *zap.Logger) error
InitSpanWriterLogstoreResource create project, logstore, index, dashboard for jeager collector
func NewSpanReader ¶
func NewSpanReader(client sls.ClientInterface, project string, logstore string, aggLogstore string, logger *zap.Logger, maxLookback time.Duration, metricsFactory metrics.Factory) spanstore.Reader
NewSpanReader returns a new SpanReader with a metrics.
Types ¶
type SpanReader ¶
type SpanReader struct {
// contains filtered or unexported fields
}
SpanReader can query for and load traces from AliCloud Log Service
func (*SpanReader) FindTraces ¶
func (s *SpanReader) FindTraces(traceQuery *spanstore.TraceQueryParameters) ([]*model.Trace, error)
FindTraces retrieves traces that match the traceQuery
func (*SpanReader) GetOperations ¶
func (s *SpanReader) GetOperations(service string) ([]string, error)
GetOperations returns all operations for a specific service traced by Jaeger
func (*SpanReader) GetServices ¶
func (s *SpanReader) GetServices() ([]string, error)
GetServices returns all services traced by Jaeger, ordered by frequency
type SpanWriter ¶
type SpanWriter struct {
// contains filtered or unexported fields
}
func NewSpanWriter ¶
func (*SpanWriter) Close ¶
func (s *SpanWriter) Close() error
type TagAppendRules ¶
type TagAppendRules interface { SpanTagRules() map[string]*TagMappingValue OperationPrefixRules() map[string]*TagMappingValue }
type TagMappingValue ¶
Click to show internal directories.
Click to hide internal directories.