Skip to content
Closed
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
12 changes: 1 addition & 11 deletions sentry_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@

from sentry_sdk._types import (
AttributeValue,
DataCollection,
Event,
ExcInfo,
Hint,
Expand Down Expand Up @@ -1970,16 +1969,7 @@ def serialize_item(


def has_data_collection_enabled(options: "Optional[dict[str, Any]]") -> bool:
if options is None:
return False

data_collection: "Optional[DataCollection]" = options.get("data_collection")
# Client options are resolved as part of client initialization, so `data_collection`
# being None could be that the user just didn't provide it.
# `provided_by_user` is what actually records whether the user actually configured it.
return data_collection is not None and data_collection.get(
"provided_by_user", False
)
return True


def get_before_send_log(
Expand Down
Loading