Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Ecto 3 example update to better guide setups with multiple repos #20

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

rraub
Copy link
Contributor

@rraub rraub commented Mar 10, 2020

The first argument to :telemry.attach/4 needs to be unique otherwise it will return an error tuple saying it is already attached. I ran into this issue in an application that has multiple Ecto Repos and I didn't update the first argument to be unique. Which took me a while to track down why I was getting data for one of my repos but not the other.

I figure if the example includes something that should be unique per repo name that may help others with multiple repos.

Alternatively we could include a match so it would fail the match on assignment :ok = :telemry.attach(... I figured the intention isn't as clear though.

@sourcelevel-bot
Copy link

Hello, @rraub! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@zachdaniel
Copy link
Member

@rraub sorry it took ages to get back to you, I think I'm not getting notifications for this repo. I think the pattern match :ok = is actually a good idea in addition to this update.

@rraub
Copy link
Contributor Author

rraub commented Jul 13, 2020

@zachdaniel No worries, I agree and have added that pattern match.

@zachdaniel zachdaniel changed the title Ecto 3 example update to better guide setups with multiple repos docs: Ecto 3 example update to better guide setups with multiple repos Jul 13, 2020
@zachdaniel zachdaniel merged commit 6902075 into spandex-project:master Jul 13, 2020
@zachdaniel
Copy link
Member

🚀 Thank you for your contribution! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants