Allow workers to emit traces
workers can now be configured to emit trace events.
Next step will be to actually emit stuff when tracing is configured on a
worker.
@@ -11,6 +11,7 @@ import (
"github.com/concourse/concourse"
"github.com/concourse/concourse/atc/worker/gardenruntime/gclient"
concourseCmd "github.com/concourse/concourse/cmd"
+ "github.com/concourse/concourse/tracing"
"github.com/concourse/concourse/worker"
"github.com/concourse/concourse/worker/baggageclaim/baggageclaimcmd"
bclient "github.com/concourse/concourse/worker/baggageclaim/client"
@@ -40,6 +41,8 @@ type WorkerCommand struct {
HealthcheckBindPort uint16 `long:"healthcheck-bind-port" default:"8888" description:"Port on which to listen for health checking requests."`
HealthCheckTimeout time.Duration `long:"healthcheck-timeout" default:"5s" description:"HTTP timeout for the full duration of health checking."`
+ Tracing tracing.Config `group:"Tracing" namespace:"tracing"`
+
SweepInterval time.Duration `long:"sweep-interval" default:"30s" description:"Interval on which containers and volumes will be garbage collected from the worker."`
VolumeSweeperMaxInFlight uint16 `long:"volume-sweeper-max-in-flight" default:"3" description:"Maximum number of volumes which can be swept in parallel."`
ContainerSweeperMaxInFlight uint16 `long:"container-sweeper-max-in-flight" default:"5" description:"Maximum number of containers which can be swept in parallel."`
@@ -81,6 +84,11 @@ func (cmd *WorkerCommand) Runner(args []string) (ifrit.Runner, error) {
logger, _ := cmd.Logger.Logger("worker")
+ err := cmd.Tracing.Prepare()
+ if err != nil {
+ return nil, err
+ }
+
atcWorker, gardenServerRunner, err := cmd.gardenServerRunner(logger.Session("garden"))
if err != nil {
return nil, err
