Skip to content

Commit

Permalink
Fix doc for log sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj Agrawal committed Aug 26, 2020
1 parent 026faaf commit 9d6e90f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/core/logger.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Key | Type | Example | Description
**level** | str | "INFO" | Logging level
**location** | str | "collect.handler:1" | Source code location where statement was executed
**service** | str | "payment" | Service name defined. "service_undefined" will be used if unknown
**sampling_rate** | int | 0.1 | Debug logging sampling rate in percentage e.g. 1% in this case
**sampling_rate** | int | 0.1 | Debug logging sampling rate in percentage e.g. 10% in this case
**message** | any | "Collecting payment" | Log statement value. Unserializable JSON values will be casted to string

## Capturing Lambda context info
Expand Down Expand Up @@ -232,7 +232,7 @@ Sampling calculation happens at the Logger class initialization. This means, whe
```python:title=collect.py
from aws_lambda_powertools import Logger

# Sample 1% of debug logs e.g. 0.1
# Sample 10% of debug logs e.g. 0.1
logger = Logger(sample_rate=0.1) # highlight-line

def handler(event, context):
Expand Down

0 comments on commit 9d6e90f

Please sign in to comment.