-
Notifications
You must be signed in to change notification settings - Fork 402
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
improv: include example tests in make tests
#63
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #63 +/- ##
============================================
+ Coverage 99.39% 100.00% +0.60%
============================================
Files 15 15
Lines 496 496
Branches 45 45
============================================
+ Hits 493 496 +3
+ Misses 3 0 -3
Continue to review full report at Codecov.
|
Two quick questions as everything else look great.
I've run through all steps after checking out this PR and am hitting the namespace issue ( sam local invoke HelloWorldFunction --event events/event.json 2020-06-07 14:19:16,866 aws_lambda_powertools.metrics.base [DEBUG] Serializing...
2020-06-07 14:19:16,866 aws_lambda_powertools.metrics.base [DEBUG] Validating serialized metrics against CloudWatch EMF schema
[ERROR] SchemaValidationError: Invalid format. Error: data._aws.CloudWatchMetrics[0].Namespace must be string, Invalid item: data._aws.CloudWatchMetrics[0].Namespace
Traceback (most recent call last):
File "/var/task/aws_lambda_powertools/metrics/metrics.py", line 110, in decorate
metrics = self.serialize_metric_set()
File "/var/task/aws_lambda_powertools/metrics/base.py", line 186, in serialize_metric_set
raise SchemaValidationError(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to re-add POWERTOOLS_METRICS_NAMESPACE
back to SAM template as it fails when it runs locally
I added this env var back in PR #62. I just merged develop into this branch so you should see it now. |
README is updated already - please let me know if the steps don't work for you. |
Just pulled, and it's all working now ;) Merging! |
make tests
make tests
* develop: (31 commits) docs: fix contrast on highlighted code text (#73) feat: improve error handling for log_metrics decorator (#71) chore(deps): bump graphql-playground-html from 1.6.19 to 1.6.25 in /docs feat: add high level imports (#70) fix: correct env var name for publish to pypi test (#69) chore: version bump (#68) feat: add capture_cold_start_metric for log_metrics (#67) chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /docs (#66) feat: automate publishing to pypi (#58) feat: add pre-commit hooks (#64) improv: include example tests in `make tests` (#63) chore: rename Makefile target docs-dev to docs-local (#65) improv: better namespace/dimension handling for Metrics (#62) docs: build on master only chore: correct docstring for log_metrics chore: fix typo in metrics doc chore: Correct test comment chore: remove unused import chore: formatting feat: update Metrics interface to resemble tracer & logger: use "service" as its namespace. ...
* chore: add example/tests to test paths * chore: update example tests to remove requirement to manually specify env vars * chore: try to fix build for python3.6 (install dataclasses backport) * chore: fix build for python 3.6 * chore: dont run example test on python3.6 since it requires asyncio
Issue #, if available:
Description of changes:
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.