package tracer

import (
	"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"

	"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
)

var agentAvailable bool

func Start() {
	agentAvailable = envtool.GetEnv("DD_AGENT_HOST", "") != ""
	if agentAvailable {
		tracer.Start()
	}
}

func Stop() {
	if agentAvailable {
		tracer.Stop()
	}
}
