Skip to content

Conversation

@tianchu
Copy link
Collaborator

@tianchu tianchu commented Mar 12, 2020

What does this PR do?

  • patch requests only when it's installed and used
  • do not throw when requests is called explicitly with headers=None (should be a dict)
  • swallow exceptions from datadog wrapper logic

Checklist

  • Member of the Datadog team has run integration tests and updated snapshots if necessary
@tianchu tianchu requested a review from a team as a code owner March 12, 2020 22:59
@tianchu tianchu changed the title Do not break wrapped lambda function Try never break wrapped lambda function Mar 13, 2020
@tianchu tianchu changed the title Try never break wrapped lambda function Try never break the wrapped lambda function Mar 13, 2020
if "headers" in kwargs and isinstance(kwargs["headers"], dict):
kwargs["headers"].update(context)
elif len(args) >= 5:
elif len(args) >= 5 and isinstance(args[4], dict):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goodness

@tianchu tianchu merged commit e030fa0 into master Mar 13, 2020
@tianchu tianchu deleted the tian.chu/do-not-break-wrapped-lambda-function branch March 13, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants