Show HN: MailgunLogger

38 points by pierot 5 years ago | 8 comments
  • dazbradbury 5 years ago
    Awesome - we've slowly moved so many of the mailgun events into our own system over the years, that it probably made sense to just start with an "everything' approach to begin with!

    I have asked mailgun a number of times if they'd simply charge for longer storage limits, and they said no.

    Thanks for setting this up!

    • 28mm 5 years ago
      Won't mailgun send all of the same information via event callbacks, or is there event information only available through their web interface?
      • tehbeard 5 years ago
        Not the author, but have some experience with the mailgun api. AFAIK there's no sla/guarantee/redelivery for the webhooks, and they have to be setup for each domain. Looping the account to fetch all logs for the last 48 hours is relatively simple and robust.
        • jeroenbourgois 5 years ago
          OP here (actually, he is my co-founder, same company). I can confirm this experience, looping seems to work.

          In our own setup, we fetch data for the last 24h twice a day and then just insert everything. We have a db constraint on the message ID mailgun sends us, so only news ones will be persisted. We aren't even bothered with filtering before inserting, the db constraint does the trick.

      • cpursley 5 years ago
        This is very timely! I'd love to see the logging bits extracted out into its own library so I can use it directly in an existing Phoenix app. I don't really need the GUI bits.
        • dqv 5 years ago
          You should be able to still use it. Just set `runtime: false` for the dep entry in your `mix.exs` file and only start what you need.
          • jeroenbourgois 5 years ago
            OP here. We saw your request on github, will follow up there. Should not be that hard to do, it's not a lot of code actually.
          • chasers 5 years ago
            Elixir :)