Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StartSpanOnTaskStart will start the span as soon as the task starts running. StartSpanOnTaskStart = StartSpan(iota) // StartSpanOnLastDepend will start the as soon as the task's last depend() call is done. // This mode is best used when all your tasks resolve all their dependencies as soon // as they're started. StartSpanOnLastDepend )
Variables ¶
View Source
var WithDisableTracing taskset.Property = func(task *taskset.Task) {
task.ModifyProperty(disableTracingProperty{}, func(_ interface{}) interface{} {
return struct{}{}
})
}
WithDisableTracing disables tracing for a particular task.
Functions ¶
func NewOpentracing ¶
func NewOpentracing(startSpan StartSpan) taskset.Middleware
NewOpentracing creates a middleware that creates an opentracing span for each task.
Tracing can be disabled for a particular task using WithDisableTracing.
The operation name of the spans can be set using WithSpanOpName. If no name is set, it's formed as "taskset:" + properties.Name(task). If a task has no name, the operation name will be "taskset:task".
Start time of each span can be controlled using StartSpan.
func WithSpanOpName ¶
WithSpanOpName sets the span operation name for a task.
Types ¶
Click to show internal directories.
Click to hide internal directories.