You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set to true to print debug logs if you're having integration issues.
175
185
176
-
####__`LOG_BODY`__
186
+
### __`LOG_BODY`__
177
187
178
188
Type: `Boolean`
179
189
180
190
`LOG_BODY` is default to true, set to false to remove logging request and response body to Moesif.
181
191
182
-
#### __`CAPTURE_OUTGOING_REQUESTS`__
183
-
Capture all outgoing API calls from your app to third parties like Stripe or to your own dependencies while using [Requests](http://docs.python-requests.org/en/master/) library. The options below is applied to outgoing API calls.
184
-
When the request is outgoing, for options functions that take request and response as input arguments, the request and response objects passed in are [Requests](http://docs.python-requests.org/en/master/api/) request or response objects.
192
+
## Options for logging outgoing calls
185
193
186
-
```python
187
-
from moesif_aws_lambda.middleware import*
188
-
start_capture_outgoing(moesif_options) # moesif_options are the configuration options.
189
-
```
194
+
The options below are applied to outgoing API calls. The request and response objects passed in are [Requests](http://docs.python-requests.org/en/master/api/) request and [Response](https://golang.org/src/net/http/response.go) response objects.
190
195
191
-
#####__`SKIP_OUTGOING`__
196
+
### __`SKIP_OUTGOING`__
192
197
(optional) _(req, res) => boolean_, a function that takes a [Requests](http://docs.python-requests.org/en/master/api/) request and response,
193
198
and returns true if you want to skip this particular event.
194
199
195
-
#####__`IDENTIFY_USER_OUTGOING`__
200
+
### __`IDENTIFY_USER_OUTGOING`__
196
201
(optional, but highly recommended) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the user id used by your system. While Moesif tries to identify users automatically,
197
202
but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.
198
203
199
-
#####__`IDENTIFY_COMPANY_OUTGOING`__
204
+
### __`IDENTIFY_COMPANY_OUTGOING`__
200
205
(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the company id for this event.
201
206
202
-
#####__`GET_METADATA_OUTGOING`__
207
+
### __`GET_METADATA_OUTGOING`__
203
208
(optional) _(req, res) => dictionary_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and
204
209
returns a dictionary (must be able to be encoded into JSON). This allows
205
210
to associate this event with custom metadata. For example, you may want to save a VM instance_id, a trace_id, or a tenant_id with the request.
206
211
207
-
#####__`GET_SESSION_TOKEN_OUTGOING`__
212
+
### __`GET_SESSION_TOKEN_OUTGOING`__
208
213
(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the session token for this event. Again, Moesif tries to get the session token automatically, but if you setup is very different from standard, this function will be very help for tying events together, and help you replay the events.
209
214
210
-
#####__`LOG_BODY_OUTGOING`__
215
+
### __`LOG_BODY_OUTGOING`__
211
216
(optional) _boolean_, default True, Set to False to remove logging request and response body.
0 commit comments