Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
180e6ac
fix whitespace
Feb 2, 2021
1c4b0e3
docs: add logger
Feb 2, 2021
b4dce5e
docs: add middleware
Feb 2, 2021
01147a6
docs: parameters
Feb 2, 2021
7f93bbf
docs: batch
Feb 2, 2021
2a5f50c
docs: typing
Feb 2, 2021
0c492e1
docs: validation
Feb 2, 2021
e174d15
docs: dataclasses
Feb 2, 2021
98b3428
docs: parser
Feb 2, 2021
f9da787
docs: use mkdocs for website
Feb 2, 2021
7636f61
docs: add docs branch to have live preview for the PR
Feb 2, 2021
707b79b
docs: change color and adjust logo
Feb 2, 2021
cb9e881
docs: merged async and generator sections
Feb 2, 2021
1123a31
docs: merged cloudwatch logs to tabs
Feb 2, 2021
1cfdce2
docs: merged tabs
Feb 2, 2021
add4f4f
docs: remove highlight line markers
Feb 2, 2021
f4ea9b7
docs: add meta tags
Feb 2, 2021
2d05c72
docs: remove old docs folder
Feb 2, 2021
264a028
chore: typo in GetCfnTemplate
heitorlessa Feb 3, 2021
1fa47d9
Update docs/core/logger.md
heitorlessa Feb 3, 2021
8f418cb
Update docs/core/logger.md
heitorlessa Feb 3, 2021
7ddb544
Update docs/utilities/parameters.md
heitorlessa Feb 3, 2021
e425d6d
Update docs/utilities/validation.md
heitorlessa Feb 3, 2021
36cba90
Update docs/utilities/validation.md
heitorlessa Feb 3, 2021
4b9ca27
Update docs/utilities/batch.md
heitorlessa Feb 3, 2021
84c8e35
Update docs/core/tracer.md
heitorlessa Feb 3, 2021
f96abe7
Merge branch 'develop' of github.com:awslabs/aws-lambda-powertools-py…
Feb 3, 2021
da46dff
Merge branch 'docs/mkdocs' of github.com:am29d/aws-lambda-powertools-…
Feb 3, 2021
2556afa
remove code formatting from table headers
Feb 3, 2021
a6eb2b4
docs: increse max-width with extra css for readability
Feb 3, 2021
421145a
docs: add changes from review
Feb 4, 2021
1a483c9
docs: refactor doc targets, add docker build
Feb 4, 2021
8e548f5
docs: tabs naming for cloudwatch logs
Feb 4, 2021
32fdd23
docs: fix build-docs-website target
Feb 4, 2021
a815b40
docs: enhance the visual aid for accessibility purposes
Feb 4, 2021
0511fa5
fix: syntax previously broken in last set of commits
heitorlessa Feb 4, 2021
c21faea
fix: async ops snippet completeness
heitorlessa Feb 4, 2021
cca91d3
improv: screen real estate in home page.
heitorlessa Feb 4, 2021
8f0860f
feat: enable strict mode for broken links
heitorlessa Feb 5, 2021
4c07709
improv: merge Layer example to be more pragmatic
heitorlessa Feb 5, 2021
18e7a6f
improv: key features, getting started, clean non-essential
heitorlessa Feb 8, 2021
7bcb477
improv: expand escape hatch, async, reuse examples
heitorlessa Feb 8, 2021
cb2a570
improv: add getting started
heitorlessa Feb 8, 2021
d895006
improv: add getting started, trim content, expand examples
heitorlessa Feb 9, 2021
9d46917
improv: wording on logger reuse
heitorlessa Feb 9, 2021
6e8e108
improv: additional examples on formatting, order, etc. plus advanced …
heitorlessa Feb 9, 2021
383cc19
fix: typo on logging keys in FAQ
heitorlessa Feb 9, 2021
361634f
feat: enable snippets extension; include changelog in the docs
heitorlessa Feb 9, 2021
b78d2c3
fix: docker no longer works with strict due to an issue upstream
heitorlessa Feb 9, 2021
12853eb
feat: add favicon
heitorlessa Feb 9, 2021
e06d584
chore: consistency with metrics
heitorlessa Feb 9, 2021
cdf13f4
feat: docs revision date, smaller TOC, and footer copyright
heitorlessa Feb 9, 2021
aaaff91
improv: enhanced navigation, trimmed content, added more examples
heitorlessa Feb 9, 2021
ac29164
feat: add openGraph and Twitter card, attempt 1
heitorlessa Feb 9, 2021
d5365e0
Update docs/core/tracer.md
heitorlessa Feb 9, 2021
7d1be8c
Update docs/core/tracer.md
heitorlessa Feb 9, 2021
13a4070
docs: set tabs for yaml/json to 2 spaces
Feb 10, 2021
2422d3b
fix: yaml indent for cfn
Feb 10, 2021
fd548e1
fix: formatting yaml cfn
Feb 10, 2021
96524a3
fix: typo in features table
heitorlessa Feb 10, 2021
f2fab62
fix: typo in features table, match sidebar
heitorlessa Feb 10, 2021
7f5b7ed
Merge remote-tracking branch 'am29d/docs/mkdocs' into docs/mkdocs
heitorlessa Feb 10, 2021
12a6827
feat: add built-in search
heitorlessa Feb 10, 2021
9ab143c
fix: broken links
heitorlessa Feb 10, 2021
4ad97f9
improv: bring tenets up, clarify core vs general
heitorlessa Feb 10, 2021
9e38495
fix: broken links
heitorlessa Feb 10, 2021
b7191f0
fix: contrast for layer IAM snippet
heitorlessa Feb 10, 2021
e295ca2
fix: change extra dep to warning; wording
heitorlessa Feb 10, 2021
ad63957
remove ... from cfn docs
Feb 10, 2021
8c71f6b
Merge branch 'docs/mkdocs' of github.com:am29d/aws-lambda-powertools-…
Feb 10, 2021
6ca1d15
fix: width; remove old comments
heitorlessa Feb 10, 2021
5d27c18
improv: add explicit section for LOG_EVENT
heitorlessa Feb 10, 2021
3ce7c94
fix: highlight inject_lambda_context
heitorlessa Feb 10, 2021
7d907b3
feat: add docker-based docs for dev
heitorlessa Feb 10, 2021
2607f1d
chore: copyright to 2021
heitorlessa Feb 10, 2021
51a0ae6
revert: search width
heitorlessa Feb 10, 2021
3495899
chore: Add higher res metrics image
Feb 10, 2021
892dc5f
Merge branch 'docs/mkdocs' of https://github.com/am29d/aws-lambda-pow…
heitorlessa Feb 10, 2021
d340128
chore: remove custom font; correct edit uri
heitorlessa Feb 10, 2021
d63e231
feat: record page view and search pattern
heitorlessa Feb 12, 2021
e03e7f0
feat: add API reference
heitorlessa Feb 12, 2021
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: set tabs for yaml/json to 2 spaces
  • Loading branch information
Alex Melnyk committed Feb 10, 2021
commit 13a40704873931232b49473bd01601a999e9f636
110 changes: 55 additions & 55 deletions docs/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Setting | Description | Environment variable | Constructor parameter
```yaml hl_lines="9 10"
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
...
Runtime: python3.8
Environment:
Variables:
LOG_LEVEL: INFO
POWERTOOLS_SERVICE_NAME: example
Type: AWS::Serverless::Function
Properties:
...
Runtime: python3.8
Environment:
Variables:
LOG_LEVEL: INFO
POWERTOOLS_SERVICE_NAME: example
```
=== "app.py"
```python hl_lines="2 4"
Expand Down Expand Up @@ -86,35 +86,35 @@ You can enrich your structured logs with key Lambda context information via `inj
=== "Example CloudWatch Logs excerpt"

```json hl_lines="6-10 26-27"
{
"timestamp":"2020-05-24 18:17:33,774",
"level":"INFO",
"location":"collect.handler:1",
"service":"payment",
"lambda_function_name":"test",
"lambda_function_memory_size": 128,
"lambda_function_arn":"arn:aws:lambda:eu-west-1:12345678910:function:test",
"lambda_request_id":"52fdfc07-2182-154f-163f-5f0f9a621d72",
"cold_start": true,
"sampling_rate": 0.0,
"message": "Collecting payment"
},
{
"timestamp":"2020-05-24 18:17:33,774",
"level":"INFO",
"location":"collect.handler:15",
"service":"payment",
"lambda_function_name":"test",
"lambda_function_memory_size": 128,
"lambda_function_arn":"arn:aws:lambda:eu-west-1:12345678910:function:test",
"lambda_request_id":"52fdfc07-2182-154f-163f-5f0f9a621d72",
"cold_start": true,
"sampling_rate": 0.0,
"message":{
"operation":"collect_payment",
"charge_id": "ch_AZFlk2345C0"
}
}
{
"timestamp": "2020-05-24 18:17:33,774",
"level": "INFO",
"location": "collect.handler:1",
"service": "payment",
"lambda_function_name": "test",
"lambda_function_memory_size": 128,
"lambda_function_arn": "arn:aws:lambda:eu-west-1:12345678910:function:test",
"lambda_request_id": "52fdfc07-2182-154f-163f-5f0f9a621d72",
"cold_start": true,
"sampling_rate": 0.0,
"message": "Collecting payment"
},
{
"timestamp": "2020-05-24 18:17:33,774",
"level": "INFO",
"location": "collect.handler:15",
"service": "payment",
"lambda_function_name": "test",
"lambda_function_memory_size": 128,
"lambda_function_arn": "arn:aws:lambda:eu-west-1:12345678910:function:test",
"lambda_request_id": "52fdfc07-2182-154f-163f-5f0f9a621d72",
"cold_start": true,
"sampling_rate": 0.0,
"message": {
"operation": "collect_payment",
"charge_id": "ch_AZFlk2345C0"
}
}
```

