When you attach Scout instruments to multiple repos,
calls beyond the first will return {:error, :already_exists}.
This is due to the handler id needing to be unique across the entire running system, but only having a single hard-coded value in the Scout call. We should create the string based on the repo module name instead.
The actual value is never referenced, so there are no restrictions on what we choose. I'd prefer to stick to something that's meaningful if introspected though (not just a uuid or equivalently random string).
When you attach Scout instruments to multiple repos, calls beyond the first will return {:error, :already_exists}.
This is due to the handler id needing to be unique across the entire running system, but only having a single hard-coded value in the Scout call. We should create the string based on the repo module name instead.
The actual value is never referenced, so there are no restrictions on what we choose. I'd prefer to stick to something that's meaningful if introspected though (not just a uuid or equivalently random string).
See-also: https://hexdocs.pm/telemetry/telemetry.html#attach-4