Skip to content

Conversation

@antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Apr 24, 2024

This adds more data to the cache spans and makes adding the cache item size optional.
This implements parts of following spec https://develop.sentry.dev/sdk/performance/modules/cache/

Documentation for manual instrumentation for the Cache module can be found here:
getsentry/sentry-docs#9926

Load testing of the feature was done here: #3058

Fixes #2964

@antonpirker antonpirker changed the base branch from master to sentry-sdk-2.0 April 24, 2024 13:14
Base automatically changed from sentry-sdk-2.0 to master April 25, 2024 09:13
@antonpirker antonpirker marked this pull request as ready for review May 7, 2024 07:46
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

Have some questions and suggestions


original_method = getattr(cache, method_name)

@ensure_integration_enabled(DjangoIntegration, original_method)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ensure_integration_enabled(DjangoIntegration, original_method)

I think it makes more sense to place this on the sentry_method function. It is inaccurate to say that this method maps original_method because it has a different signature. Although, perhaps it would be more appropriate to make this change in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, probably better a new PR. Can you please create a ticket @szokeasaurusrex ?


return value

@functools.wraps(original_method)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@functools.wraps(original_method)
@ensure_integration_enabled(DjangoIntegration, original_method)

To be applied alongside my comment on (original version) line 41; also, likely makes sense to do in separate PR.

Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

I found some logic that appears to be broken – this should be fixed, and we should also add tests for it.

Besides that, I have also added some more minor suggestions and questions.

@antonpirker antonpirker self-assigned this May 10, 2024
@antonpirker antonpirker dismissed szokeasaurusrex’s stale review May 22, 2024 06:06

All the changes where address from Daniels review, but he is out of office for some time, so I will dismiss this review so I can merge this.

@antonpirker antonpirker merged commit 30f72a3 into master May 23, 2024
@antonpirker antonpirker deleted the antonpirker/django-caching-module branch May 23, 2024 08:06
arjennienhuis pushed a commit to arjennienhuis/sentry-python that referenced this pull request Sep 30, 2024
This adds more data to the cache spans and makes adding the cache item size optional.
This implements parts of following spec https://develop.sentry.dev/sdk/performance/modules/cache/

---------

Co-authored-by: Daniel Szoke <[email protected]>
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.

Caching module update for DjangoIntegration

4 participants