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
Add experimental profiler under experiments.enable_profiling #1481
Conversation
@szokeasaurusrex could you add output from a sample run here for completeness? |
Here is a sample output from profiling a Flask request. Please be aware that I am currently working on changing the output format to a JSON format that will enable us to view the profile flamegraphs in Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again some minor code style, everything looks good otherwise!
very cool work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move this to experimental.
also, can you add at least one integration test here that when the experimental flag is on, you get the profiling object in the envelope.
(ping me if you can't figure out how to do something in pytest)
sentry_sdk/consts.py
Outdated
@@ -78,6 +78,7 @@ def __init__( | |||
auto_enabling_integrations=True, # type: bool | |||
auto_session_tracking=True, # type: bool | |||
send_client_reports=True, # type: bool | |||
enable_profiling=False, # type: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we decided this should move to experimental so please move it here
sentry-python/sentry_sdk/consts.py
Lines 29 to 39 in 9e69fcf
Experiments = TypedDict( | |
"Experiments", | |
{ | |
"max_spans": Optional[int], | |
"record_sql_params": Optional[bool], | |
"smart_transaction_trimming": Optional[bool], | |
"propagate_tracestate": Optional[bool], | |
"custom_measurements": Optional[bool], | |
}, | |
total=False, | |
) |
and change the checks in the context manager and tracing.py accordingly
@sl0thentr0py I moved the |
To validate the profiler, I used this Flask server (which is just a script used by the profiling team that has been wrapped within a Flask server). To verify profiles were being generated and uploaded, I ran the Flask server in single-threaded mode with I also validated that a multi-threaded server would not break with the profiler enabled. To perform this verification, I ran the server in multi-threaded mode with |
No description provided.