Documentation ¶
Index ¶
- Constants
- Variables
- func CombineTraceProtos(traceA, traceB *tempopb.Trace) (*tempopb.Trace, int, int, int)
- func CombineTraces(objA []byte, objB []byte) []byte
- func HexStringToTraceID(id string) ([]byte, error)
- func IsConnCanceled(err error) bool
- func PrefixConfig(prefix string, option string) string
- func QueryTrace(baseURL, id, orgID string) (*tempopb.Trace, error)
- func TokenFor(userID string, b []byte) uint32
- func TokenForTraceID(b []byte) uint32
- type MultiError
- type RateLimitedLogger
Constants ¶
View Source
const ( AcceptHeaderKey = "Accept" ProtobufTypeHeaderValue = "application/protobuf" )
View Source
const (
// FakeTenantID is the tenant ID to be used when operating with authorization disabled
FakeTenantID = "single-tenant"
)
Variables ¶
View Source
var ErrTraceNotFound = errors.New("trace not found")
ErrTraceNotFound can be used when we don't find a trace
Functions ¶
func CombineTraceProtos ¶
CombineTraceProtos combines two trace protos into one. Note that it is destructive.
All spans are combined into traceA. spanCountA, B, and Total are returned for logging purposes.
func CombineTraces ¶
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 TokenForTraceID ¶
TokenForTraceID generates a hashed value for a trace id
Types ¶
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{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.