Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[beta] Python Profiling support #244

Merged
merged 25 commits into from
Aug 23, 2022
Merged

[beta] Python Profiling support #244

merged 25 commits into from
Aug 23, 2022

Conversation

astuyve
Copy link
Contributor

@astuyve astuyve commented Aug 23, 2022

What does this PR do?

This PR enables the (beta) use of the new serverless profiling capabilities of ddtrace-py in Lambda.

Motivation

Testing Guidelines

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@astuyve astuyve requested a review from a team as a code owner August 23, 2022 14:06
datadog_lambda/wrapper.py Outdated Show resolved Hide resolved
datadog_lambda/wrapper.py Outdated Show resolved Hide resolved
@astuyve astuyve requested a review from maxday August 23, 2022 17:32
Copy link
Contributor

@maxday maxday left a comment

Choose a reason for hiding this comment

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

LGTM! do we want to build and release this layer in sandbox to see the impact on cold start (when profiling is disabled) since the package size has grown a bit?

@astuyve
Copy link
Contributor Author

astuyve commented Aug 23, 2022

LGTM! do we want to build and release this layer in sandbox to see the impact on cold start (when profiling is disabled) since the package size has grown a bit?

We've got a release on sandbox already, will test a cold start version shortly

@astuyve
Copy link
Contributor Author

astuyve commented Aug 23, 2022

We ran three versions of the same handler code (simple hello world).

  • without-profiling (version 60 of this library, no profiler code at all)
  • with profiling (pre-release of 61 of this library, which imports the profiler and turns it on)
  • with profiling but disabled (pre-release of 61 of this library, which has the larger filesize compared to without-profiling)

With profiling packaged and enabled, we see ~200ish ms cold start increase.
We see almost no cold start increase for including profiling, but not loading that code.
image
image

@astuyve astuyve merged commit 96eecdc into main Aug 23, 2022
@astuyve astuyve deleted the aj/profiling-poc branch August 23, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants