Datadog integration
Fauna’s Datadog integration sends Fauna Logs to Datadog in near real time. You can send logs for specific databases, including child databases, or entire Region Groups.
You can then visualize and monitor the logs in Datadog for better debugging and observability.
Requirements
-
The integration requires the Fauna Logs feature. To use Fauna Logs, you must have a Pro or Enterprise plan.
-
A Datadog account
Set up the integration
-
Log in to the Fauna Dashboard and go to the Integrations page.
-
Click Configure your Fauna integration in Datadog.
If prompted, log in to Datadog. The Fauna integration tile is displayed in Datadog.
-
In the tile’s Configure tab, click Connect Accounts.
-
In the Create Fauna Integration page, select one or more Region Groups and databases. You can select a mix of Region Groups and databases.
If you select a Region Group, the integration sends Fauna Logs for each database in the Region Group to Datadog. This includes new databases created after integration setup.
-
Click Save.
The page redirects to a Datadog authorization page.
-
Authorize the integration.
A success message is displayed. The page then redirects to the Fauna Dashboard’s Integrations page.
View Fauna Logs in Datadog
Once connected, you can view your Fauna Logs in Datadog.
Integration dashboard
The integration also includes a dashboard you can use to monitor query volume, performance, costs, responses, and failures.
The dashboard also includes widgets containing the logs.
Log Explorer
You can also view Fauna Logs in Datadog’s Log Explorer.
You can also create log monitors and add log widgets to your custom dashboards. See Datadog’s Log Explorer docs.
Log record format
To allow filtering, Fauna Logs sent to Datadog use a different format than the standard log format used by the Fauna Dashboard or the Fauna Logs HTTP API endpoints.
{
"id": "abc123",
"content": {
"attributes": {
"API_VERSION": "10",
"DATABASE": ["ECommerce"],
"FQL_SHAPE": "Database.all().order(.name.toLowerCase())\n",
"REGION_GROUP": "us-std",
"REQUEST_HEADERS": "{\"x_forwarded_for\":\"174.61.154.32, 10.1.0.246\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36\",\"driver_env\":\"driver=javascript-2.0.1; env=browser; os=Mac OS X-10_15_7; runtime=Chrome-126.0.0.0\"}",
"REQUEST_METHOD": "POST",
"RESPONSE_CODE": "200",
"TRACEPARENT": "00-1c4d6aa5c44f3c20426e8dd0517a0e56-328d6d4805ffb87f-00",
"TS": "2099-08-07T17:29:35.740Z",
"duration": 114000000,
"fauna": {
"BYTES_IN": 114,
"BYTES_OUT": 311,
"BYTE_READ_OPS": 8,
"BYTE_WRITE_OPS": 0,
"COMPUTE_OPS": 1,
"QUERY_TIME_MS": 114,
"TXN_RETRIES": 0
},
"http": {
"status_category": "OK",
"status_code": 200
},
"service": "fauna"
},
"service": "fauna",
"tags": ["source:fauna", "datadog.submission_auth:api_key"],
"timestamp": "2099-08-07T17:29:35.740Z"
}
}
Most properties correspond to a property in the standard Fauna Log record format:
Property | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Unique identifier for the log entry in Datadog. |
||||||||||
|
FQL version used in the query. FQL v10 uses |
||||||||||
|
Array of database paths. |
||||||||||
|
FQL query with authentication-related information redacted. Equivalent to |
||||||||||
|
Region Group for the query. Equivalent to |
||||||||||
|
Headers included with the HTTP request. Equivalent to |
||||||||||
|
HTTP method of the request. Equivalent to |
||||||||||
|
HTTP response code for the request:
Equivalent to |
||||||||||
|
Query tags included with the query. If the query included no tags, this field is omitted. |
||||||||||
|
Query W3C-compliant traceparent identifier. See Traces. Equivalent to |
||||||||||
|
Query processing timestamp in UTC. Equivalent to |
||||||||||
|
Query processing time in nanoseconds. A nanosecond version of |
||||||||||
|
Number of bytes in the request. Equivalent to |
||||||||||
|
Number of bytes in the response. Equivalent to |
||||||||||
|
Number of write operations consumed by the query. Equivalent to |
||||||||||
|
Number of write operations consumed by the query. Equivalent to |
||||||||||
|
Number of compute operations consumed by the query. Equivalent to |
||||||||||
|
Query processing time, in milliseconds. Equivalent to |
||||||||||
|
Retry count. A value greater than zero indicates contention. Equivalent to |
||||||||||
|
Category of the response’s HTTP status code. |
||||||||||
|
HTTP response code for the response:
Equivalent to |
||||||||||
|
Attribute used for search and as a filterable facet in Datadog. Value is
|
||||||||||
|
Identifies the originating service in Datadog. Value is |
||||||||||
|
Array of tags used for search and as filterable facets in Datadog.
Includes |
||||||||||
|
Query processing timestamp, precise to the millisecond, in UTC. |
Fauna Dashboard-related logs
The integration does not send logs for queries that populate the Fauna Dashboard UI. For example, the integration doesn’t send logs for queries used to display a list of existing collections or documents in the Dashboard.
The integration does send logs for:
-
Dashboard queries that create or write to resources, such as databases, collections, or documents.
-
User-provided queries run through the Dashboard Shell.
Change integration settings
You can change which Fauna Region Groups and databases send logs to Datadog by updating the integration settings. Updating the integration settings does not affect existing Fauna Logs in Datadog.
-
Log in to the Dashboard and click Integration in the left navigation.
-
Click the edit icon for the Datadog integration.
This opens the Manage Datadog Integration modal.
-
In the modal, add or delete Region Groups and databases as desired.
You can change the Active toggle to pause the integration.
-
When you’re done, click Okay.
Billing
The integration consumes Transactional Compute Ops (TCOs) based on the number of Fauna Log entries sent to Datadog per month:
Number of log entries sent per month | TCOs consumed per month |
---|---|
Fewer than 100,000 |
49,500 TCOs (flat rate) |
100,000 or more |
0.495 TCOs per log entry |
Limitations
-
A Fauna account can have one Datadog integration. The integration can only connect to one Datadog account.
-
Fauna Logs in Datadog may be delayed by up to two minutes.
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!