When used, this will include the following keys:
Expand Down Expand Up @@ -173,15 +173,15 @@ You can append your own keys to your existing Logger via `structure_logs(append=
=== "Example CloudWatch Logs excerpt"

```json hl_lines="7"
{
"timestamp": "2020-05-24 18:17:33,774",
"level": "INFO",
"location": "collect.handler:1",
"service": "payment",
"sampling_rate": 0.0,
"order_id": "order_id_value",
"message": "Collecting payment"
}
{
"timestamp": "2020-05-24 18:17:33,774",
"level": "INFO",
"location": "collect.handler:1",
"service": "payment",
"sampling_rate": 0.0,
"order_id": "order_id_value",
"message": "Collecting payment"
}
```

!!! tip "Logger will automatically reject any key with a None value"
Expand Down Expand Up @@ -209,15 +209,15 @@ It accepts any dictionary, and all keyword arguments will be added as part of th
=== "Example CloudWatch Logs excerpt"

```json hl_lines="7"
{
"timestamp": "2021-01-12 14:08:12,357",
"level": "INFO",
"location": "collect.handler:1",
"service": "payment",
"sampling_rate": 0.0,
"request_id": "1123",
"message": "Collecting payment"
}
{
"timestamp": "2021-01-12 14:08:12,357",
"level": "INFO",
"location": "collect.handler:1",
"service": "payment",
"sampling_rate": 0.0,
"request_id": "1123",
"message": "Collecting payment"
}
```

## Advanced
Expand Down
112 changes: 56 additions & 56 deletions docs/core/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ Setting | Description | Environment variable | Constructor parameter

```yaml hl_lines="9 10"
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
...
Runtime: python3.8
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: payment
POWERTOOLS_METRICS_NAMESPACE: ServerlessAirline
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
...
Runtime: python3.8
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: payment
POWERTOOLS_METRICS_NAMESPACE: ServerlessAirline
```


Expand Down Expand Up @@ -120,29 +120,29 @@ This decorator also **validates**, **serializes**, and **flushes** all your metr
=== "Example CloudWatch Logs excerpt"

```json hl_lines="2 7 10 15 22"
{
"BookingConfirmation": 1.0,
"_aws": {
"Timestamp": 1592234975665,
"CloudWatchMetrics": [
{
"Namespace": "ExampleApplication",
"Dimensions": [
[
"service"
]
],
"Metrics": [
{
"Name": "BookingConfirmation",
"Unit": "Count"
}
]
}
]
},
"service": "ExampleService"
}
{
"BookingConfirmation": 1.0,
"_aws": {
"Timestamp": 1592234975665,
"CloudWatchMetrics": [
{
"Namespace": "ExampleApplication",
"Dimensions": [
[
"service"
]
],
"Metrics": [
{
"Name": "BookingConfirmation",
"Unit": "Count"
}
]
}
]
},
"service": "ExampleService"
}
```

!!! tip "Metric validation"
Expand Down Expand Up @@ -239,30 +239,30 @@ You can add high-cardinality data as part of your Metrics log with `add_metadata
=== "Example CloudWatch Logs excerpt"

```json hl_lines="23"
{
"SuccessfulBooking": 1.0,
"_aws": {
"Timestamp": 1592234975665,
"CloudWatchMetrics": [
{
"Namespace": "ExampleApplication",
"Dimensions": [
[
"service"
]
],
"Metrics": [
{
"Name": "SuccessfulBooking",
"Unit": "Count"
}
]
}
]
},
"service": "booking",
"booking_id": "booking_uuid"
}
{
"SuccessfulBooking": 1.0,
"_aws": {
"Timestamp": 1592234975665,
"CloudWatchMetrics": [
{
"Namespace": "ExampleApplication",
"Dimensions": [
[
"service"
]
],
"Metrics": [
{
"Name": "SuccessfulBooking",
"Unit": "Count"
}
]
}
]
},
"service": "booking",
"booking_id": "booking_uuid"
}
```

### Single metric with a different dimension
Expand Down
12 changes: 6 additions & 6 deletions docs/core/tracer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ Before your use this utility, your AWS Lambda function [must have permissions](h
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
...
Runtime: python3.8
Tracing: Active
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: example
...
Runtime: python3.8
Tracing: Active
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: example
```

### Lambda handler
Expand Down
16 changes: 8 additions & 8 deletions docs/utilities/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ Here is a sample custom EventBridge event, where we only validate what's inside

```json hl_lines="9"
{
"id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c",
"detail-type": "Scheduled Event",
"source": "aws.events",
"account": "123456789012",
"time": "1970-01-01T00:00:00Z",
"region": "us-east-1",
"resources": ["arn:aws:events:us-east-1:123456789012:rule/ExampleRule"],
"detail": {"message": "hello hello", "username": "blah blah"}
"id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c",
"detail-type": "Scheduled Event",
"source": "aws.events",
"account": "123456789012",
"time": "1970-01-01T00:00:00Z",
"region": "us-east-1",
"resources": ["arn:aws:events:us-east-1:123456789012:rule/ExampleRule"],
"detail": {"message": "hello hello", "username": "blah blah"}
}
```

Expand Down