ddtrace/pin.py
def onto(self, obj, send=True):
        """Patch this pin onto the given object. If send is true, it will also
        queue the metadata to be sent to the server.
        """
        # pinning will also queue the metadata for service submission. this
        # feels a bit side-effecty, but bc it's async and pretty clearly
        # communicates what we want, i think it makes sense.
        if send:
            try:
                self._send()
            except Exception:
                log.debug("can't send pin info", exc_info=True)

        # Actually patch it on the object.
        try:
            if hasattr(obj, '__setddpin__'):
                return obj.__setddpin__(self)

            pin_name = _DD_PIN_PROXY_NAME if isinstance(obj, wrapt.ObjectProxy) else _DD_PIN_NAME

            # set the target reference; any get_from, clones and retarget the new PIN
            self._target = id(obj)
            return setattr(obj, pin_name, self)
        except AttributeError:
            log.debug("can't pin onto object. skipping", exc_info=True)
Patch this pin onto the given object. If send is true, it will also
        queue the metadata to be sent to the server.
        
Patch this pin onto the given object. If send is true, it will also
queue the metadata to be sent to the server.
Patch this pin onto the given object . If send is true it will also queue the metadata to be sent to the server .
def onto(self, obj, send=True):
        if send:
            try:
                self._send()
            except Exception:
                log.debug("can't send pin info", exc_info=True)
        try:
            if hasattr(obj, '__setddpin__'):
                return obj.__setddpin__(self)
            pin_name = _DD_PIN_PROXY_NAME if isinstance(obj, wrapt.ObjectProxy) else _DD_PIN_NAME
            self._target = id(obj)
            return setattr(obj, pin_name, self)
        except AttributeError:
            log.debug("can't pin onto object. skipping", exc_info=True)
def onto ( self , obj , send = True ) : if send : try : self . _send ( ) except Exception : log . debug ( "can't send pin info" , exc_info = True ) try : if hasattr ( obj , '__setddpin__' ) : return obj . __setddpin__ ( self ) pin_name = _DD_PIN_PROXY_NAME if isinstance ( obj , wrapt . ObjectProxy ) else _DD_PIN_NAME self . _target = id ( obj ) return setattr ( obj , pin_name , self ) except AttributeError : log . debug ( "can't pin onto object. skipping" , exc_info = True )
Patch this pin onto the given object.
Patch this pin onto the given object .
"""Patch this pin onto the given object. If send is true, it will also
        queue the metadata to be sent to the server.
        """ # pinning will also queue the metadata for service submission. this # feels a bit side-effecty, but bc it's async and pretty clearly # communicates what we want, i think it makes sense. # Actually patch it on the object. # set the target reference; any get_from, clones and retarget the new PIN
self
obj
send