If you take a look at some of Segment's open source code, it isn't hard to see why they wound up struggling with microservices. It looks like they subscribe to the "left-pad" style of software development. They have tons of repositories that have less than 10 lines of code. They have a two line repository for calling preventDefault[0], a four line repository for getting the url of a page[1], and a eight line repository for clearing the browser state that calls into eight different packages[2].
Disclaimer: I run a Segment competitor. I'm pretty biased, but still...
Disclaimer: I run a Segment competitor. I'm pretty biased, but still...
[0] https://github.com/segmentio/prevent-default/blob/master/lib...
[1] https://github.com/segmentio/canonical/blob/master/lib/index...
[2] https://github.com/segmentio/clear-env/blob/master/lib/index...