-
Notifications
You must be signed in to change notification settings - Fork 556
Remove performance papercuts #4675
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
443ce19
to
24cddf2
Compare
sentry_sdk/utils.py
Outdated
@@ -1858,6 +1858,7 @@ def is_module_patched(mod_name): | |||
return False | |||
|
|||
|
|||
@lru_cache(maxsize=1) |
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.
til, didn't know you could do this :)
Update the `@trace` decorator and make it more powerful. It accepts now the following parameters: `op`, `name`, `attributes`. Example usage: ```python import sentry_sdk from sentry_sdk.consts import OP # Simple usage (like before) @sentry_sdk.trace def process_data(): # Function implementation pass # With custom parameters @sentry_sdk.trace( op=OP.DB_QUERY, name="Get user data", attributes={"postgres": True} ) def make_db_query(sql): # Function implementation pass ``` This creates better DX for our users. --------- Co-authored-by: Daniel Szoke <[email protected]>
Explicitly list the `send_data` parameters in the wrapped function. The parameters are coming from [here](https://github.com/mymarilyn/clickhouse-driver/blob/8a4e7c5b99b532df2b015651d893a6f36288a22c/clickhouse_driver/client.py#L634). Continue also providing `*args` and `**kwargs`, but only for forwards-compatibility. <!-- Describe your PR here --> --- Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`. Running the test suite on your PR might require maintainer approval.
Currently, the Clickhouse integration consumes any data passed as a generator when reading it for insertion as `db_params`. Instead, since generators cannot be cloned, we need to wrap the generator to add the params as we iterate over it. Fixes #4657 <!-- Describe your PR here --> --- Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`. Running the test suite on your PR might require maintainer approval.
…stead of `ai.*` (#4674) Update `AnthropicIntegration` to support Otel and Sentry AI Agents module compatible span attributes of `gen_ai.*` family. Closes https://linear.app/getsentry/issue/TET-996/improve-integration-for-anthropic-sdk --------- Co-authored-by: Anton Pirker <[email protected]>
A debug message to see what check-ins are send including the `monitor_slug` and the check-in `status`. --------- Co-authored-by: Daniel Szoke <[email protected]>
ef10912
to
dd323d6
Compare
sl0thentr0py
approved these changes
Aug 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removing some papercuts:
.copy()
instead of copying stuff via constructor (e.g.dict(old_old)
)Ref #4660
Closes #3908