Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tracer support for async, escape hatch, and patch given modules #29

Merged
merged 36 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5e2a022
feat: use new TraceProvider
heitorlessa May 3, 2020
63a8ea9
improv: update tests
heitorlessa May 4, 2020
e3fddaf
improv: update docs, linting
heitorlessa May 4, 2020
5ba54a8
improv: docstring readability and links
heitorlessa May 5, 2020
0adc7a7
improv: remove tracer provider
heitorlessa May 5, 2020
46a11a2
fix: patch modules type
heitorlessa May 5, 2020
c72e37c
improv: use client ctx_manager for race conditions
heitorlessa May 5, 2020
022c373
improv: make disabling provider private again
heitorlessa May 5, 2020
e038a72
chore: linting
heitorlessa May 5, 2020
f585506
fix: race condition annotation/metadata
heitorlessa May 5, 2020
be69d4f
chore: linting
heitorlessa May 5, 2020
9e99f8c
feat: add async support for methods
heitorlessa May 7, 2020
9e7bd6d
improv: document async use cases, and edge cases
heitorlessa May 8, 2020
f79edff
improv: upgrade xray, flex pinning
heitorlessa May 8, 2020
4b22f75
chore: linting
heitorlessa May 8, 2020
44dbab6
improv: update example for async, escape hatch
heitorlessa May 8, 2020
107f572
fix: add example dev deps in project
heitorlessa May 8, 2020
fbfc759
improv: add patch_modules example, formatting
heitorlessa May 8, 2020
b3447e3
improv: break down concurrent async calls example
heitorlessa May 10, 2020
c87bf62
docs: main doc clean up
heitorlessa May 10, 2020
e1b79ea
docs: document async, escape hatch usage
heitorlessa May 10, 2020
c58a4f1
chore: lint
heitorlessa May 10, 2020
c91fe32
docs: update example SAM template comments
heitorlessa May 10, 2020
7f0c59c
chore: updates poetry lock file
heitorlessa May 10, 2020
252e35b
improv: example to use py 3.8
heitorlessa May 10, 2020
adb244e
fix: AsyncMockMixin not being awaitable in 3.8
heitorlessa May 10, 2020
ea38254
fix: 3.8 defaulting to AsyncMock
heitorlessa May 10, 2020
b7507e4
improv: include x-ray bug for concurrent async calls
heitorlessa May 11, 2020
b8ed79f
fix: address nicolas's feedback
heitorlessa May 12, 2020
b767567
improv: add security baseline as part of PR process
heitorlessa May 12, 2020
3ddcf16
improv: enforce lower code complexity
heitorlessa May 12, 2020
a5407d5
chore: whitespace
heitorlessa May 12, 2020
7647193
improv: add complexity baseline
heitorlessa May 12, 2020
238a401
chore: bump version to 0.9.0
heitorlessa May 12, 2020
8fa07e6
chore: clean up history changes
heitorlessa May 12, 2020
ffe7c97
Merge branch 'develop' into improv/tracer
heitorlessa May 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
exclude = docs, .eggs, setup.py, example, .aws-sam
ignore = E203, E266, W503, BLK100, W291, I004
max-line-length = 120
max-complexity = 18
max-complexity = 15

[isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 120

31 changes: 20 additions & 11 deletions python/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# HISTORY

## May 12th

**0.9.0**

* **Tracer**: Support for async functions in `Tracer` via `capture_method` decorator
* **Tracer**: Support for `aiohttp` via `aiohttp_trace_config` trace config
* **Tracer**: Support for patching specific modules via `patch_modules` param
* **Tracer**: Document escape hatch mechanisms via `tracer.provider`

## May 1st

**0.8.1**

* Fix metric unit casting logic if one passes plain string (value or key)
* Fix `MetricUnit` enum values for
* **Metrics**: Fix metric unit casting logic if one passes plain string (value or key)
* **Metrics: **Fix `MetricUnit` enum values for
- `BytesPerSecond`
- `KilobytesPerSecond`
- `MegabytesPerSecond`
Expand All @@ -22,35 +31,35 @@

**0.8.0**

* Introduces `Logger` for stuctured logging as a replacement for `logger_setup`
* Introduces `Logger.inject_lambda_context` decorator as a replacement for `logger_inject_lambda_context`
* Raise `DeprecationWarning` exception for both `logger_setup`, `logger_inject_lambda_context`
* **Logger**: Introduces `Logger` class for stuctured logging as a replacement for `logger_setup`
* **Logger**: Introduces `Logger.inject_lambda_context` decorator as a replacement for `logger_inject_lambda_context`
* **Logger**: Raise `DeprecationWarning` exception for both `logger_setup`, `logger_inject_lambda_context`

## April 20th, 2020

**0.7.0**

* Introduces Middleware Factory to build your own middleware
* Fixes Metrics dimensions not being included correctly in EMF
* **Middleware factory**: Introduces Middleware Factory to build your own middleware via `lambda_handler_decorator`
* **Metrics**: Fixes metrics dimensions not being included correctly in EMF

## April 9th, 2020

**0.6.3**

* Fix `log_metrics` decorator logic not calling the decorated function, and exception handling
* **Logger**: Fix `log_metrics` decorator logic not calling the decorated function, and exception handling

## April 8th, 2020

**0.6.1**

* Introduces Metrics middleware to utilise CloudWatch Embedded Metric Format
* Adds deprecation warning for `log_metrics`
* **Metrics**: Introduces Metrics middleware to utilise CloudWatch Embedded Metric Format
* **Metrics**: Adds deprecation warning for `log_metrics`

## February 20th, 2020

**0.5.0**

* Introduces log sampling for debug - Thanks to [Danilo's contribution](https://github.com/awslabs/aws-lambda-powertools/pull/7)
* **Logger**: Introduces log sampling for debug - Thanks to [Danilo's contribution](https://github.com/awslabs/aws-lambda-powertools/pull/7)

## November 15th, 2019

Expand Down
11 changes: 10 additions & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test:
coverage-html:
poetry run pytest --cov-report html

pr: lint test
pr: lint test security-baseline complexity-baseline

build: pr
poetry run build
Expand All @@ -31,6 +31,15 @@ docs: dev
docs-dev:
poetry run pdoc --http : aws_lambda_powertools

security-baseline:
poetry run bandit --baseline bandit.baseline -r aws_lambda_powertools

complexity-baseline:
$(info Maintenability index)
poetry run radon mi aws_lambda_powertools
$(info Cyclomatic complexity index)
poetry run xenon --max-absolute C --max-modules A --max-average A aws_lambda_powertools

#
# Use `poetry version <major>/<minor></patch>` for version bump
#
Expand Down
Loading