import ddTrace from "dd-trace";
import * as opentracing from "opentracing";
import pack from "../../../package.json";
module.exports = (serviceName = "quirrel") => {
    var _a;
    if (process.env.DD_TRACE_ENABLED !== "true") {
        return;
    }
    const tracer = ddTrace.init({
        service: serviceName,
        version: (_a = process.env.HEROKU_SLUG_COMMIT) !== null && _a !== void 0 ? _a : pack.version,
    });
    opentracing.initGlobalTracer(tracer);
};
//# sourceMappingURL=tracer.js.map