Bug: `log_uncaught_exceptions` only works locally and not on lambda
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 52/100
- Tipo de issue
- Documentação
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- aws, python
- Domínio
- documentation, observability-sre
Direção de pesquisa
Start by locating the documentation for Logger(log_uncaught_exceptions=True) and reviewing the discussion about why the behavior differs in AWS Lambda. Reproduce the provided handler in an actual Lambda runtime and compare its output with local execution. The change is complete when the documentation clearly states which environments support this option and explains the observed unstructured output; confirm the project’s documentation build or relevant checks if available.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Expected Behaviour
When log_uncaught_exceptions=True, uncaught exceptions in a lambda are handled and transformed to a structured log.
Current Behaviour
Uncaught exceptions are printed unstructured.
Code snippet
from aws_lambda_powertools import Logger
from aws_lambda_powertools.utilities.typing import LambdaContext
logger = Logger(log_uncaught_exceptions=True)
def lambda_handler(event: dict, context: LambdaContext) -> str:
raise(Exception("asdf"))
Possible Solution
Probably none. Document this behavior.
I don't think sys.excepthook can be overridden in a lambda container, but I have no proof because the original forum thread that details this has been deleted by AWS with no replacement.
Steps to Reproduce
Set log_uncaught_exceptions=True in an actual running lambda. If log_uncaught_exceptions=True on a local machine, the behavior runs just as intended.
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.9
Packaging format used
Lambda Layers
Debugging logs
No response
- Linguagem predominante
- Python
- Estrelas
- 3.3k
- Forks
- 511
- Merge médio
- 3d 8h
- PRs com merge (30d)
- 92
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de aws-powertools/powertools-lambda-python
-
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED set to an empty or non-boolean value crashes every invocationTalvez já em andamento @lechakrawarthy assumiu há 1 dia. Abertabug good first issue help wanted idempotency
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
aws-powertools/powertools-lambda-python#8728 · 4 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Bug: Redis layer fails the invocation instead of retrying when a record expires between SET NX and GETTalvez já em andamento @coughlmao assumiu há 1 dia. Abertabug good first issue help wanted idempotency
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
aws-powertools/powertools-lambda-python#8727 · 4 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Bug: Redis orphan lock timeout ignores expires_after_seconds and is always 10 secondsTalvez já em andamento @CJstate assumiu há 1 dia. Abertabug good first issue help wanted idempotency
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
aws-powertools/powertools-lambda-python#8726 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Bug: idempotency payloads with set, frozenset or bytes fields cannot be hashedTalvez já em andamento @Neeraj111010 assumiu há 1 dia. Abertabug good first issue help wanted idempotency
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
aws-powertools/powertools-lambda-python#8725 · 6 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Bug: with a DynamoDB composite key, DataRecord.idempotency_key is the static partition key valueTalvez já em andamento @sumedh-aerram assumiu há 1 dia. Abertabug good first issue help wanted idempotency
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
aws-powertools/powertools-lambda-python#8724 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de aws-powertools/powertools-lambda-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
earthtojake/text-to-cad#758 ·
Mantenedores costumam responder em até 1 dia
-
domain:upgrades enhancement needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
gke-labs/kube-agents#4634 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
agardnerIT/opamp-server-py#116 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
elviskahoro/sdk-python-attio#144 · 1 comentário ·
Mantenedores costumam responder em até 1 dia