Wrapper errors directly sent to stderr

Open
#330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start in datadog_lambda/wrapper.py at the cited lines 198, 284, and 348, where traceback.print_exc() sends wrapper errors to stderr. Trace how errors are handled there and replace the direct stderr behavior with the configurable logger requested in the issue; done means wrapper errors are sent to the logger rather than printed directly.

Written by the indexing model from the issue text.

Description

enhancement

Expected Behavior

Logs being sent to logger, on which I can format and configure

Actual Behavior

Use of traceback.print_exc() as seen in: 1, 2, 3...

Steps to Reproduce the Problem

1.Only is needed to have any error in the wrapper that it can be seen

Specifications

  • Datadog Lambda Layer version: 4.66.0
  • Python version: 3.9.15
Dominant language
Python
Stars
102
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/datadog-lambda-python

All issues in DataDog/datadog-lambda-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.