I never had an experience particularly with CPP Tracker, but can say of general Snowplow Tracker design.
First of all, I don’t think “connected” is a right word here. Tracker is not required to have a persistent connection to collector. Tracker can idle for long time and not used at all. Or collector can be down and not receive events, or internet connection not available - in that case sent events should be buffered and DevOps/sysadmin notified through appropriate channel (stderr at very least). It is better to think of tracking events as of independent HTTP requests. As long as emitter constructed with valid host - there’s no way to check if this is a real collector or random host without events being sent.
However, you say:
If you can pass
#Q#31! without getting exception - then it is a bug as only valid hosts/IP addresses should be accepted. But as far as I can tell, Emitter does some URL validation.
In fact what developer should really be aware of is whether event he or she sent was accepted by collector (e.g. status 200 and expected response content) or collector is unavailable. Also as far as I can tell (sorry, my CPP is very rusty), developer will also be notified about unsucсessful responses.
Some other trackers, such as Scala Tracker provide more sophisticated callbacks to notify DevOps, but in CPP I guess only stderr output is available, however there’s a ticket for that.
Hope that helps.