-
-
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 15 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 |
---|---|---|
|
@@ -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 |
---|---|---|
|
@@ -17,7 +17,11 @@ | |
SCMIntegrationInteractionEvent, | ||
SCMIntegrationInteractionType, | ||
) | ||
from sentry.integrations.utils.code_mapping import CodeMapping, CodeMappingTreesHelper | ||
from sentry.issues.auto_source_code_config.code_mapping import ( | ||
SUPPORTED_LANGUAGES, | ||
CodeMapping, | ||
CodeMappingTreesHelper, | ||
) | ||
from sentry.locks import locks | ||
from sentry.models.organization import Organization | ||
from sentry.models.project import Project | ||
|
@@ -27,8 +31,6 @@ | |
from sentry.utils.locking import UnableToAcquireLock | ||
from sentry.utils.safe import get_path | ||
|
||
SUPPORTED_LANGUAGES = ["javascript", "python", "node", "ruby", "php", "go", "csharp"] | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
if TYPE_CHECKING: | ||
|
@@ -82,8 +84,8 @@ def process_error(error: ApiError, extra: dict[str, str]) -> None: | |
|
||
|
||
@instrumented_task( | ||
name="sentry.tasks.derive_code_mappings.derive_code_mappings", | ||
queue="derive_code_mappings", | ||
name="sentry.tasks.auto_source_code_config.derive_code_mappings", | ||
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. I believe this name needs to remain constant as well 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. You can't remove/change the Instead, you should leave add the new task definition. You'll also need to retain the existing If you want to avoid any task drops, you'd also need to not call the new task in these changes, as a new worker could spawn tasks that cannot be handled by an 'old' worker. Instead you could deploy the new task, and then separately deploy changes that start using the new task name. 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. Thank you both! I will look into it. |
||
queue="derive_code_mappings", # XXX: To be renamed to auto_source_code_config | ||
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. We will switch over to the new queue on a follow-up PR. |
||
default_retry_delay=60 * 10, | ||
max_retries=3, | ||
) | ||
|
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.