Navigation

Service Logs

Overview

Service logs are created by whenever a user interacts with External Services. The fields present in Service log entries are determined by the service that emitted the log.

MongoDB Atlas

MongoDB Atlas. is offered as a first-class service within MongoDB Stitch. Service log entries have the following form:

{
 "arguments": [
   {
     "collection": <collection>,
     "database": <database>,
     "query": <query document>,
     "limit": {
       "$numberInt": <number>
     }
   }
 ],
 "name": <action>,
 "service": "mongodb-atlas"
}

Function Call Location: <location>

Compute Used: <number> bytes•ms

Remote IP Address: <ip address>

SDK: <sdk>>

Platform Version: <version>

Rule Performance Metrics:
{
 "database.collection": {
   "roles": {
     "owner": {
       "matching_documents": 5,
       "evaluated_fields": 0,
       "discarded_fields": 0
     }
   },
   "no_matching_role": 0
   }
}

Fields

Field Description
Remote IP Address The IP Address that sent the request to MongoDB Stitch. (e.g. 52.21.89.200)
Compute Used Computational load of the operation.
Platform Version The version of the platform that sent the request.
SDK

The SDK used to send the request. Potential values include any Stitch Client SDK. For a browser, this is <browser> <SDK version>.

Example

This request came from the Stitch JS Browser SDK version 4.0.0 running on Mozilla Firefox

SDK: firefox v4.0.0

This request came from the Stitch Android SDK version 4.6.0 running on Android Marshmallow:

SDK: android v4.6.0
Function Call Location The data center in which the function was executed.
Rule Performance Metrics A summary of the roles, schema, and filters applied to a return value. Provides the number of documents that a role applies to as well as the number of fields in those documents that Stitch evaluated and potentially withheld.

Error Fields

Log entries created by unsuccessful operations may feature additional fields for debugging purposes. These include the following:

Field Description
Error A brief description of an error.
Stack Trace A printout of an exception stack trace.
Details Extra information about an execution, including action, reason, service name, and service type.

Webhook / HTTP Service

Webhook log entries adhere to the following form:

Logs:
[
   <log line>,
   <log line>,
   ...
]

Function Call Location: <location>

Compute Used: <number> bytes•ms

Remote IP Address: <ip address>

Fields

Logs – max 10 Function Call Location Remote IP Address Compute Used

Field Description
Remote IP Address The IP Address that sent the request to MongoDB Stitch. (e.g. 52.21.89.200)
Compute Used The computational load of the operation measured in byte-ms.
Function Call Location The data center in which the function was executed.
Logs A list of console.log outputs. Stitch saves the first 256 bytes of the first 10 console.log() calls.

Error Fields

Log entries created by unsuccessful operations may feature additional fields for debugging purposes. These include the following:

Field Description
Error A brief description of an error.
Stack Trace A printout of an exception stack trace.
Details Extra information about an execution, including action, reason, service name, and service type.