Documentation ¶
Index ¶
- Constants
- Variables
- func Init(domain string, opt Option) error
- func LogError(err error, args ...string)
- func LogErrorWithCategory(err error, category string)
- func LogEvent(mtype, name string, args ...string)
- func LogMetricForCount(name string, args ...int)
- func LogMetricForDuration(name string, duration time.Duration)
- func LogRemoteCallClient(t message.Transactor)
- func LogRemoteCallServer(ctx *message.Context, t message.Transactor)
- func MessageContextFromMetadata(md metadata.MD) *message.Context
- func MessageContextFromRequest(r *http.Request) *message.Context
- func NewCompletedTransactionWithDuration(mtype, name string, duration time.Duration)
- func NewEvent(mtype, name string) message.Messager
- func NewTransaction(mtype, name string) message.Transactor
- func Shutdown()
- func StartEvent(ctx context.Context, mtype, name string) message.Messager
- func StartTransaction(ctx context.Context, mtype, name string) message.Transactor
- func TransactionFromContext(ctx context.Context) message.Transactor
- func TransactionWithContext(ctx context.Context, t message.Transactor) context.Context
- type MetricHelper
- type Option
Constants ¶
View Source
const ( HeaderRootId = "_catRootMessageId" HeaderParentId = "_catParentMessageId" HeaderChildId = "_catChildMessageId" )
Variables ¶
Functions ¶
func LogErrorWithCategory ¶
func LogMetricForCount ¶
func LogMetricForDuration ¶
func LogRemoteCallClient ¶ added in v1.0.4
func LogRemoteCallClient(t message.Transactor)
func LogRemoteCallServer ¶ added in v1.0.4
func LogRemoteCallServer(ctx *message.Context, t message.Transactor)
func MessageContextFromMetadata ¶ added in v1.0.5
func MessageContextFromRequest ¶ added in v1.0.5
func NewTransaction ¶
func NewTransaction(mtype, name string) message.Transactor
func StartEvent ¶ added in v1.0.5
func StartTransaction ¶ added in v1.0.5
func StartTransaction(ctx context.Context, mtype, name string) message.Transactor
func TransactionFromContext ¶ added in v1.0.5
func TransactionFromContext(ctx context.Context) message.Transactor
func TransactionWithContext ¶ added in v1.0.5
Types ¶
type MetricHelper ¶
type MetricHelper interface { AddTag(key, val string) MetricHelper Count(int) Duration(time.Duration) }
func NewMetricHelper ¶
func NewMetricHelper(name string) MetricHelper
Click to show internal directories.
Click to hide internal directories.