Documentation ¶
Index ¶
- Constants
- Variables
- func EqualHexStringTraceIDs(a, b string) (bool, error)
- func ExtractTraceID(ctx context.Context) (string, bool)
- func HexStringToTraceID(id string) ([]byte, error)
- func IsConnCanceled(err error) bool
- func PrefixConfig(prefix string, option string) string
- func RandomAttrFromTrace(t *tempopb.Trace) *v1common.KeyValue
- func TokenFor(userID string, b []byte) uint32
- func TokenForTraceID(b []byte) uint32
- func TraceIDToHexString(byteID []byte) string
- type Client
- type MultiError
- type RateLimitedLogger
- type TraceInfo
- func (t *TraceInfo) ConstructTraceFromEpoch() (*tempopb.Trace, error)
- func (t *TraceInfo) Done()
- func (t *TraceInfo) EmitAllBatches(c *jaeger_grpc.Reporter) error
- func (t *TraceInfo) EmitBatches(c *jaeger_grpc.Reporter) error
- func (t *TraceInfo) HexID() string
- func (t *TraceInfo) LongWritesRemaining() int64
- func (t *TraceInfo) Ready(now time.Time, writeBackoff, longWriteBackoff time.Duration) bool
- func (t *TraceInfo) Timestamp() time.Time
- func (t *TraceInfo) TraceID() ([]byte, error)
Constants ¶
const (
// FakeTenantID is the tenant ID to be used when operating with authorization disabled
FakeTenantID = "single-tenant"
)
Variables ¶
var ErrSearchKeyValueNotFound = errors.New("key/value not found")
ErrSearchKeyValueNotFound is used to indicate the requested key/value pair was not found.
var ErrTraceNotFound = errors.New("trace not found")
ErrTraceNotFound can be used when we don't find a trace
Functions ¶
func EqualHexStringTraceIDs ¶ added in v1.2.0
EqualHexStringTraceIDs compares two trace ID strings and compares the resulting bytes after padding. Returns true unless there is a reason not to.
func ExtractTraceID ¶ added in v1.1.0
ExtractTraceID extracts the trace id, if any from the context.
func HexStringToTraceID ¶
func IsConnCanceled ¶
IsConnCanceled returns true, if error is from a closed gRPC connection. copied from https://github.com/etcd-io/etcd/blob/7f47de84146bdc9225d2080ec8678ca8189a2d2b/clientv3/client.go#L646
func PrefixConfig ¶
func RandomAttrFromTrace ¶ added in v1.2.0
func TokenForTraceID ¶
TokenForTraceID generates a hashed value for a trace id
func TraceIDToHexString ¶ added in v1.2.0
TraceIDToHexString converts a trace ID to its string representation and removes any leading zeros.
Types ¶
type Client ¶ added in v1.2.0
Client is client to the Tempo API.
func (*Client) QueryTrace ¶ added in v1.2.0
func (*Client) Search ¶ added in v1.2.0
func (c *Client) Search(tags string) (*tempopb.SearchResponse, error)
Search Tempo. tags must be in logfmt format, that is "key1=value1 key2=value2"
func (*Client) SearchTagValues ¶ added in v1.2.0
func (c *Client) SearchTagValues(key string) (*tempopb.SearchTagValuesResponse, error)
func (*Client) SearchTags ¶ added in v1.2.0
func (c *Client) SearchTags() (*tempopb.SearchTagsResponse, error)
type MultiError ¶
type MultiError []error
The MultiError type implements the error interface, and contains the Errors used to construct it.
func (*MultiError) Add ¶
func (es *MultiError) Add(err error)
Add adds the error to the error list if it is not nil.
func (MultiError) Err ¶
func (es MultiError) Err() error
Err returns the error list as an error or nil if it is empty.
func (MultiError) Error ¶
func (es MultiError) Error() string
Returns a concatenated string of the contained errors
type RateLimitedLogger ¶
type RateLimitedLogger struct {
// contains filtered or unexported fields
}
func NewRateLimitedLogger ¶
func NewRateLimitedLogger(logsPerSecond int, logger log.Logger) *RateLimitedLogger
func (*RateLimitedLogger) Log ¶
func (l *RateLimitedLogger) Log(keyvals ...interface{})
type TraceInfo ¶ added in v1.2.0
type TraceInfo struct {
// contains filtered or unexported fields
}
TraceInfo is used to construct synthetic traces and manage the expectations.
func NewTraceInfo ¶ added in v1.2.0
NewTraceInfo is used to produce a new TraceInfo.
func (*TraceInfo) ConstructTraceFromEpoch ¶ added in v1.2.0
func (*TraceInfo) EmitAllBatches ¶ added in v1.2.0
func (t *TraceInfo) EmitAllBatches(c *jaeger_grpc.Reporter) error
EmitAllBatches sends all the batches that would normally be sent at some interval when using EmitBatches.
func (*TraceInfo) EmitBatches ¶ added in v1.2.0
func (t *TraceInfo) EmitBatches(c *jaeger_grpc.Reporter) error