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
Copy file name to clipboardexpand all lines: README.md
+31
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,37 @@ Type: `Boolean`
179
179
180
180
`LOG_BODY` is default to true, set to false to remove logging request and response body to Moesif.
181
181
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.
185
+
186
+
```python
187
+
from moesif_aws_lambda.middleware import*
188
+
start_capture_outgoing(moesif_options) # moesif_options are the configuration options.
189
+
```
190
+
191
+
##### __`SKIP_OUTGOING`__
192
+
(optional) _(req, res) => boolean_, a function that takes a [Requests](http://docs.python-requests.org/en/master/api/) request and response,
193
+
and returns true if you want to skip this particular event.
194
+
195
+
##### __`IDENTIFY_USER_OUTGOING`__
196
+
(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
+
but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.
198
+
199
+
##### __`IDENTIFY_COMPANY_OUTGOING`__
200
+
(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
+
202
+
##### __`GET_METADATA_OUTGOING`__
203
+
(optional) _(req, res) => dictionary_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and
204
+
returns a dictionary (must be able to be encoded into JSON). This allows
205
+
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
+
207
+
##### __`GET_SESSION_TOKEN_OUTGOING`__
208
+
(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
+
210
+
##### __`LOG_BODY_OUTGOING`__
211
+
(optional) _boolean_, default True, Set to False to remove logging request and response body.
0 commit comments