← Back to Guides
Profile image for Dan Ambrose

By Dan Ambrose

Published 17th April 2023

Send logs to Datadog from Northflank

Datadog is an easy to use and powerful log collection tool which boasts complex observability features behind a simple UI. This guide will take you through the steps to integrate your Datadog account with Northflank.

Before you create your Datadog log sink you will need to determine the region of your Datadog account and create an API key.

Find your Datadog region

Your Datadog region is determined by the site you use to access your Datadog account, refer to the table below to find your region.

RegionSite
EU1datadoghq.eu
US1datadoghq.com
US3us3.datadoghq.com
US5us5.datadoghq.com
US1-FEDddog-gov.com

Create an API Key

Navigate to your organisation settings in Datadog, then select API keys via the UI or go to https://<your-Datadog-site>/organization-settings/api-keys.

Create an API key with a name of your choice. Your key will be accessible after creation.

datadog-api-key.png

Create your Datadog sink

Follow this link or navigate to the log sinks page in your team or user account settings and add a log sink.

Enter a recognisable name for the sink and select Datadog as the sink type.

Select your Datadog region, verify the auto-generated site is correct, matching the region table, and enter your API key.

By default, all logs from your account will be forwarded to Axiom. To target specific projects, open advanced options and specify which projects to forward logs from.

You can also enable custom label parsing if your application is configured to send additional keys in JSON-formatted log lines.

Finally, click add log sink to create your Datadog integration.

datadog-nf-integration.png

View your logs

Before your log sink is created, Northflank will send a log line to your Datadog setup to verify the credentials are correct.

On the Datadog app, click on the logs section in the sidecar to bring up the Log Explorer. You should see the validating log sink credentials log line from Northflank.

Workload logs should start arriving in Datadog, segmented by project/nfType/pod-slug as they are produced. Find out more about the Datadog Log Explorer in the Datadog docs.

datadog-dashboard.png

Clicking on a log line will show an expanded view, with more details on the log line’s origins.

Update your log sink

If you want to modify your sink after creation, navigate to the log sink list and click on the sink to view its details.

You can update the project targets and sink data as well as pause/resume the sink.

datadog-nf-edit.png

Have questions or feedback? You can always reach out to our team.

Share this article with your network