Ship logs to Lumigo platform
Project description
lumigo-python-log-shipper
Lumigo Log Shipper API lets you stream your Lambda functions' logs to Lumigo as a part of your custom log shipping function.
NOTE: Lumigo will automatically try to subscribe your Lambda functions to a Kinesis data stream. In case your log group is already subscribed to a Lambda as a destination, use this library to send logs to Lumigo.
Please contact Lumigo's support through the platform chat so we can enable this feature for you.
Usage
Install lumigo-log-shipper:
pip:
> pip install lumigo-log-shipper
In your log shipping Lambda's code:
from lumigo_log_shipper import lumigo_shipper
def handler(event, context):
lumigo_shipper.ship_logs(event)
If you are using programmatic errors, add your custom error keyword as an additional parameter. This will also send logs which contains your custom expression for Lumigo to process.
from lumigo_log_shipper import lumigo_shipper
def handler(event, context):
lumigo_shipper.ship_logs(event, ["WARNING-EXAMPLE"])
Add to your lambda's serverless.yml
iamRoleStatements:
- Effect: Allow
Action:
- "firehose:PutRecordBatch"
Resource:
- "arn:aws:firehose:[YOUR-REGION]:114300393969:deliverystream/prod_logs-edge-stfl_customer-logs-firehose"
- Effect: Allow
Action:
- "sts:AssumeRole"
Resource:
- "arn:aws:iam::114300393969:role/prod-CustomerLogsWriteRole"
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lumigo_log_shipper-1.0.29-py3-none-any.whl.
File metadata
- Download URL: lumigo_log_shipper-1.0.29-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d3f1d088bb31c9aaf6b6e306b26dab4563c1e1b0ab6a71d94c43837a5c58d2
|
|
| MD5 |
74e1b4a2c9f8d3eeaf2c7ce62d7dbf31
|
|
| BLAKE2b-256 |
b745e286027a5b278433fc336920684418bc3c45cb0bde7683d9abfd33346ca0
|