airline
Lightweight wide event logging to bring more observability to lambda functions.
This is very strongly inspired by honeycomb and their beeline library.
How?
Use the decorators!
import airline
airline.init(dataset='your_app_name')
@airline.evented()
def some_function(a, b)
# do things
or
import airline
from airline.awslambda import airline_wrapper
airline.init(dataset='function_or_app_name')
@airline_wrapper
def handler(event, context):
# do things
Wide event logging?
The idea is to build up the full context of a function/script into one wide event that gets emitted at the end. This puts all the context in one log message, making it very easy to run analytics on, find like errors, and a lot of other things. A full blown observability platform like honeycomb would be more informative, and allows for the notion of spans and distributed tracing (i.e. across different (micro) services and the like).
But this is a start.
Take this:
import time
import random
import airline
airline.init(dataset='example')
@airline.evented()
def main(a, b):
airline.add_context_field("a", a)
airline.add_context_field("b", b)
with airline.timer('processing_a'):
subfunction1(a)
with airline.timer('processing_b'):
subfunction1(b)
def subfunction1(input):
time.sleep(random.uniform(0, len(input)))
main("foo", "example_long_thing")
And emit this at the end
{
"time": "2020-03-09T09:49:43.376126Z",
"dataset": "example",
"client": "airline/0.1.0",
"data": {
"a": "foo",
"b": "example_long_thing",
"duration_ms": 9438.041,
"timers": {
"processing_a_ms": 255.11,
"processing_b_ms": 9182.859
}
}
}
Metadata
Release files for airline 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airline-0.5.1.tar.gz | 13.5 kB | Without provenance | Details for airline-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airline-0.5.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for airline-0.5.1-py2.py3-none-any.whl |
Total release size: 26.2 kB
Release files / airline-0.5.1.tar.gz
| Download URL | airline-0.5.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7918f50f95d61e586d2538385eefe98b9c1ab5bd16e8af3003b90cb9e820511
|
|
BLAKE2b-256 checksum How to use checksums |
e0183d145984be09b7d91dec71df9338d1dac2f265bd8413dd0a6cafe29bafac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.23.0
|
Release files / airline-0.5.1-py2.py3-none-any.whl
| Download URL | airline-0.5.1-py2.py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ce3dd2f89bf9480b258c1f3cfae0705768619a31d376ccd0f4bc086b4f8e5b03
|
|
BLAKE2b-256 checksum How to use checksums |
b497a93ede20d5ef9d05248fcef582d56368a7fc5307035c97d556ae83a6e3b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.23.0
|
Security for airline 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.