Skip to content
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

Removed experimental explain_plan feature. #3534

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class EndpointType(Enum):
Experiments = TypedDict(
"Experiments",
{
"attach_explain_plans": dict[str, Any],
"max_spans": Optional[int],
"record_sql_params": Optional[bool],
"continuous_profiling_auto_start": Optional[bool],
Expand Down
Empty file removed sentry_sdk/db/__init__.py
Empty file.
59 changes: 0 additions & 59 deletions sentry_sdk/db/explain_plan/__init__.py

This file was deleted.

48 changes: 0 additions & 48 deletions sentry_sdk/db/explain_plan/django.py

This file was deleted.

48 changes: 0 additions & 48 deletions sentry_sdk/db/explain_plan/sqlalchemy.py

This file was deleted.

15 changes: 0 additions & 15 deletions sentry_sdk/integrations/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import sentry_sdk
from sentry_sdk.consts import OP, SPANDATA
from sentry_sdk.db.explain_plan.django import attach_explain_plan_to_span
from sentry_sdk.scope import add_global_event_processor, should_send_default_pii
from sentry_sdk.serializer import add_global_repr_processor
from sentry_sdk.tracing import SOURCE_FOR_STYLE, TRANSACTION_SOURCE_URL
Expand Down Expand Up @@ -634,20 +633,6 @@ def execute(self, sql, params=None):
span_origin=DjangoIntegration.origin_db,
) as span:
_set_db_data(span, self)
options = (
sentry_sdk.get_client()
.options["_experiments"]
.get("attach_explain_plans")
)
if options is not None:
attach_explain_plan_to_span(
span,
self.cursor.connection,
sql,
params,
self.mogrify,
options,
)
result = real_execute(self, sql, params)

with capture_internal_exceptions():
Expand Down
13 changes: 0 additions & 13 deletions sentry_sdk/integrations/sqlalchemy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import sentry_sdk
from sentry_sdk.consts import SPANSTATUS, SPANDATA
from sentry_sdk.db.explain_plan.sqlalchemy import attach_explain_plan_to_span
from sentry_sdk.integrations import Integration, DidNotEnable
from sentry_sdk.tracing_utils import add_query_source, record_sql_queries
from sentry_sdk.utils import (
Expand Down Expand Up @@ -68,17 +66,6 @@ def _before_cursor_execute(

if span is not None:
_set_db_data(span, conn)
options = (
sentry_sdk.get_client().options["_experiments"].get("attach_explain_plans")
)
if options is not None:
attach_explain_plan_to_span(
span,
conn,
statement,
parameters,
options,
)
context._sentry_sql_span = span


Expand Down
Loading