def dispatch(
        self, trigger, payload=None, trace_tag=None, throw_on_validation_error=False
    ):
        """
        Method which dispatches the trigger.

        :param trigger: Reference to the TriggerTypeDB (<pack>.<name>) or TriggerDB object.
        :type trigger: ``str``

        :param payload: Trigger payload.
        :type payload: ``dict``

        :param trace_tag: Tracer to track the triggerinstance.
        :type trace_tags: ``str``

        :param throw_on_validation_error: True to throw on validation error (if validate_payload is
                                          True) instead of logging the error.
        :type throw_on_validation_error: ``boolean``
        """
        # empty strings
        trace_context = TraceContext(trace_tag=trace_tag) if trace_tag else None
        self._logger.debug(
            "Added trace_context %s to trigger %s.", trace_context, trigger
        )
        return self.dispatch_with_context(
            trigger,
            payload=payload,
            trace_context=trace_context,
            throw_on_validation_error=throw_on_validation_error,
        )

        Method which dispatches the trigger.

        :param trigger: Reference to the TriggerTypeDB (<pack>.<name>) or TriggerDB object.
        :type trigger: ``str``

        :param payload: Trigger payload.
        :type payload: ``dict``

        :param trace_tag: Tracer to track the triggerinstance.
        :type trace_tags: ``str``

        :param throw_on_validation_error: True to throw on validation error (if validate_payload is
                                          True) instead of logging the error.
        :type throw_on_validation_error: ``boolean``
        
st2common/st2common/services/trigger_dispatcher.py