-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(derived_code_mappings): Rename to Automatic Source Code Configuration #83313
base: master
Are you sure you want to change the base?
Changes from all commits
9431901
ceeee90
d104ce6
2d8d091
af5248d
803be9d
4d8f431
6c9471a
fee1c2b
1e1829d
a56e3a8
f2ce573
39bcaa3
8ccca3d
551588c
ebf3d8a
8d0fc95
790af64
e2d3b6e
3afe2d7
09c0e1e
338a105
713332d
a723dc5
5a68731
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,8 @@ def register_temporary_features(manager: FeatureManager): | |
|
||
# Enables user registration. | ||
manager.add("auth:register", SystemFeature, FeatureHandlerStrategy.INTERNAL, default=True) | ||
# Switch to new queue for auto source code config | ||
manager.add("new-auto-source-code-config-queue", SystemFeature, FeatureHandlerStrategy.FLAGPOLE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the option to control the queue. |
||
# Enable creating organizations within sentry (if SENTRY_SINGLE_ORGANIZATION is not enabled). | ||
manager.add("organizations:create", SystemFeature, FeatureHandlerStrategy.INTERNAL, default=True) | ||
# Controls whether or not the relocation endpoints can be used. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
logger = logging.getLogger(__name__) | ||
logger.setLevel(logging.INFO) | ||
|
||
SUPPORTED_LANGUAGES = ["javascript", "python", "node", "ruby", "php", "go", "csharp"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This constant is related to code mappings, thus, placing it here. |
||
|
||
SLASH = "/" | ||
BACKSLASH = "\\" # This is the Python representation of a single backslash | ||
|
||
|
@@ -109,7 +111,9 @@ def __init__(self, frame_file_path: str) -> None: | |
def __repr__(self) -> str: | ||
return f"FrameFilename: {self.full_path}" | ||
|
||
def __eq__(self, other) -> bool: | ||
def __eq__(self, other: object) -> bool: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Improving the typing. |
||
if not isinstance(other, FrameFilename): | ||
return False | ||
return self.full_path == other.full_path | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -994,7 +994,8 @@ def process_code_mappings(job: PostProcessJob) -> None: | |
if job["is_reprocessed"]: | ||
return | ||
|
||
from sentry.tasks.derive_code_mappings import SUPPORTED_LANGUAGES, derive_code_mappings | ||
from sentry.issues.auto_source_code_config.code_mapping import SUPPORTED_LANGUAGES | ||
from sentry.tasks.auto_source_code_config import auto_source_code_config, derive_code_mappings | ||
|
||
try: | ||
event = job["event"] | ||
|
@@ -1016,8 +1017,10 @@ def process_code_mappings(job: PostProcessJob) -> None: | |
else: | ||
return | ||
|
||
# XXX: We will stop calling data after we deploy this change | ||
derive_code_mappings.delay(project.id, data=event.data, event_id=event.event_id) | ||
if features.has("new-auto-source-code-config-queue"): | ||
auto_source_code_config.delay(project.id, data=event.data, event_id=event.event_id) | ||
else: | ||
derive_code_mappings.delay(project.id, data=event.data, event_id=event.event_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @markstory please let me know if I got this right. |
||
|
||
except Exception: | ||
logger.exception("derive_code_mappings: Failed to process code mappings") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
# Tasks not included here are sampled with `SENTRY_BACKEND_APM_SAMPLING`. | ||
# If a parent task schedules other tasks, rates propagate to the children. | ||
SAMPLED_TASKS = { | ||
"sentry.tasks.auto_source_code_config.derive_code_mappings": settings.SAMPLED_DEFAULT_RATE, | ||
"sentry.tasks.send_ping": settings.SAMPLED_DEFAULT_RATE, | ||
"sentry.tasks.store.process_event": settings.SENTRY_PROCESS_EVENT_APM_SAMPLING, | ||
"sentry.tasks.store.process_event_from_reprocessing": settings.SENTRY_PROCESS_EVENT_APM_SAMPLING, | ||
|
@@ -71,8 +72,6 @@ | |
"sentry.tasks.summaries.weekly_reports.prepare_organization_report": 0.1 | ||
* settings.SENTRY_BACKEND_APM_SAMPLING, | ||
"sentry.profiles.task.process_profile": 0.1 * settings.SENTRY_BACKEND_APM_SAMPLING, | ||
"sentry.tasks.derive_code_mappings.process_organizations": settings.SAMPLED_DEFAULT_RATE, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"sentry.tasks.derive_code_mappings.derive_code_mappings": settings.SAMPLED_DEFAULT_RATE, | ||
"sentry.monitors.tasks.clock_pulse": 1.0, | ||
"sentry.tasks.auto_enable_codecov": settings.SAMPLED_DEFAULT_RATE, | ||
"sentry.dynamic_sampling.tasks.boost_low_volume_projects": 1.0, | ||
|
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.
Once it gets created, we can switch over to it in a follow-up PR.