Question
Can a Segment Source Insert Function emit or publish additional events alongside the original incoming event?
Product
Segment Functions
Environment
Segment Console
Answer
A Source Insert Function can only transform and return the single incoming event. It does not support emitting or publishing additional events within the same function execution. Attempting to use methods such as Segment.track inside an insert function to generate new events will result in all events being dropped from the pipeline. Only the original event, as returned by the function, will be processed and forwarded.
Additional Information
For use cases requiring the emission of additional events, consider alternative approaches such as using a repeater destination or other supported methods outside of Source Insert Functions. Refer to the Segment documentation for more details on function capabilities and best practices.