-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support external sourcemaps bigger, than 1Mb #2050
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
Conversation
Co-authored-by: Burak Yigit Kaya <ben@byk.im>
sentry/sentry.conf.example.py
Outdated
@@ -107,6 +107,9 @@ def get_internal_network(): | |||
"BACKEND": "django.core.cache.backends.memcached.MemcachedCache", | |||
"LOCATION": ["memcached:11211"], | |||
"TIMEOUT": 3600, | |||
"OPTIONS": { | |||
"server_max_value_length": 1024 * 1024 * 25, |
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.
Since this value needs to be in sync with the other value, I feel like this should be in a shared env variable and here we should parse out that value. Something like:
SENTRY_MAX_EXTERNAL_SOURCEMAP_SIZE="25M"
and then in this file
UNIT_SIZES={
"K": 1024,
"M": 1024**2,
"G": 1024**3,
}
def unit_text_to_bytes(text):
multiplier = UNIT_SIZES[text[-1]]
return float(text[:-1])*multiplier
...
"OPTIONS": {
"server_max_value_length": unit_text_to_bytes(env("SENTRY_MAX_EXTERNAL_SOURCEMAP_SIZE", "1M")),
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.
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.
Rejecting for the environment
docker compose config placement
Co-authored-by: Burak Yigit Kaya <ben@byk.im>
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.
Nice work!
Self hosted sentry limited in sourcemap external size, which can fetch and cache to 1Mb.
This is because
memcached
the maximum size of a value you can store in is 1 megabyte by default. But this can be fixed by-I
param.This PR allow to fetch and cache external sourcemaps for sentry up to 25Mb.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.