Forwarding logs to DataDog

Hi,

As much as “programming by recipes” can be a disaster, infrastructure recipes can be quite saver.
At the end of the day we are here because we want somebody else to be responsible for our infrastructure.

And the observability triad, perhaps, is among the top infrastructural priorities.
Now we have services like Datadog that can cover for all of the items we want in a single app.

Yet there is a fair bit of confusion of how to start using it with fly.io. I found at least 3 different topics with people reporting partial solutions.

It will be really nice to see a complete recipe of how to start forwarding logs to Datadog. I think from that point on it’ll be pretty straightforward to setup metrics and traces.

Best,
Yevhenii

Check out the semi-official log shipper. GitHub - superfly/fly-log-shipper: Ship logs from fly to other providers. This should help you get started. Feel free to post questions!

How do I setup a Phoenix app to post logs to the forwarder?

The app would need to log to stdout, that’s all. I believe this is the default.

Yeah, but normally beam logs it’s activity into var/logs and if we consider all the moving pieces and a process as a whole, a throughout recipe our a push button integration will be really handy :slight_smile: