lib/trace/core.js
function resolveEventConfig(ringpop, traceEvent) {
    var tracerConfig = tracerConfigMap[traceEvent];
    if (!tracerConfig) {
        return null;
    }
    var sourcePath = tracerConfig.sourcePath;

    // subtle but important -- if we resolve here, then the underlying object
    // can never change. if we do latent resolution, there may be a resource
    // leak when we try to remove listener from something that is out of our
    // reachable scope.
    var emitter = getIn(ringpop, sourcePath.slice(0, -1));
    var event = _.last(sourcePath);

    return emitter && _.defaults(
        {},
        {
            sourceEmitter: emitter,
            sourceEvent: event,
            traceEvent: traceEvent
        },
        tracerConfig
    );
}
function resolveEventConfig(ringpop, traceEvent) {
    var tracerConfig = tracerConfigMap[traceEvent];
    if (!tracerConfig) {
        return null;
    }
    var sourcePath = tracerConfig.sourcePath;

    // subtle but important -- if we resolve here, then the underlying object
    // can never change. if we do latent resolution, there may be a resource
    // leak when we try to remove listener from something that is out of our
    // reachable scope.
    var emitter = getIn(ringpop, sourcePath.slice(0, -1));
    var event = _.last(sourcePath);

    return emitter && _.defaults(
        {},
        {
            sourceEmitter: emitter,
            sourceEvent: event,
            traceEvent: traceEvent
        },
        tracerConfig
    );
}
function resolveEventConfig ( ringpop , traceEvent ) { var tracerConfig = tracerConfigMap [ traceEvent ] ; if ( ! tracerConfig ) { return null ; } var sourcePath = tracerConfig . sourcePath ; // subtle but important -- if we resolve here, then the underlying object // can never change. if we do latent resolution, there may be a resource // leak when we try to remove listener from something that is out of our // reachable scope. var emitter = getIn ( ringpop , sourcePath . slice ( 0 , - 1 ) ) ; var event = _ . last ( sourcePath ) ; return emitter && _ . defaults ( { } , { sourceEmitter : emitter , sourceEvent : event , traceEvent : traceEvent } , tracerConfig ) ; }
resolves and returns a tracer config object, with traceEvent, sourceEmitter, and sourceEvent bound
resolves and returns a tracer config object with traceEvent sourceEmitter and sourceEvent bound