Serverless SDK for Python
Project description
serverless-sdk
Serverless Console SDK for Python
Use case
Environment agnostic Serverless Console instrumentation functions for Python applications.
This library is safe to use without side-effects in any Python application. It becomes effective once (one of the listed below) environment specific SDK is loaded on top.
Environment extensions
- AWS Lambda - serverless-aws-lambda-sdk
Installation
pip install serverless-sdk
Usage
from sls_sdk import serverlessSdk
print(serverlessSdk.name)
print(serverlessSdk.version)
serverlessSdk.capture_error(Exception("Unexpected"))
Setup
1. Register with Serverless Console
2. Initialize and setup SDK specific to your enviroment
2.1 Configuration options
Common options supported by all environments:
SLS_ORG_ID
(or org_id
)
Required setting. Id of your organization in Serverless Console.
SLS_DISABLE_HTTP_MONITORING
(or disable_http_monitoring
)
Disable tracing of HTTP and HTTPS requests. See HTTP instrumentation
SLS_DISABLE_REQUEST_RESPONSE_MONITORING
(or disable_request_response_monitoring
)
(Dev mode only) Disable monitoring requests and reponses (function, AWS SDK requests and HTTP(S) requests)
SLS_DISABLE_FLASK_MONITORING
(or disable_flask_monitoring
)
Disable automated flask monitoring. See flask app instrumentation
SLS_DISABLE_CAPTURED_EVENTS_STDOUT
(or disable_captured_events_stdout
)
Disable writing captured events registered via .capture_error
and .capture_warning
to stdout
Instrumentation
This package comes with instrumentation for following areas.
Note: instrumentation is enabled via environment specific SDK instance, relying just on serverless-sdk
doesn't enable any instrumentation)
API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file serverless-sdk-0.6.0.tar.gz
.
File metadata
- Download URL: serverless-sdk-0.6.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d109664165903b3a89aea3c0d12c41263fce99a066e444be2b40a71f0c91a86a |
|
MD5 | 96396594fbccbd57016d2f52ddb3a515 |
|
BLAKE2b-256 | 728946ca5fe68b44b0d34cf68cec3f1486411153ec51751c29d616c047fca988 |
File details
Details for the file serverless_sdk-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: serverless_sdk-0.6.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4158dd498b87ba2dfc7a1db148daa00ccd6f2ac16f5fbe4f2e932aa3b8753e0e |
|
MD5 | 4b7020601c0dd549f3c50e936fc3a86f |
|
BLAKE2b-256 | d9313f82184f83a49686e7005c09ff08400f5ebe75b74ccc08131e0ed75ff78e |