Integrate Atlas Application Services Logs into Datadog on AWS
Rate this tutorial
MongoDB Atlas on Amazon Web Services (AWS) already supports for alerts and events right within the Atlas UI (select the three vertical dots → Integration → Datadog). With the Log Forwarding feature, it's now possible to send Atlas Application Services logs to Datadog. This blog outlines the configuration steps necessary as well as strategies for customizing the view to suit the need.
(formerly MongoDB Realm) is a set of enhanced services that complement the Atlas database to simplify the development of backend applications. App Services-based apps can react to changes in your MongoDB Atlas data, connect that data to other systems, and scale to meet demand without the need to manage the associated server infrastructure.
App Services provides user authentication and management, schema validation and data access rules, event-driven serverless functions, secure client-side queries with GraphQL, and best of all, synchronization of data across devices with the Realm Mobile SDK.
With App Services and Datadog, you can simplify the end-to-end development and monitoring of your application. Atlas App Services specifically enables the forwarding of logs to Datadog via a serverless function that can also give more fine-grained control over how these logs appear in Datadog, via customizing the associated tags.
Here’s a sample function that provides that basic capability:
One of the capabilities of the snippet above is that it allows you to modify the function to supply your Datadog . This provides the capability to customize the experience and provide the appropriate context for better observability. You can change , the hostname, and service parameters to reflect your organization, team, environment, or application structure. These parameters will appear as facets helping with filtering the logs.
Note: Datadog supports log ingestion pipelines that allow it to better parse logs. In order for the MongoDB log pipeline to work, your ddsource must be set to
Once log forwarding is configured, your Atlas App Services logs will appear in the Datadog Logs module.
You can click on an individual log entry to see the detailed view:
Tutorial: Build a Movie Search Engine Using Atlas Full-Text Search in 10 Minutes
Sep 23, 2022