Log record format

You can download query log files using the Fauna Dashboard or the Query Logs HTTP API endpoints. The log file is a gzip-compressed JSON+L file with one JSON object per line that represents a single log record entry.

The Datadog integration uses a different format for query log entries. See Log record format in the Datadog integration docs.

An example query log object formatted for readability:

{
  "API_VERSION": "10",
  "BYTES_IN": 43,
  "BYTES_OUT": 2692,
  "BYTE_READ_OPS": 21,
  "BYTE_WRITE_OPS": 0,
  "COMPUTE_OPS": 1,
  "DATABASE": ["ECommerce"],
  "FQL_SHAPE":"Product.sortedByPriceLowToHigh()\n",
  "QUERY_TIME_MS": 64,
  "REGION_GROUP": "us-std",
  "REQUEST_HEADERS": "{\"user_agent\":\"curl/8.4.0\",\"x_forwarded_for\":\"108.83.200.91, 10.1.1.124\"}",
  "REQUEST_METHOD": "POST",
  "RESPONSE_CODE": "200",
  "TAGS": { "request_type": "product_search", "sort_by": "price" },
  "TRACEPARENT": "00-00000000000000000992df31c81cc1c8-481003b57ce0897f-00",
  "TS": "2099-05-10 18:05:42.871 Z",
  "TXN_RETRIES": 0
}
Field Description

API_VERSION

FQL version used in the query. FQL v10 uses 10. FQL v4 uses 4.

BYTES_IN

Number of bytes in the request.

BYTES_OUT

Number of bytes in the response.

BYTE_READ_OPS

Number of read operations consumed by this query.

BYTE_WRITE_OPS

Number of write operations consumed by this query.

COMPUTE_OPS

Number of compute operations consumed by this query.

DATABASE

Database path of this entry. Each path entry is a database name. The first entry is the top-level database, and each included entry to the right is a child database. Dashboard queries have an empty database value.

FQL_SHAPE

Full request body with Personal Identifiable Data removed. Used to associate the log entry with a query to help debug and understand traffic.

QUERY_TIME_MS

Query processing time, in milliseconds.

RATE_LIMITS_HIT

An array of ops types that were limited or approaching rate limits:

  • read

  • write

  • compute

Example: [ "read", "compute" ]

REGION_GROUP

Query region group identifier.

REQUEST_HEADERS

HTTP request headers of this entry.

REQUEST_METHOD

HTTP request method of this entry.

RESPONSE_CODE

HTTP response code:

HTTP status Description

200

Successful query.

201

Query created a collection.

2xx

Query nearing rate limit as indicated by RATE_LIMITS_HIT. Valid response returned.

429

Rate limited. Query exceeds plan limit or service protection if there are no plan limits.

TAGS

Query tags included with the query.

If the query included no tags, this field is {}.

TRACEPARENT

Query W3C-compliant traceparent identifier. If you supplied an identifier and the logs don’t include the identifier, you might have supplied an invalid identifier. If you provided an invalid identifier, Fauna generates a valid identifier.

TS

Query processing timestamp in UTC.

Example: "2099-01-18 22:11:39.529 Z"

TXN_RETRIES

Retry count. A value greater than zero indicates contention.

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!